public class ArrowAnnotation extends LineAnnotation
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.
p1, p2, shape
allowResize, fillColor, filled, iconified, linePainted, lineWidth, strokeColor, strokeResolution
createdAt, createdBy, doFireAnnotationEvents, id, initializer, isModified, lastModifiedAt, lastModifiedBy
Constructor and Description |
---|
ArrowAnnotation() |
Modifier and Type | Method and Description |
---|---|
ArrowAnnotation |
clone() |
protected void |
copyAttributesTo(Annotation annotation)
Copy annotation type related attributes to new annotation.
|
Rectangle2D |
getBounds()
Returns an integer
Rectangle that completely encloses the annotation. |
int |
getHeadAngle()
Returns the head Angle in degrees.
|
Point2D[] |
getHeadEdges() |
int |
getHeadLength()
Returns the head length.
|
Point2D[] |
getPoints()
Get the points of the arrow in a point array:
bottom
tip
edge of head arm 1
edge of head arm 2
|
boolean |
isHeadLengthInPercent()
Returns current head length flag.
|
void |
setBottom(Point2D bottom) |
void |
setHeadAngle(int headAngle)
Sets the head angle in degrees.
|
void |
setHeadLength(int headLength)
Sets the head length which is defined by the
isHeadLengthInPercent() value. |
void |
setHeadLengthInPercent(boolean headLengthInPercent)
Sets the mode for the
setHeadAngle(int) value:
true - head length in percent of the total length. |
void |
setTip(Point2D tip) |
protected void |
updateShape(LineAnnotation previousState)
Update the polygon representing the arrow.
|
getP1, getP2, getShape, setLocation, setP1, setP1, setP2, setP2, setSize, translate
createColorWithAlpha, getFillColor, getLineWidth, getStrokeColor, getStrokeResolution, isAllowResize, isFilled, isIconified, isLinePainted, setAllowResize, setFillColor, setFilled, setIconified, setLinePainted, setLineWidth, setStrokeColor, setStrokeResolution
clearModified, createMemento, fireAnnotationChange, getChangeHandler, getCreatedAt, getCreatedBy, getID, getInitializer, getLastModifiedAt, getLastModifiedBy, getModCount, getPermissions, getProperties, getType, initialize, isDoFireAnnotationEvents, isInitialized, isLoadedAnnotation, isModified, restoreFrom, setChangeHandler, setCreatedBy, setCreationTimestamp, setDoFireAnnotationEvents, setID, setInitializer, setLastModifiedBy, setModified, setModifyTimestamp, setType
public void setTip(Point2D tip)
public void setBottom(Point2D bottom)
public Point2D[] getHeadEdges()
protected void updateShape(LineAnnotation previousState)
updateShape
in class LineAnnotation
public int getHeadAngle()
public int getHeadLength()
public void setHeadAngle(int headAngle)
headAngle
- The headAngle to setpublic void setHeadLength(int headLength)
isHeadLengthInPercent()
value.headLength
- The headLength to setpublic Point2D[] getPoints()
getPoints
in class LineAnnotation
public Rectangle2D getBounds()
ShapeBasedAnnotation
Rectangle
that completely encloses the annotation.getBounds
in class LineAnnotation
public ArrowAnnotation clone()
clone
in class LineAnnotation
Annotation.clone()
protected void copyAttributesTo(Annotation annotation)
Annotation
copyAttributesTo
in class LineAnnotation
annotation
- Annotation to set attributespublic boolean isHeadLengthInPercent()
public void setHeadLengthInPercent(boolean headLengthInPercent)
setHeadAngle(int)
value:
Copyright © 2024 levigo holding gmbh. All rights reserved.