|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.levigo.jadice.annotation.Annotation com.levigo.jadice.annotation.ShapeBasedAnnotation
public abstract class ShapeBasedAnnotation
An abstract base class for visual shape based annotations.
Field Summary | |
---|---|
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
|
Fields inherited from class com.levigo.jadice.annotation.Annotation |
---|
createdAt, createdBy, doFireAnnotationEvents, id, initializer, isModified, lastModifiedAt, lastModifiedBy |
Constructor Summary | |
---|---|
ShapeBasedAnnotation()
|
Method Summary | |
---|---|
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)
|
Methods inherited from class com.levigo.jadice.annotation.Annotation |
---|
clearModified, clone, createMemento, fireAnnotationChange, getChangeHandler, getCreatedAt, getCreatedBy, getID, getInitializer, getLastModifiedAt, getLastModifiedBy, getModCount, getPermissions, getProperties, getType, initialize, isDoFireAnnotationEvents, isInitialized, isModified, restoreFrom, setChangeHandler, setCreatedBy, setCreationTimestamp, setDoFireAnnotationEvents, setID, setInitializer, setLastModifiedBy, setModified, setModifyTimestamp, setSize, setType, translate |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected float lineWidth
protected boolean linePainted
protected boolean filled
protected boolean allowResize
protected Color fillColor
protected Color strokeColor
protected boolean iconified
protected Resolution strokeResolution
Constructor Detail |
---|
public ShapeBasedAnnotation()
Method Detail |
---|
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.
protected static Color createColorWithAlpha(Color color, float alpha)
public boolean isFilled()
public void setFilled(boolean filled)
filled
- The filled to setpublic boolean isLinePainted()
public void setLinePainted(boolean linePainted)
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)
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)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |