|
Chart FX 7 for Java Server | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.softwarefx.chartfx.server.annotation.AnnotationObject
com.softwarefx.chartfx.server.annotation.AnnotationGroup
public class AnnotationGroup
Provides access to the AnnotationGroup object.
The AnnotationGroup
Class
allows you to group individual annotation objects together. Because the group object exposes all the common properties, you can change visual attributes of objects in a group with just one property call. For example, if you create a group of 10 circles, you can change the background color of all circles by invoking the AnnotationObject.setColor(java.awt.Color)
property. The AnnotationListBase
Class
exposes members that allow you to AnnotationListBase.add(com.softwarefx.chartfx.server.annotation.AnnotationObject)
, AnnotationListBase.remove(com.softwarefx.chartfx.server.annotation.AnnotationObject)
and Count objects in a group.
To create a group, first create an annotation extension object. Once you have created and added the extension object to your application you may begin creating the individual objects to be included in the group and the group object itself. Once you have created all the objects, you must add the individual objects to the group and the group to the annotation list.
Below is an example of creating a group of 3 circles:
com.softwarefx.chartfx.server.annotation.Annotations annot = new com.softwarefx.chartfx.server.annotation.Annotations();
chart1.getExtensions().add(annot);
com.softwarefx.chartfx.server.annotation.AnnotationCircle circle1 = new com.softwarefx.chartfx.server.annotation.AnnotationCircle();
circle1.setHeight(30);
circle1.setWidth(30);
circle1.getBorder().setColor(java.awt.Color.black);
circle1.attach(1, 50);
com.softwarefx.chartfx.server.annotation.AnnotationCircle circle2 = new com.softwarefx.chartfx.server.annotation.AnnotationCircle();
circle2.setHeight(30);
circle2.setWidth(30);
circle2.getBorder().setColor(java.awt.Color.black);
circle2.attach(2, 50);
com.softwarefx.chartfx.server.annotation.AnnotationCircle circle3 = new com.softwarefx.chartfx.server.annotation.AnnotationCircle();
circle3.setHeight(30);
circle3.setWidth(30);
circle3.getBorder().setColor(java.awt.Color.black);
circle3.attach(3, 50);
com.softwarefx.chartfx.server.annotation.AnnotationGroup group = new com.softwarefx.chartfx.server.annotation.AnnotationGroup();
annot.getList().add(group);
group.getList().add(circle1);
group.getList().add(circle2);
group.getList().add(circle3);
group.setColor(java.awt.Color.yellow);
group.recalcBounds();
Constructor Summary | |
---|---|
AnnotationGroup()
|
|
AnnotationGroup(AnnotationObject[] annotationObjects)
|
Method Summary | |
---|---|
Line |
getBorder()
Gets the Border. |
Color |
getColor()
Gets the Color. |
Link |
getLink()
Gets the Link object for a selected AnnotationGroup. |
AnnotationListBase |
getList()
Allows you to access the CollectionBase members used modify the annotation group. |
HatchStyle |
getPattern()
Gets the Pattern. |
void |
recalcBounds()
Used to recalculate the bounding rectangle for a group of objects. |
void |
setBorder(Line value)
Allows you to apply border attributes to a selected annotation group. |
void |
setColor(Color value)
Sets the inside fill color for the objects included in an annotation group. |
void |
setPattern(HatchStyle value)
Used to set a pattern style for a group of annotation objects. |
Methods inherited from class com.softwarefx.chartfx.server.annotation.AnnotationObject |
---|
attach, attach, attach, detach, dispose, flip, getAnchor, getHeight, getLeft, getObjectBounds, getTag, getTop, getWidth, isAllowModify, isAllowMove, isPaintBefore, isPlotAreaOnly, isVisible, refresh, rotate, setAllowModify, setAllowMove, setAnchor, setHeight, setLeft, setObjectBounds, setPaintBefore, setPlotAreaOnly, setTag, setTop, setVisible, setWidth |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AnnotationGroup()
public AnnotationGroup(AnnotationObject[] annotationObjects)
Method Detail |
---|
public Line getBorder()
Gets the Border. For more detail see setBorder(com.softwarefx.chartfx.server.Line)
.
getBorder
in class AnnotationObject
public Color getColor()
Gets the Color. For more detail see setColor(java.awt.Color)
.
getColor
in class AnnotationObject
public Link getLink()
Gets the Link object for a selected AnnotationGroup.
Developers may obtain the Link object for an annotation item using this property. Using the supported Link
Class
members, developers may configure a Link.setUrl(java.lang.String)
and Link.setTarget(java.lang.String)
for the object.
getLink
in class AnnotationObject
Link.setUrl(java.lang.String)
,
Link.setTarget(java.lang.String)
,
Link
public AnnotationListBase getList()
Allows you to access the CollectionBase members used modify the annotation group.
This property exposes the supported members of the AnnotationListBase
Class
. The supported members include AnnotationListBase.add(com.softwarefx.chartfx.server.annotation.AnnotationObject)
, AnnotationListBase.contains(com.softwarefx.chartfx.server.annotation.AnnotationObject)
, AnnotationListBase.insert(int, com.softwarefx.chartfx.server.annotation.AnnotationObject)
, AnnotationListBase.remove(com.softwarefx.chartfx.server.annotation.AnnotationObject)
.
Creating an annotation group allows you to control attributes for all the objects included in the list with one property assignment to the group.
AnnotationListBase.add(com.softwarefx.chartfx.server.annotation.AnnotationObject)
,
AnnotationListBase.contains(com.softwarefx.chartfx.server.annotation.AnnotationObject)
,
AnnotationListBase.insert(int, com.softwarefx.chartfx.server.annotation.AnnotationObject)
,
AnnotationListBase.remove(com.softwarefx.chartfx.server.annotation.AnnotationObject)
,
AnnotationObject
,
Annotations
public HatchStyle getPattern()
Gets the Pattern. For more detail see setPattern(com.softwarefx.HatchStyle)
.
getPattern
in class AnnotationObject
public void recalcBounds()
Used to recalculate the bounding rectangle for a group of objects.
This method should be invoked every time an object is added to a group or when any of the objects contained in a group is resized or moved.
AnnotationListBase.add(com.softwarefx.chartfx.server.annotation.AnnotationObject)
,
AnnotationListBase.remove(com.softwarefx.chartfx.server.annotation.AnnotationObject)
,
AnnotationObject.refresh()
,
AnnotationObject
,
AnnotationListBase
public void setBorder(Line value)
Allows you to apply border attributes to a selected annotation group.
This property provides access to the supported members of the Line
Class
. Using the supported members you can modify the Line.setColor(java.awt.Color)
, Line.setStyle(com.softwarefx.DashStyle)
, Line.setWidth(int)
, Line.setEndCap(com.softwarefx.LineCap)
and Line.setStartCap(com.softwarefx.LineCap)
of selected line annotation group.
setBorder
in class AnnotationObject
Line.setColor(java.awt.Color)
,
Line.setStyle(com.softwarefx.DashStyle)
,
Line.setWidth(int)
,
Line.setEndCap(com.softwarefx.LineCap)
,
Line.setStartCap(com.softwarefx.LineCap)
,
Line
public void setColor(Color value)
Sets the inside fill color for the objects included in an annotation group.
When setting this property for an annotation group, all objects included in the group will be set the configured color of this property. The border of the annotation objects can be modified using the setBorder(com.softwarefx.chartfx.server.Line)
property.Line.setColor(java.awt.Color)
Line
For more information regarding the Color type, please refer to the Java API Documentation.
setColor
in class AnnotationObject
Line.setColor(java.awt.Color)
,
setBorder(com.softwarefx.chartfx.server.Line)
public void setPattern(HatchStyle value)
Used to set a pattern style for a group of annotation objects.
Creating an annotation group allows you to control attributes for all the objects included in the list with one property assignment to the group.
The setBorder(com.softwarefx.chartfx.server.Line)
and setColor(java.awt.Color)
property allow you to set a border style and color for all the annotation objects in a annotation group.
setPattern
in class AnnotationObject
setBorder(com.softwarefx.chartfx.server.Line)
,
setColor(java.awt.Color)
|
http://www.softwarefx.com | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |