public interface FreeText extends Annotation
Modifier and Type | Field and Description |
---|---|
static int |
ALIGN_BOTTOM |
static int |
ALIGN_CENTER |
static int |
ALIGN_LEFT |
static int |
ALIGN_RIGHT |
static int |
ALIGN_TOP |
static String |
FREE_TEXT_TYPEWRITER |
BORDERSTYLE_BEVELED, BORDERSTYLE_CLOUD, BORDERSTYLE_DASHED, BORDERSTYLE_INSETS, BORDERSTYLE_SOLID, BORDERSTYLE_UNDERLINE, FLAGS_HIDDEN, FLAGS_INVISIBLE, FLAGS_LOCKED, FLAGS_LOCKEDCONTENTS, FLAGS_NOROTATE, FLAGS_NOVIEW, FLAGS_NOZOOM, FLAGS_PRINTABLE, FLAGS_READONLY
Modifier and Type | Method and Description |
---|---|
int |
getAlignHorizontal() |
int |
getAlignVertical() |
Color |
getBorderColor() |
Rectangle2D.Double |
getBorderRect() |
String |
getContents()
Returns the string contents for this annotation.
|
Font |
getFont()
Deprecated.
Use getFontName() and getFontSize() instead.
|
String |
getFontName()
Return the name of the PDF font.
|
float |
getFontSize()
Returns the point size of the PDF font.
|
String |
getIntent()
Returns the description of the intent of the FreeText Annotation
|
int |
getRotation() |
BasicStroke |
getStroke()
Gets the stroke to use when drawing the annotation.
|
Color |
getTextColor() |
boolean |
isIntentTypeWriter() |
void |
setAlignHorizontal(int align) |
void |
setAlignVertical(int align) |
void |
setBorderColor(Color borderColor) |
void |
setBorderRect(Rectangle2D.Double borderRect) |
void |
setContents(String contents)
Sets the string contents for this annotation.
|
void |
setFont(Font font)
Deprecated.
Use setPDFFont() instead.
|
void |
setIntent(String intent)
Set the description of the intent of the FreeText Annotation
|
void |
setPDFFont(String fontName,
float fontSize)
Sets the name and point size of the PDF Font.
|
void |
setRotation(int rotation) |
void |
setStroke(BasicStroke stroke)
Sets the stroke used when drawing the annotation.
|
void |
setTextColor(Color textColor) |
getActions, getBorderStyle, getBorderWidth, getCheckmarkStatus, getColor, getComponent, getCreator, getFlags, getModifiedDate, getName, getOpacity, getRectangle, getReviewHistory, getSubject, getSubtype, getTriggerActions, isHidden, isInvisible, isLocked, isLockedContents, isNoRotate, isNoView, isNoZoom, isPrintable, isReadOnly, paint, print, revalidate, setActions, setBorderStyle, setBorderWidth, setColor, setComponent, setComponentVisible, setCreator, setFlags, setHidden, setInvisible, setLayer, setLocked, setLockedContents, setModifiedDate, setName, setNoRotate, setNoView, setNoZoom, setOpacity, setPrintable, setReadOnly, setRectangle, setSubject, setSubtype, setTriggerActions, shiftRectangle
static final int ALIGN_LEFT
static final int ALIGN_CENTER
static final int ALIGN_RIGHT
static final int ALIGN_TOP
static final int ALIGN_BOTTOM
static final String FREE_TEXT_TYPEWRITER
String getContents()
getContents
in interface Annotation
void setContents(String contents)
int getAlignHorizontal()
void setAlignHorizontal(int align)
int getAlignVertical()
void setAlignVertical(int align)
Font getFont()
void setFont(Font font)
void setPDFFont(String fontName, float fontSize)
The supported fonts are Helvetica, Helvetica-Bold, Helvetica-Oblique, Helvetica-BoldOblique, Courier, Courier-Bold, Courier-Oblique, Courier-BoldOblique, Times-Roman, Times-Bold, Times-Italic, Times-BoldItalic.
The font will default to Helvetica.
fontName
- The font name.fontSize
- The Font size.String getFontName()
float getFontSize()
Color getTextColor()
void setTextColor(Color textColor)
Color getBorderColor()
void setBorderColor(Color borderColor)
Rectangle2D.Double getBorderRect()
void setBorderRect(Rectangle2D.Double borderRect)
int getRotation()
void setRotation(int rotation)
String getIntent()
void setIntent(String intent)
intent
- the intent to setboolean isIntentTypeWriter()
BasicStroke getStroke()
void setStroke(BasicStroke stroke)
stroke
- The stroke to use when drawing the annotation.