|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.icepdf.core.pobjects.Dictionary
org.icepdf.core.pobjects.annotations.Annotation
org.icepdf.core.pobjects.annotations.MarkupAnnotation
org.icepdf.core.pobjects.annotations.FreeTextAnnotation
public class FreeTextAnnotation
A free text annotation (PDF 1.3) displays text directly on the page. Unlike an ordinary text annotation (see 12.5.6.4, “Text Annotations�), a free text annotation has no open or closed state; instead of being displayed in a pop-up window, the text shall be always visible. Table 174 shows the annotation dictionary entries specific to this type of annotation. 12.7.3.3, “Variable Text� describes the process of using these entries to generate the appearance of the text in these annotations.
| Field Summary | |
|---|---|
static Name |
BE_KEY
(Optional; PDF 1.6) A border effect dictionary (see Table 167) used in conjunction with the border style dictionary specified by the BS entry. |
static java.lang.String |
BODY_END
|
static java.lang.String |
BODY_START
|
static Name |
BS_KEY
(Optional; PDF 1.6) A border style dictionary (see Table 166) specifying the line width and dash pattern that shall be used in drawing the annotation’s border. |
static Name |
CL_KEY
(Optional; meaningful only if IT is FreeTextCallout; PDF 1.6) An array of four or six numbers specifying a callout line attached to the free text annotation. |
static Name |
DA_KEY
(Required) The default appearance string that shall be used in formatting the text (see 12.7.3.3, “Variable Text�). |
protected java.lang.String |
defaultAppearance
|
protected static java.awt.Color |
defaultFillColor
|
protected static java.awt.Color |
defaultFontColor
|
protected static int |
defaultFontSize
|
protected java.lang.String |
defaultStylingString
|
protected javax.swing.text.DefaultStyledDocument |
document
|
static Name |
DS_KEY
(Optional; PDF 1.5) A default style string, as described in 12.7.3.4, “Rich Text Strings.� |
static Name |
EMBEDDED_FONT_NAME
|
protected FontFile |
fontFile
|
protected boolean |
fontPropertyChanged
|
protected boolean |
hideRenderedOutput
|
static Name |
LE_KEY
(Optional; meaningful only if CL is present; PDF 1.6) A name specifying the line ending style that shall be used in drawing the callout line specified in CL. |
static Name |
Q_KEY
(Optional; PDF 1.4) A code specifying the form of quadding (justification) that shall be used in displaying the annotation’s text: 0 - Left-justified 1 - Centered 2 - Right-justified Default value: 0 (left-justified). |
protected int |
quadding
|
static int |
QUADDING_CENTER_JUSTIFIED
Right-justified quadding |
static int |
QUADDING_LEFT_JUSTIFIED
Left-justified quadding |
static int |
QUADDING_RIGHT_JUSTIFIED
Center-justified quadding |
static Name |
RD_KEY
(Optional; PDF 1.6) A set of four numbers describing the numerical differences between two rectangles: the Rect entry of the annotation and a rectangle contained within that rectangle. |
protected java.lang.String |
richText
|
| Fields inherited from class org.icepdf.core.pobjects.annotations.MarkupAnnotation |
|---|
CA_KEY, CREATION_DATE_KEY, creationDate, EX_DATA_KEY, inReplyToAnnotation, intent, IRT_KEY, IT_KEY, opacity, POPUP_KEY, popupAnnotation, RC_KEY, replyToRelation, RT_KEY, SUBJ_KEY, subject, T_KEY, titleText |
| Fields inherited from class org.icepdf.core.pobjects.Dictionary |
|---|
entries, FORM_TYPE_KEY, inited, isDeleted, isNew, LENGTH_KEY, library, SUBTYPE_KEY, TYPE_KEY |
| Constructor Summary | |
|---|---|
FreeTextAnnotation(Library l,
java.util.HashMap h)
|
|
| Method Summary | |
|---|---|
void |
clearShapes()
|
java.lang.String |
getDefaultAppearance()
|
java.lang.String |
getDefaultStylingString()
|
java.awt.Color |
getFillColor()
|
java.awt.Color |
getFontColor()
|
java.lang.String |
getFontName()
|
int |
getFontSize()
|
int |
getFontStyle()
|
static FreeTextAnnotation |
getInstance(Library library,
java.awt.Rectangle rect)
Gets an instance of a FreeTextAnnotation that has valid Object Reference. |
int |
getQuadding()
|
java.lang.String |
getRichText()
|
void |
init()
Initiate the Dictionary. |
boolean |
isFillType()
|
boolean |
isFontPropertyChanged()
|
boolean |
isHideRenderedOutput()
|
boolean |
isStrokeType()
|
void |
render(java.awt.Graphics2D origG,
int renderHintType,
float totalRotation,
float userZoom,
boolean tabSelected)
|
void |
resetAppearanceStream(double dx,
double dy,
java.awt.geom.AffineTransform pageTransform)
|
void |
setDefaultAppearance(java.lang.String defaultAppearance)
|
void |
setDocument(javax.swing.text.DefaultStyledDocument document)
|
void |
setFillColor(java.awt.Color fillColor)
|
void |
setFillType(boolean fillType)
|
void |
setFontColor(java.awt.Color fontColor)
|
void |
setFontName(java.lang.String fontName)
|
void |
setFontSize(int fontSize)
|
void |
setFontStyle(int fontStyle)
|
void |
setHideRenderedOutput(boolean hideRenderedOutput)
|
void |
setQuadding(int quadding)
|
void |
setRichText(java.lang.String richText)
|
void |
setStrokeType(boolean strokeType)
|
| Methods inherited from class org.icepdf.core.pobjects.annotations.MarkupAnnotation |
|---|
getCreationDate, getInReplyToAnnotation, getIntent, getOpacity, getPopupAnnotation, getReplyToRelation, getSubject, getTitleText, setCreationDate, setInReplyToAnnotation, setPopupAnnotation, setSubject, setTitleText, toString |
| Methods inherited from class org.icepdf.core.pobjects.Dictionary |
|---|
getEntries, getFloat, getInt, getLibrary, getNumber, getObject, getPObjectReference, isDeleted, isNew, setDeleted, setNew, setPObjectReference |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final Name DA_KEY
public static final Name Q_KEY
public static final Name DS_KEY
public static final Name CL_KEY
public static final Name BE_KEY
public static final Name RD_KEY
public static final Name BS_KEY
public static final Name LE_KEY
public static final int QUADDING_LEFT_JUSTIFIED
public static final int QUADDING_CENTER_JUSTIFIED
public static final int QUADDING_RIGHT_JUSTIFIED
public static final Name EMBEDDED_FONT_NAME
protected static java.awt.Color defaultFontColor
protected static java.awt.Color defaultFillColor
protected static int defaultFontSize
protected java.lang.String defaultAppearance
protected int quadding
protected java.lang.String defaultStylingString
protected boolean hideRenderedOutput
protected java.lang.String richText
protected javax.swing.text.DefaultStyledDocument document
protected FontFile fontFile
protected boolean fontPropertyChanged
public static final java.lang.String BODY_START
public static final java.lang.String BODY_END
| Constructor Detail |
|---|
public FreeTextAnnotation(Library l,
java.util.HashMap h)
| Method Detail |
|---|
public void init()
Dictionary
init in class MarkupAnnotation
public static FreeTextAnnotation getInstance(Library library,
java.awt.Rectangle rect)
library - document libraryrect - bounding rectangle in user space
public void render(java.awt.Graphics2D origG,
int renderHintType,
float totalRotation,
float userZoom,
boolean tabSelected)
render in class Annotation
public void resetAppearanceStream(double dx,
double dy,
java.awt.geom.AffineTransform pageTransform)
resetAppearanceStream in class Annotationpublic java.lang.String getDefaultStylingString()
public void clearShapes()
public void setDocument(javax.swing.text.DefaultStyledDocument document)
public boolean isHideRenderedOutput()
public void setHideRenderedOutput(boolean hideRenderedOutput)
public java.lang.String getDefaultAppearance()
public void setDefaultAppearance(java.lang.String defaultAppearance)
public int getQuadding()
public void setQuadding(int quadding)
public java.lang.String getRichText()
getRichText in class MarkupAnnotationpublic void setRichText(java.lang.String richText)
setRichText in class MarkupAnnotationpublic java.awt.Color getFontColor()
public void setFontColor(java.awt.Color fontColor)
public java.awt.Color getFillColor()
public void setFillColor(java.awt.Color fillColor)
public java.lang.String getFontName()
public void setFontName(java.lang.String fontName)
public int getFontStyle()
public void setFontStyle(int fontStyle)
public int getFontSize()
public void setFontSize(int fontSize)
public boolean isFillType()
public boolean isFontPropertyChanged()
public void setFillType(boolean fillType)
public boolean isStrokeType()
public void setStrokeType(boolean strokeType)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||