public interface FreeText extends Annotation
Modifier and Type | Field and Description |
---|---|
static int |
ALIGN_BOTTOM
Vertical text alignment = bottom of annotation.
|
static int |
ALIGN_CENTER
Horizontal text alignment = center of annotation.
|
static int |
ALIGN_LEFT
Horizontal text alignment = left side of annotation.
|
static int |
ALIGN_MIDDLE
Vertical text alignment = middle of annotation.
|
static int |
ALIGN_RIGHT
Horizontal text alignment = right side of annotation.
|
static int |
ALIGN_TOP
Vertical text alignment = top of annotation.
|
static String |
INTENT_TYPE_WRITER
Typewriter intent.
|
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()
Returns the horizontal alignment of the text.
|
int |
getAlignVertical()
Returns the vertical alignment of the text.
|
Color |
getBorderColor()
Returns the border color.
|
Rectangle2D.Double |
getBorderRect()
Returns the border rectangle.
|
String |
getContents()
Returns the plain text contents for this annotation.
|
Date |
getCreationDate()
Returns the date and time when the annotation was created.
|
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
|
String |
getRichContents()
Returns the rich contents for this annotation.
|
int |
getRotation()
Returns the rotation.
|
BasicStroke |
getStroke()
Gets the stroke to use when drawing the annotation.
|
Color |
getTextColor()
Returns the color of the text.
|
boolean |
isIntentTypeWriter()
Returns true if this is a typewriter annotation.
|
void |
setAlignHorizontal(int align)
Sets the horizontal alignment of the text.
|
void |
setAlignVertical(int align)
Sets the vertical alignment of the text.
|
void |
setBorderColor(Color borderColor)
Sets the border color.
|
void |
setBorderRect(Rectangle2D.Double borderRect)
Sets the border rectangle.
|
void |
setContents(String contents)
Sets the string contents for this annotation.
|
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 |
setRichContents(String richContents)
Sets the rich contents for this annotation.
|
void |
setRotation(int rotation)
Sets the rotation.
|
void |
setStroke(BasicStroke stroke)
Sets the stroke used when drawing the annotation.
|
void |
setTextColor(Color textColor)
Sets the color of the text.
|
getActions, getAnnotationComponent, getBorderStyle, getBorderWidth, getCheckmarkStatus, getColor, getComponent, getCreator, getFlags, getIRTAnnotation, getModifiedDate, getName, getOpacity, getPageIndex, getRectangle, getReviewHistory, getSubject, getSubtype, getTriggerActions, isHidden, isInvisible, isIRTGroup, 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, 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_MIDDLE
static final int ALIGN_BOTTOM
static final String INTENT_TYPE_WRITER
String getContents()
getContents
in interface Annotation
getRichContents()
void setContents(String contents)
contents
- the new string contents.String getRichContents()
void setRichContents(String richContents)
richContents
- the new rich contents.int getAlignHorizontal()
void setAlignHorizontal(int align)
align
- the new horizontal alignment of the text.int getAlignVertical()
void setAlignVertical(int align)
align
- the new vertical alignment of the text.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)
textColor
- the new color of the text.Color getBorderColor()
void setBorderColor(Color borderColor)
borderColor
- the new border color.Rectangle2D.Double getBorderRect()
void setBorderRect(Rectangle2D.Double borderRect)
borderRect
- the new border rectangle.int getRotation()
void setRotation(int rotation)
rotation
- the new 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.Date getCreationDate()