public abstract class ShapeBasedAnnotation extends Annotation
Modifier and Type | Field and Description |
---|---|
protected boolean |
allowResize
Flag, indicating whether resizing is allowed
|
protected Color |
fillColor |
protected boolean |
filled |
protected boolean |
iconified |
protected boolean |
linePainted |
protected float |
lineWidth |
protected Color |
strokeColor |
protected Resolution |
strokeResolution |
createdAt, createdBy, doFireAnnotationEvents, id, initializer, isModified, lastModifiedAt, lastModifiedBy
Constructor and Description |
---|
ShapeBasedAnnotation() |
Modifier and Type | Method and Description |
---|---|
protected void |
copyAttributesTo(Annotation annotation)
Copy annotation type related attributes to new annotation.
|
protected static Color |
createColorWithAlpha(Color color,
float alpha) |
abstract Rectangle2D |
getBounds()
Returns an integer
Rectangle that completely encloses the annotation. |
Color |
getFillColor()
Returns the current fill color
|
float |
getLineWidth()
Gets the border line width of this annotation.
|
abstract Shape |
getShape()
Shape for render structure
|
Color |
getStrokeColor()
Returns the current stroke color
|
Resolution |
getStrokeResolution() |
boolean |
isAllowResize()
Returns a flag if annotation could be resized
|
boolean |
isFilled()
Returns a flag indicating if annotation is rendered with a background color.
|
boolean |
isIconified() |
boolean |
isLinePainted()
Returns a flag if annotation border is rendered.
|
void |
setAllowResize(boolean allowResize)
Sets a flag if annotation is resizeable
|
void |
setFillColor(Color fillColor)
Sets the fill color (used for filled areas)
|
void |
setFilled(boolean filled)
Sets a flag indicating if annotation is rendered with a background color.
|
void |
setIconified(boolean iconified) |
void |
setLinePainted(boolean linePainted)
Sets a flag if annotation border is rendered.
|
void |
setLineWidth(float newValue)
Sets the border line width of this annotation.
|
void |
setLocation(double x,
double y)
Set the location (upper-left corner) of the annotation to the given point.
|
void |
setStrokeColor(Color strokeColor)
Sets the stroke color (used for lines, borders)
|
void |
setStrokeResolution(Resolution strokeResolution) |
clearModified, clone, 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, setSize, setType, translate
protected float lineWidth
protected boolean linePainted
protected boolean filled
protected boolean allowResize
protected Color fillColor
protected Color strokeColor
protected boolean iconified
protected Resolution strokeResolution
public float getLineWidth()
Notice, if this annotation has disabled the line painted attribute
and
,
the border line will not be rendered.
public void setLineWidth(float newValue)
Notice, if this annotation has disabled the line painted attribute
newValue
- the new line widthand
,
the border line will not be rendered.
public boolean isFilled()
public void setFilled(boolean filled)
filled
- The filled to setpublic boolean isLinePainted()
public void setLinePainted(boolean linePainted)
public void setLocation(double x, double y)
setLocation
in class Annotation
x
- X-positiony
- Y-positionprotected void copyAttributesTo(Annotation annotation)
Annotation
copyAttributesTo
in class Annotation
annotation
- Annotation to set attributespublic abstract Shape getShape()
public boolean isAllowResize()
public void setAllowResize(boolean allowResize)
public Color getFillColor()
public void setFillColor(Color fillColor)
fillColor
- New fill colorpublic void setStrokeColor(Color strokeColor)
strokeColor
- New stroke colorpublic Color getStrokeColor()
public abstract Rectangle2D getBounds()
Rectangle
that completely encloses the annotation.getBounds
in class Annotation
public Resolution getStrokeResolution()
public void setStrokeResolution(Resolution strokeResolution)
public boolean isIconified()
public void setIconified(boolean iconified)
Copyright © 2024 levigo holding gmbh. All rights reserved.