|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.levigo.jadice.annotation.Annotation com.levigo.jadice.annotation.ShapeBasedAnnotation com.levigo.jadice.annotation.RectangleAnnotation com.levigo.jadice.annotation.TextAnnotation
public class TextAnnotation
An annotation looking like a piece of text.
An text annotation could be used to add additional information to the displayed document page. For this purpose it can be rotated, changed its appearance color and text style.
Field Summary | |
---|---|
protected boolean |
bold
|
protected String |
defaultText
|
protected boolean |
editable
|
protected String |
fontFace
|
protected float |
fontSize
|
protected boolean |
italic
|
protected boolean |
scaleText
|
protected boolean |
strikethrough
|
protected String |
text
|
protected Color |
textColor
|
protected boolean |
underscored
|
Fields inherited from class com.levigo.jadice.annotation.RectangleAnnotation |
---|
shape |
Fields inherited from class com.levigo.jadice.annotation.ShapeBasedAnnotation |
---|
allowResize, fillColor, filled, iconified, linePainted, lineWidth, strokeColor, strokeResolution |
Fields inherited from class com.levigo.jadice.annotation.Annotation |
---|
createdAt, createdBy, doFireAnnotationEvents, id, initializer, isModified, lastModifiedAt, lastModifiedBy |
Constructor Summary | |
---|---|
TextAnnotation()
|
Method Summary | |
---|---|
TextAnnotation |
clone()
|
protected void |
copyAttributesTo(Annotation annotation)
Copy annotation type related attributes to new annotation. |
String |
getDefaultText()
Returns the current default text. |
Font |
getFont()
Deprecated. Will be removed in DOCP Version 5.5, to create your own Font object, use
getFontFace() , getFontSize() ,
isBold() , isItalic() methods to get
the required attributes. |
String |
getFontFace()
Returns the logical name of the diplay font |
float |
getFontSize()
Returns the font size of the displayed text. |
int |
getMaxCharacters()
|
String |
getText()
Returns the actual displayed text of this annotation. |
Color |
getTextColor()
|
boolean |
isBold()
|
boolean |
isEditable()
|
boolean |
isItalic()
|
boolean |
isScaleText()
|
boolean |
isStrikethrough()
|
boolean |
isUnderscored()
|
void |
setBold(boolean fontStyleBold)
|
void |
setDefaultText(String defaultText)
Sets a default text. |
void |
setEditable(boolean editable)
Sets the ability to edit the annotation. |
void |
setFontFace(String fontFace)
Sets the logical name of the font to display. |
void |
setFontSize(float fontSize)
Sets the font size of the displayed text. |
void |
setItalic(boolean fontStyleItalic)
|
void |
setMaxCharacters(int maxCharacters)
|
void |
setScaleText(boolean scaleText)
|
void |
setStrikethrough(boolean strikethrough)
|
void |
setText(String text)
Sets the display text of this annotation. |
void |
setTextColor(Color textColor)
|
void |
setUnderscored(boolean underscored)
|
Methods inherited from class com.levigo.jadice.annotation.RectangleAnnotation |
---|
getBounds, getRectangle, getShape, setLocation, setRectangle, setSize, translate |
Methods inherited from class com.levigo.jadice.annotation.ShapeBasedAnnotation |
---|
createColorWithAlpha, getFillColor, getLineWidth, getStrokeColor, getStrokeResolution, isAllowResize, isFilled, isIconified, isLinePainted, setAllowResize, setFillColor, setFilled, setIconified, setLinePainted, setLineWidth, setStrokeColor, setStrokeResolution |
Methods inherited from class com.levigo.jadice.annotation.Annotation |
---|
clearModified, createMemento, fireAnnotationChange, getChangeHandler, getCreatedAt, getCreatedBy, getID, getInitializer, getLastModifiedAt, getLastModifiedBy, getModCount, getPermissions, getProperties, getType, initialize, isDoFireAnnotationEvents, isInitialized, isModified, restoreFrom, setChangeHandler, setCreatedBy, setCreationTimestamp, setDoFireAnnotationEvents, setID, setInitializer, setLastModifiedBy, setModified, setModifyTimestamp, setType |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected String text
protected String fontFace
protected float fontSize
protected boolean italic
protected boolean bold
protected boolean underscored
protected boolean strikethrough
protected Color textColor
protected String defaultText
protected boolean scaleText
protected boolean editable
Constructor Detail |
---|
public TextAnnotation()
Method Detail |
---|
public String getText()
public void setText(String text)
null
or empty a
default text will be set.
text
- public float getFontSize()
public void setFontSize(float fontSize)
fontSize
- The fontSize to setpublic String getFontFace()
public void setFontFace(String fontFace)
fontFace
- The fontFace to setpublic TextAnnotation clone()
clone
in class RectangleAnnotation
Object.clone()
protected void copyAttributesTo(Annotation annotation)
Annotation
copyAttributesTo
in class RectangleAnnotation
annotation
- Annotation to set attributespublic Font getFont()
Font
object, use
getFontFace()
, getFontSize()
,
isBold()
, isItalic()
methods to get
the required attributes.
Font
instancepublic Color getTextColor()
public void setTextColor(Color textColor)
public boolean isItalic()
public void setItalic(boolean fontStyleItalic)
public boolean isBold()
public void setBold(boolean fontStyleBold)
public boolean isUnderscored()
public void setUnderscored(boolean underscored)
public boolean isStrikethrough()
public void setStrikethrough(boolean strikethrough)
public void setMaxCharacters(int maxCharacters)
maxCharacters
- the maxCharacters to setpublic int getMaxCharacters()
public boolean isScaleText()
public void setScaleText(boolean scaleText)
public boolean isEditable()
public void setEditable(boolean editable)
true
= Annotation can be edited via editors (Context menu / hover editor).
false
= Annotation is not editable.
editable
- public void setDefaultText(String defaultText)
null
value
will be set via setText(String)
.
defaultText
- Default textpublic String getDefaultText()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |