Package com.levigo.jadice.annotation
Class PathAnnotation
java.lang.Object
com.levigo.jadice.annotation.Annotation
com.levigo.jadice.annotation.ShapeBasedAnnotation
com.levigo.jadice.annotation.PathAnnotation
- All Implemented Interfaces:
PermissionsProvider<Annotation>,PropertiesProvider,com.levigo.jadice.web.shared.model.annotation.internal.JwtAnnotation,Serializable,org.jadice.util.base.MementoOriginator
An annotation mostly drawn using the mouse pointer.
- See Also:
-
Field Summary
FieldsFields 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 TypeMethodDescriptionvoidAdd given point to the current path.voidclose()copy()protected voidcopyAttributesTo(Annotation annotation) Returns an integerRectanglethat completely encloses the annotation.getPath()getShape()Shape for render structurebooleanReturns a flag if annotation border is rendered.voidvoidsetLocation(double x, double y) Set the location (upper-left corner) of the annotation to the given point.voidvoidsetSize(double width, double height) Set the size of the annotation to the given size.voidtranslate(double dx, double dy) Translates thisAnnotationthe indicated distance, to the right along the x coordinate axis, and downward along the y coordinate axis.voidunclose()voidupdate()Methods inherited from class com.levigo.jadice.annotation.ShapeBasedAnnotation
getFillColor, getLineWidth, getStrokeColor, getStrokeResolution, isAllowResize, isFilled, isIconified, setAllowResize, setFillColor, setFilled, setIconified, setLinePainted, setLineWidth, 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
-
Field Details
-
path
-
-
Constructor Details
-
PathAnnotation
public PathAnnotation()
-
-
Method Details
-
prepareSerialisation
public void prepareSerialisation()- Overrides:
prepareSerialisationin classShapeBasedAnnotation
-
isLinePainted
public boolean isLinePainted()Description copied from class:ShapeBasedAnnotationReturns a flag if annotation border is rendered.- Overrides:
isLinePaintedin classShapeBasedAnnotation- Returns:
- boolean
-
update
public void update()- Specified by:
updatein classShapeBasedAnnotation
-
setSize
public void setSize(double width, double height) Description copied from class:AnnotationSet the size of the annotation to the given size. Depending on the type of annotation, this may not be possible. E.g. stamp annotations handle the sizing on their own, so they will refuse to resize themselves. AnIllegalArgumentExceptionis 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.- Specified by:
setSizein classAnnotation- Parameters:
width-height-
-
copy
-
copyAttributesTo
- Overrides:
copyAttributesToin classShapeBasedAnnotation
-
getPathIterator
-
addPoint
Add given point to the current path.- Parameters:
p- Point to add
-
getBounds
Description copied from class:ShapeBasedAnnotationReturns an integerRectanglethat completely encloses the annotation.- Specified by:
getBoundsin classShapeBasedAnnotation- Returns:
- Rectangle annotation bounding box
-
getShape
Description copied from class:ShapeBasedAnnotationShape for render structure- Specified by:
getShapein classShapeBasedAnnotation- Returns:
- Shape
-
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.- Specified by:
translatein classAnnotation- Parameters:
dx- the distance to move thisRectanglealong the x axisdy- the distance to move thisRectanglealong the y axis
-
setPath
-
getPath
-
close
public void close() -
unclose
public void unclose() -
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 classShapeBasedAnnotation- Parameters:
x- X-positiony- Y-position
-