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, underscoredFields inherited from class com.levigo.jadice.annotation.RectangleAnnotation
rect, shapeFields inherited from class com.levigo.jadice.annotation.ShapeBasedAnnotation
allowResize, fillColor, filled, iconified, linePainted, lineWidth, strokeColor, strokeResolutionFields 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 voidcopyAttributesTo(Annotation annotation) Returns the bounds of this annotationintgetGap()Returns the insets width of stamp border and displayed textintgetLineCount(String text) intGets the roration angle.getShape()Shape for render structurebooleanbooleanbooleanvoidsetAllowMultipleTextlines(boolean allowMultipleTextlines) voidsetBold(boolean fontStyleBold) voidsetFontFace(String fontFace) Sets the logical name of the font to display.voidsetFontSize(float fontSize) Sets the font size of the displayed text.voidsetGap(int gap) Returns the insets gap width of stamp border and displayed textvoidsetHorizontalAlignment(HorizontalAlignment horizontalAlignment) Sets the horizontal alignment of the text within the annotation.voidsetIgnoreLineWidth(boolean ignoreLineWidth) Flag to ignore line width for annotation size update.voidsetItalic(boolean fontStyleItalic) voidsetLineWidth(float newValue) Sets the border line width of this annotation.voidsetLocation(double x, double y) Set the location (upper-left corner) of the annotation to the given point.voidsetRotation(int rotation) Sets the rotation.voidSets the display text of this annotation.voidsetUseCenterAsOrigin(boolean useCenterAsOrigin) voidtranslate(double dx, double dy) Translates thisAnnotationthe 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, setUnderscoredMethods inherited from class com.levigo.jadice.annotation.RectangleAnnotation
getRectangle, setRectangle, updateMethods inherited from class com.levigo.jadice.annotation.ShapeBasedAnnotation
getFillColor, getLineWidth, getStrokeColor, getStrokeResolution, isAllowResize, isFilled, isIconified, isLinePainted, prepareSerialisation, setAllowResize, setFillColor, setFilled, setIconified, setLinePainted, setStrokeColor, setStrokeResolutionMethods 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:TextAnnotationSets the display text of this annotation. If the given text isnullor empty a default text will be set.- Overrides:
setTextin 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:
getRotationin 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:
setRotationin classTextAnnotation- Parameters:
rotation- The rotation to set
-
setLocation
public void setLocation(double x, double y) Description copied from class:ShapeBasedAnnotationSet 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:
setLocationin classTextAnnotation- Parameters:
x- X-positiony- Y-position
-
getLineCount
-
setFontSize
public void setFontSize(float fontSize) Description copied from class:TextAnnotationSets the font size of the displayed text.- Overrides:
setFontSizein classTextAnnotation- Parameters:
fontSize- The fontSize to set
-
setHorizontalAlignment
Description copied from class:TextAnnotationSets 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:
setHorizontalAlignmentin classTextAnnotation- Parameters:
horizontalAlignment- The alignment for the text.
-
getPathIterator
- Overrides:
getPathIteratorin classTextAnnotation- Returns:
- Returns the PathIterator for the rotated shape
-
getBounds
Returns the bounds of this annotation- Overrides:
getBoundsin classTextAnnotation- Returns:
- rectangle the bounds of the annotations rectangle
-
translate
public void translate(double dx, double dy) Description copied from class:AnnotationTranslates thisAnnotationthe indicated distance, to the right along the x coordinate axis, and downward along the y coordinate axis.- Overrides:
translatein classTextAnnotation- Parameters:
dx- the distance to move thisRectanglealong the x axisdy- the distance to move thisRectanglealong the y axis
-
copy
- Specified by:
copyin interfacecom.levigo.jadice.web.shared.model.annotation.internal.JwtAnnotation- Overrides:
copyin classTextAnnotation
-
copyAttributesTo
- Overrides:
copyAttributesToin classTextAnnotation
-
isAllowMultipleTextlines
public boolean isAllowMultipleTextlines() -
setAllowMultipleTextlines
public void setAllowMultipleTextlines(boolean allowMultipleTextlines) -
getShape
Description copied from class:ShapeBasedAnnotationShape for render structure- Overrides:
getShapein classRectangleAnnotation- Returns:
- Shape
-
setFontFace
Description copied from class:TextAnnotationSets the logical name of the font to display.- Overrides:
setFontFacein classTextAnnotation- Parameters:
fontFace- The fontFace to set
-
setItalic
public void setItalic(boolean fontStyleItalic) - Overrides:
setItalicin classTextAnnotation
-
setBold
public void setBold(boolean fontStyleBold) - Overrides:
setBoldin classTextAnnotation
-
setLineWidth
public void setLineWidth(float newValue) Description copied from class:ShapeBasedAnnotationSets the border line width of this annotation.Notice, if this annotation has disabled the line painted attribute
- Overrides:
setLineWidthin 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-
-