public class FreeTextAnnotation extends Annotation
| Constructor and Description |
|---|
FreeTextAnnotation(Page page,
Rect initialRect,
java.lang.String defaultAppearance)
Create a new FreeTextAnnotation at the end of a page's annotation array.
|
FreeTextAnnotation(Page page,
Rect initialRect,
java.lang.String defaultAppearance,
int addAfter)
Create a new FreeTextAnnotation at a specific index in the page's annotation array.
|
| Modifier and Type | Method and Description |
|---|---|
void |
delete() |
Form |
generateAppearance()
Generate a new appearance stream with the current annotation properties.
|
double |
getAnnotationFeatureLevel()
The minimum PDF version necessary to support the features used in this annotation.
|
java.lang.String |
getBorderStyle() |
java.util.List<java.lang.Double> |
getBorderStyleDashPattern() |
double |
getBorderStyleWidth() |
Color |
getColor()
Deprecated.
|
java.lang.String |
getDefaultAppearance()
The default appearance string to be used in formatting the text.
|
java.lang.String |
getFontFace()
Get Font face for the text
|
double |
getFontSize()
Get font size for the text;
|
HorizontalAlignment |
getQuadding()
A code specifiying the form of quadding (justification) to be used in displaying the annotation's text.
|
Color |
getTextColor()
The text color which used for drawing text
|
void |
setAnnotationFeatureLevel(double featureLevel)
Removes features not supported in the supplied version number.
|
void |
setBorderStyle(java.lang.String style) |
void |
setBorderStyleDashPattern(java.util.List<java.lang.Double> dashPattern) |
void |
setBorderStyleWidth(double width) |
void |
setColor(Color arg0)
Deprecated.
|
void |
setDefaultAppearance(java.lang.String arg0)
The default appearance string to be used in formatting the text.
|
void |
setFontFace(java.lang.String fontName)
Set Font face for the text
|
void |
setFontSize(double fontSize)
Set font size for text
|
void |
setQuadding(HorizontalAlignment quadding)
A code specifiying the form of quadding (justification) to be used in displaying the annotation's text.
|
void |
setTextColor(Color textColor)
|
equals, getContents, getFlags, getInteriorColor, getNormalAppearance, getOpacity, getOptionalContentMembershipDict, getPDFDict, getRect, getSubtype, getTitle, hasRichTextData, isCurrentlyVisible, setContents, setFlags, setInteriorColor, setNormalAppearance, setOpacity, setOptionalContentMembershipDict, setRect, setTitle, toStringpublic FreeTextAnnotation(Page page, Rect initialRect, java.lang.String defaultAppearance)
page - The page to which the FreeTextAnnotation is added.initialRect - A rectangle specifying the annotation's bounds, specified in user space coordinates.defaultAppearance - The default appearance string to be used in formatting the text.public FreeTextAnnotation(Page page, Rect initialRect, java.lang.String defaultAppearance, int addAfter)
page - The page to which the annotation is added.initialRect - A rectangle specifying the annotation's bounds, specified in user space coordinates.defaultAppearance - The default appearance string to be used in formatting the text.addAfter - Where to add the annotation in the page's annotation array. To add the annotation to the end of the array, pass a value of -2 or use the alternate version of this constructor that does not take an index (this is generally what you should do unless you have a need to place the annotation at a special location in the array). Passing a value of -1 adds the annotation to the beginning of the array. Passing other negative values produces undefined results.public void delete()
delete in class Annotationpublic java.lang.String getDefaultAppearance()
public void setDefaultAppearance(java.lang.String arg0)
public HorizontalAlignment getQuadding()
public void setQuadding(HorizontalAlignment quadding)
public double getAnnotationFeatureLevel()
getAnnotationFeatureLevel in class Annotationpublic void setAnnotationFeatureLevel(double featureLevel)
setAnnotationFeatureLevel in class Annotationpublic Form generateAppearance()
The resulting Form can then be used to set the annotation's appearance, such as by calling SetNormalAppearance.
generateAppearance in class Annotationpublic void setFontSize(double fontSize)
public double getFontSize()
public void setFontFace(java.lang.String fontName)
public java.lang.String getFontFace()
@Deprecated public Color getColor()
getColor in class Annotation@Deprecated public void setColor(Color arg0)
setColor in class Annotationpublic Color getTextColor()
public void setTextColor(Color textColor)
The text color which used for drawing text
public double getBorderStyleWidth()
public void setBorderStyleWidth(double width)
public java.lang.String getBorderStyle()
public void setBorderStyle(java.lang.String style)
public java.util.List<java.lang.Double> getBorderStyleDashPattern()
public void setBorderStyleDashPattern(java.util.List<java.lang.Double> dashPattern)