Package com.levigo.jadice.annotation
Class StampAnnotation
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
- All Implemented Interfaces:
PermissionsProvider<Annotation>
,PropertiesProvider
,com.levigo.jadice.web.shared.model.annotation.internal.JwtAnnotation
,Serializable
,org.jadice.util.base.MementoOriginator
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.
- See Also:
-
Field Summary
Fields inherited from class com.levigo.jadice.annotation.TextAnnotation
bold, defaultText, editable, fontFace, fontSize, horizontalAlignment, italic, scaleText, strikethrough, text, textColor, underscored
Fields inherited from class com.levigo.jadice.annotation.RectangleAnnotation
rect, 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
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncopy()
protected void
copyAttributesTo
(Annotation annotation) Returns the bounds of this annotationint
getGap()
Returns the insets width of stamp border and displayed textint
getLineCount
(String text) int
Gets the roration angle.getShape()
Shape for render structureboolean
boolean
boolean
void
setAllowMultipleTextlines
(boolean allowMultipleTextlines) 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 textvoid
setHorizontalAlignment
(HorizontalAlignment horizontalAlignment) Sets the horizontal alignment of the text within the annotation.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
Sets the display text of this annotation.void
setUseCenterAsOrigin
(boolean useCenterAsOrigin) void
translate
(double dx, double dy) Translates thisAnnotation
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, getFontFace, getFontSize, getHorizontalAlignment, getMaxCharacters, getText, getTextColor, isBold, isEditable, isItalic, isScaleText, isStrikethrough, isUnderscored, setDefaultText, setEditable, setMaxCharacters, setScaleText, setSize, setStrikethrough, setTextColor, setUnderscored
Methods inherited from class com.levigo.jadice.annotation.RectangleAnnotation
getRectangle, setRectangle, update
Methods inherited from class com.levigo.jadice.annotation.ShapeBasedAnnotation
getFillColor, getLineWidth, getStrokeColor, getStrokeResolution, isAllowResize, isFilled, isIconified, isLinePainted, prepareSerialisation, setAllowResize, setFillColor, setFilled, setIconified, setLinePainted, setStrokeColor, setStrokeResolution
Methods inherited from class com.levigo.jadice.annotation.Annotation
clearModified, clone, createMemento, fireAnnotationChange, getChangeHandler, getCreatedAt, getCreatedBy, getID, getInitializer, getLastModifiedAt, getLastModifiedBy, getModCount, getPermissions, getProfileId, getProperties, getType, getTypeName, initialize, isDoFireAnnotationEvents, isInitialized, isModified, restoreFrom, setChangeHandler, setCreatedBy, setCreationTimestamp, setDoFireAnnotationEvents, setID, setInitializer, setLastModifiedBy, setModified, setModifyTimestamp, setProfileId, setType, setTypeName
-
Constructor Details
-
StampAnnotation
public StampAnnotation()
-
-
Method Details
-
isUseCenterAsOrigin
public boolean isUseCenterAsOrigin() -
setUseCenterAsOrigin
public void setUseCenterAsOrigin(boolean useCenterAsOrigin) -
setText
Description copied from class:TextAnnotation
Sets the display text of this annotation. If the given text isnull
or empty a default text will be set.- Overrides:
setText
in classTextAnnotation
- Parameters:
text
-- See Also:
-
getGap
public int getGap()Returns the insets width of stamp border and displayed text- Returns:
- int gap between border and text
-
getRotation
public int getRotation()Gets the roration angle.- Overrides:
getRotation
in classTextAnnotation
- Returns:
- int
-
setGap
public void setGap(int gap) Returns the insets gap width of stamp border and displayed text- Parameters:
gap
- gap between border and text
-
setRotation
public void setRotation(int rotation) Sets the rotation.- Overrides:
setRotation
in classTextAnnotation
- Parameters:
rotation
- The rotation to set
-
setLocation
public void setLocation(double x, double y) Description copied from class:ShapeBasedAnnotation
Set the location (upper-left corner) of the annotation to the given point. 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.- Overrides:
setLocation
in classTextAnnotation
- Parameters:
x
- X-positiony
- Y-position
-
getLineCount
-
setFontSize
public void setFontSize(float fontSize) Description copied from class:TextAnnotation
Sets the font size of the displayed text.- Overrides:
setFontSize
in classTextAnnotation
- Parameters:
fontSize
- The fontSize to set
-
setHorizontalAlignment
Description copied from class:TextAnnotation
Sets the horizontal alignment of the text within the annotation. This effects the rendered text and the text while editing the annotation. See also:HorizontalAlignment
- Overrides:
setHorizontalAlignment
in classTextAnnotation
- Parameters:
horizontalAlignment
- The alignment for the text.
-
getPathIterator
- Overrides:
getPathIterator
in classTextAnnotation
- Returns:
- Returns the PathIterator for the rotated shape
-
getBounds
Returns the bounds of this annotation- Overrides:
getBounds
in classTextAnnotation
- Returns:
- rectangle the bounds of the annotations rectangle
-
translate
public void translate(double dx, double dy) Description copied from class:Annotation
Translates thisAnnotation
the indicated distance, to the right along the x coordinate axis, and downward along the y coordinate axis.- Overrides:
translate
in classTextAnnotation
- Parameters:
dx
- the distance to move thisRectangle
along the x axisdy
- the distance to move thisRectangle
along the y axis
-
copy
- Specified by:
copy
in interfacecom.levigo.jadice.web.shared.model.annotation.internal.JwtAnnotation
- Overrides:
copy
in classTextAnnotation
-
copyAttributesTo
- Overrides:
copyAttributesTo
in classTextAnnotation
-
isAllowMultipleTextlines
public boolean isAllowMultipleTextlines() -
setAllowMultipleTextlines
public void setAllowMultipleTextlines(boolean allowMultipleTextlines) -
getShape
Description copied from class:ShapeBasedAnnotation
Shape for render structure- Overrides:
getShape
in classRectangleAnnotation
- Returns:
- Shape
-
setFontFace
Description copied from class:TextAnnotation
Sets the logical name of the font to display.- Overrides:
setFontFace
in classTextAnnotation
- Parameters:
fontFace
- The fontFace to set
-
setItalic
public void setItalic(boolean fontStyleItalic) - Overrides:
setItalic
in classTextAnnotation
-
setBold
public void setBold(boolean fontStyleBold) - Overrides:
setBold
in classTextAnnotation
-
setLineWidth
public void setLineWidth(float newValue) Description copied from class:ShapeBasedAnnotation
Sets the border line width of this annotation.Notice, if this annotation has disabled the line painted attribute
- Overrides:
setLineWidth
in classShapeBasedAnnotation
- Parameters:
newValue
- the new line width- See Also:
-
isIgnoreLineWidth
public boolean isIgnoreLineWidth() -
setIgnoreLineWidth
public void setIgnoreLineWidth(boolean ignoreLineWidth) Flag to ignore line width for annotation size update.- Parameters:
ignoreLineWidth
-
-