public final class AnnotationPolygon extends AnnotationObject
Provides access to the AnnotationPolygon object.
The AnnotationPolygon
class allows you to create polygon annotation objects in your charts. The supported members allow you to configure the vertices for the object as well as many other attributes.
Constructor and Description |
---|
AnnotationPolygon()
Constructs a newly allocated AnnotationPolygon object
|
AnnotationPolygon(java.awt.Point[] points)
Constructs a newly allocated AnnotationPolygon object
|
Modifier and Type | Method and Description |
---|---|
int |
getNumVertex()
Allows you to read the number of vertices associated with an annotation polygon object.
|
java.awt.Point[] |
getVertices()
Used to set the vertices for an annotation polygon object.
|
boolean |
isClosed()
Instructs Chart FX to draw a line from the beginning vertex to the ending vertex.
|
void |
recalcBounds()
Instruct Chart FX to recalculate the bounds for an annotation polygon object.
|
void |
resetClosed()
Set the property Closed to its default value.
|
void |
setClosed(boolean value)
Instructs Chart FX to draw a line from the beginning vertex to the ending vertex.
|
void |
setVertices(java.awt.Point[] value)
Used to set the vertices for an annotation polygon object.
|
attach, attach, attach, attach, attach, attach, attach, detach, flip, getAnchor, getBorder, getColor, getHeight, getLeft, getLink, getObjectBounds, getPattern, getTag, getTop, getWidth, isAllowModify, isAllowMove, isPaintBefore, isPlotAreaOnly, isVisible, refresh, resetAllowModify, resetAllowMove, resetAnchor, resetBoundsNormalized, resetColor, resetPaintBefore, resetPattern, resetPlotAreaOnly, resetVisible, rotate, setAllowModify, setAllowMove, setAnchor, setBorder, setColor, setHeight, setLeft, setObjectBounds, setPaintBefore, setPattern, setPlotAreaOnly, setTag, setTop, setVisible, setWidth
public AnnotationPolygon()
public AnnotationPolygon(java.awt.Point[] points)
points
- public boolean isClosed()
resetClosed
public void setClosed(boolean value)
value
- resetClosed
public int getNumVertex()
public java.awt.Point[] getVertices()
Used to set the vertices for an annotation polygon object.
When configuring the vertices for an annotation polygon, you will need to create an array of points. Each of the points (X,Y) will represent a vertex for the polygon you are creating. The attach
method may NOT be used when positioning the AnnotationPolygon object. The AnnotationPolygon
is the only annotation object that does not support the attach
method.
A polygon is usually a closed shape with three or more straight sides. For example, a triangle is a polygon with three sides, a rectangle is a polygon with four sides, and a pentagon is a polygon with five sides.
The isClosed
method allows you to specify that a selected polygon object will be an open or closed geometric shape. If a selected polygon object is not closed, you will not be able to color in inside area using the setColor
method.
You may read the number of vertices of a selected polygon object using the setNumVertex
method.
To create a polygon in the a chart:
public void setVertices(java.awt.Point[] value)
Used to set the vertices for an annotation polygon object.
When configuring the vertices for an annotation polygon, you will need to create an array of points. Each of the points (X,Y) will represent a vertex for the polygon you are creating. The attach
method may NOT be used when positioning the AnnotationPolygon object. The AnnotationPolygon
is the only annotation object that does not support the attach
method.
A polygon is usually a closed shape with three or more straight sides. For example, a triangle is a polygon with three sides, a rectangle is a polygon with four sides, and a pentagon is a polygon with five sides.
The isClosed
method allows you to specify that a selected polygon object will be an open or closed geometric shape. If a selected polygon object is not closed, you will not be able to color in inside area using the setColor
method.
You may read the number of vertices of a selected polygon object using the setNumVertex
method.
To create a polygon in the a chart:
value
- public void recalcBounds()
This method should be invoked every time the vertex of a polygon object is modified. Recalculating the bounds will instruct Chart FX to redraw the polygon object with the new attributes.
Recalculate the bounds for a polygon object:
public void resetClosed()
isClosed
2014 Software FX, Inc. All Rights Reserved. Chart FX is a registered trademark of Software FX, Inc
All other names are trademarks or registered trademarks of their respective owners.