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, 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 an integerRectangle
that completely encloses the annotation.int
Returns the head Angle in degrees.Point2D[]
int
Returns 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 2boolean
Returns current head length flag.void
void
setHeadAngle
(int headAngle) Sets the head angle in degrees.void
setHeadLength
(int headLength) Sets the head length which is defined by theisHeadLengthInPercent()
value.void
setHeadLengthInPercent
(boolean headLengthInPercent) Sets the mode for thesetHeadAngle(int)
value:
true - head length in percent of the total length.void
protected void
updateShape
(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, update
Methods inherited from class com.levigo.jadice.annotation.ShapeBasedAnnotation
getFillColor, getLineWidth, getStrokeColor, getStrokeResolution, isAllowResize, isFilled, isIconified, prepareSerialisation, setAllowResize, setFillColor, setFilled, setIconified, setLinePainted, setLineWidth, 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
-
ArrowAnnotation
public ArrowAnnotation()
-
-
Method Details
-
setTip
-
setBottom
-
getHeadEdges
-
updateShape
Update the polygon representing the arrow.- Overrides:
updateShape
in 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:
getPoints
in classLineAnnotation
- Returns:
- Point2D[]
-
getBounds
Description copied from class:ShapeBasedAnnotation
Returns an integerRectangle
that completely encloses the annotation.- Overrides:
getBounds
in classLineAnnotation
- Returns:
- Rectangle annotation bounding box
-
copy
- Specified by:
copy
in interfacecom.levigo.jadice.web.shared.model.annotation.internal.JwtAnnotation
- Overrides:
copy
in classLineAnnotation
- See Also:
-
copyAttributesTo
- Overrides:
copyAttributesTo
in 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
-
-