Package com.levigo.jadice.annotation
Class ArrowAnnotation
java.lang.Object
com.levigo.jadice.annotation.Annotation
com.levigo.jadice.annotation.ShapeBasedAnnotation
com.levigo.jadice.annotation.LineAnnotation
com.levigo.jadice.annotation.ArrowAnnotation
- 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 an arrow.
An arrow annotation could be used to point to something interesting part of the displayed document page. For this purpose it can be rotated and change its appearance color.
- See Also:
-
Field Summary
Fields inherited from class com.levigo.jadice.annotation.LineAnnotation
p1, p2, 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 an integerRectanglethat completely encloses the annotation.intReturns the head Angle in degrees.Point2D[]intReturns the head length.Point2D[]Get the points of the arrow in a point array: bottom tip edge of head arm 1 edge of head arm 2booleanReturns current head length flag.voidvoidsetHeadAngle(int headAngle) Sets the head angle in degrees.voidsetHeadLength(int headLength) Sets the head length which is defined by theisHeadLengthInPercent()value.voidsetHeadLengthInPercent(boolean headLengthInPercent) Sets the mode for thesetHeadAngle(int)value:
true - head length in percent of the total length.voidprotected voidupdateShape(LineAnnotation previousState) Update the polygon representing the arrow.Methods inherited from class com.levigo.jadice.annotation.LineAnnotation
getP1, getP2, getShape, isLinePainted, setLocation, setP1, setP1, setP2, setP2, setSize, translate, updateMethods inherited from class com.levigo.jadice.annotation.ShapeBasedAnnotation
getFillColor, getLineWidth, getStrokeColor, getStrokeResolution, isAllowResize, isFilled, isIconified, prepareSerialisation, 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
-
Constructor Details
-
ArrowAnnotation
public ArrowAnnotation()
-
-
Method Details
-
setTip
-
setBottom
-
getHeadEdges
-
updateShape
Update the polygon representing the arrow.- Overrides:
updateShapein classLineAnnotation
-
getHeadAngle
public int getHeadAngle()Returns the head Angle in degrees.- Returns:
- Head angle
-
getHeadLength
public int getHeadLength()Returns the head length.- Returns:
- Head length
-
setHeadAngle
public void setHeadAngle(int headAngle) Sets the head angle in degrees.- Parameters:
headAngle- The headAngle to set
-
setHeadLength
public void setHeadLength(int headLength) Sets the head length which is defined by theisHeadLengthInPercent()value.- Parameters:
headLength- The headLength to set
-
getPoints
Get the points of the arrow in a point array:- bottom
- tip
- edge of head arm 1
- edge of head arm 2
- Overrides:
getPointsin classLineAnnotation- Returns:
- Point2D[]
-
getBounds
Description copied from class:ShapeBasedAnnotationReturns an integerRectanglethat completely encloses the annotation.- Overrides:
getBoundsin classLineAnnotation- Returns:
- Rectangle annotation bounding box
-
copy
- Specified by:
copyin interfacecom.levigo.jadice.web.shared.model.annotation.internal.JwtAnnotation- Overrides:
copyin classLineAnnotation- See Also:
-
copyAttributesTo
- Overrides:
copyAttributesToin classLineAnnotation
-
isHeadLengthInPercent
public boolean isHeadLengthInPercent()Returns current head length flag.- Returns:
- Head length flag
-
setHeadLengthInPercent
public void setHeadLengthInPercent(boolean headLengthInPercent) Sets the mode for thesetHeadAngle(int)value:
true - head length in percent of the total length.
false - head length in pixel.
Default value is true.- Parameters:
headLengthInPercent-
-