|
|||||||||
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 com.levigo.jadice.annotation.StampAnnotation
public class StampAnnotation
An annotation looking like a stamp.
An stamp annotation could be used to set an entrance day stamp on a interesting part of the displayed document page. For this purpose it can be rotated, changed its appearance color and text style.
Field Summary |
---|
Fields inherited from class com.levigo.jadice.annotation.TextAnnotation |
---|
bold, defaultText, editable, fontFace, fontSize, italic, scaleText, strikethrough, text, textColor, 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 | |
---|---|
StampAnnotation()
|
Method Summary | |
---|---|
StampAnnotation |
clone()
|
protected void |
copyAttributesTo(Annotation annotation)
Copy annotation type related attributes to new annotation. |
Rectangle2D |
getBounds()
Returns the bounds of this annotation |
int |
getGap()
Returns the insets width of stamp border and displayed text |
int |
getLineCount(String text)
|
PathIterator |
getPathIterator()
|
int |
getRotation()
Gets the rotation angle. |
RectangularShape |
getShape()
Shape for render structure |
boolean |
isAllowMultipleTextlines()
|
boolean |
isAllowRotation()
Returns current rotation handle flag. |
boolean |
isIgnoreLineWidth()
|
boolean |
isUseCenterAsOrigin()
|
void |
setAllowMultipleTextlines(boolean allowMultipleTextlines)
|
void |
setAllowRotation(boolean allowRotation)
Set flag to enable/disable the rotation handle. |
void |
setBold(boolean fontStyleBold)
|
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 |
setGap(int gap)
Returns the insets gap width of stamp border and displayed text |
void |
setIgnoreLineWidth(boolean ignoreLineWidth)
Flag to ignore line width for annotation size update. |
void |
setItalic(boolean fontStyleItalic)
|
void |
setLineWidth(float newValue)
Sets the border line width of this annotation. |
void |
setLocation(double x,
double y)
Set the location (upper-left corner) of the annotation to the given point. |
void |
setRotation(int rotation)
Sets the rotation. |
void |
setSize(double width,
double height)
Set the size of the annotation to the given size. |
void |
setText(String text)
Sets the display text of this annotation. |
void |
setUseCenterAsOrigin(boolean useCenterAsOrigin)
|
void |
translate(double dx,
double dy)
Translates this Annotation the indicated distance, to the right along the x
coordinate axis, and downward along the y coordinate axis. |
Methods inherited from class com.levigo.jadice.annotation.TextAnnotation |
---|
getDefaultText, getFont, getFontFace, getFontSize, getMaxCharacters, getText, getTextColor, isBold, isEditable, isItalic, isScaleText, isStrikethrough, isUnderscored, setDefaultText, setEditable, setMaxCharacters, setScaleText, setStrikethrough, setTextColor, setUnderscored |
Methods inherited from class com.levigo.jadice.annotation.RectangleAnnotation |
---|
getRectangle, setRectangle |
Methods inherited from class com.levigo.jadice.annotation.ShapeBasedAnnotation |
---|
createColorWithAlpha, getFillColor, getLineWidth, getStrokeColor, getStrokeResolution, isAllowResize, isFilled, isIconified, isLinePainted, setAllowResize, setFillColor, setFilled, setIconified, setLinePainted, 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 |
Constructor Detail |
---|
public StampAnnotation()
Method Detail |
---|
public boolean isUseCenterAsOrigin()
public void setUseCenterAsOrigin(boolean useCenterAsOrigin)
public void setText(String text)
TextAnnotation
null
or empty a
default text will be set.
setText
in class TextAnnotation
TextAnnotation.setText(java.lang.String)
public int getGap()
public int getRotation()
public void setGap(int gap)
gap
- gap between border and textpublic void setRotation(int rotation)
rotation
- The rotation to setpublic int getLineCount(String text)
public void setFontSize(float fontSize)
TextAnnotation
setFontSize
in class TextAnnotation
fontSize
- The fontSize to setpublic PathIterator getPathIterator()
public Rectangle2D getBounds()
getBounds
in class RectangleAnnotation
public void setSize(double width, double height)
Annotation
IllegalArgumentException
is thrown in this case.
Caveat: it is currently necessary, to force a repaint on the viewer
in order to make the results of the modification visible. Moreover there
are no modification events fired on the page and document. This will change
in the future.
setSize
in class RectangleAnnotation
public void translate(double dx, double dy)
Annotation
Annotation
the indicated distance, to the right along the x
coordinate axis, and downward along the y coordinate axis.
translate
in class RectangleAnnotation
dx
- the distance to move this Rectangle
along the x axisdy
- the distance to move this Rectangle
along the y axispublic void setLocation(double x, double y)
ShapeBasedAnnotation
setLocation
in class RectangleAnnotation
x
- X-positiony
- Y-positionpublic StampAnnotation clone()
clone
in class TextAnnotation
Object.clone()
protected void copyAttributesTo(Annotation annotation)
Annotation
copyAttributesTo
in class TextAnnotation
annotation
- Annotation to set attributespublic boolean isAllowMultipleTextlines()
public void setAllowMultipleTextlines(boolean allowMultipleTextlines)
public RectangularShape getShape()
ShapeBasedAnnotation
getShape
in class RectangleAnnotation
public void setFontFace(String fontFace)
TextAnnotation
setFontFace
in class TextAnnotation
fontFace
- The fontFace to setpublic void setItalic(boolean fontStyleItalic)
setItalic
in class TextAnnotation
public void setBold(boolean fontStyleBold)
setBold
in class TextAnnotation
public boolean isAllowRotation()
public void setAllowRotation(boolean allowRotation)
allowRotation
- public void setLineWidth(float newValue)
ShapeBasedAnnotation
Notice, if this annotation has disabled the line painted attribute
setLineWidth
in class ShapeBasedAnnotation
newValue
- the new line widthand
,
the border line will not be rendered.
public boolean isIgnoreLineWidth()
public void setIgnoreLineWidth(boolean ignoreLineWidth)
ignoreLineWidth
-
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |