|
Chart FX for Java 6.5 | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object SoftwareFX.ChartFX.Annotation.AnnotationObject SoftwareFX.ChartFX.Annotation.AnnotationGroup
public final 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(java.lang.Object)
, AnnotationListBase.remove(java.lang.Object)
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:
SoftwareFX.ChartFX.Annotation.AnnotationX annot = new SoftwareFX.ChartFX.Annotation.AnnotationX();
chart1.getExtensions().add(annot);
SoftwareFX.ChartFX.Annotation.AnnotationCircle circle1 = new SoftwareFX.ChartFX.Annotation.AnnotationCircle();
circle1.setHeight(30);
circle1.setWidth(30);
circle1.getBorder().setColor(java.awt.Color.BLACK);
circle1.attach(1, 50);
SoftwareFX.ChartFX.Annotation.AnnotationCircle circle2 = new SoftwareFX.ChartFX.Annotation.AnnotationCircle();
circle2.setHeight(30);
circle2.setWidth(30);
circle2.getBorder().setColor(java.awt.Color.BLACK);
circle2.attach(2, 50);
SoftwareFX.ChartFX.Annotation.AnnotationCircle circle3 = new SoftwareFX.ChartFX.Annotation.AnnotationCircle();
circle3.setHeight(30);
circle3.setWidth(30);
circle3.getBorder().setColor(java.awt.Color.BLACK);
circle3.attach(3, 50);
SoftwareFX.ChartFX.Annotation.AnnotationGroup group = new SoftwareFX.ChartFX.Annotation.AnnotationGroup();
annot.getList().add(group);
group.getList().add(circle1);
group.getList().add(circle2);
group.getList().add(circle3);
group.setPattern(HatchStyle.DARKUPWARDDIAGONAL);
group.setColor(java.awt.Color.YELLOW);
group.recalcBounds();
Constructor Summary | |
---|---|
AnnotationGroup()
|
|
AnnotationGroup(AnnotationObject annotationObjects)
|
Method Summary | |
---|---|
Line |
getBorder()
Gets the Border. |
java.awt.Color |
getColor()
Gets the Color. |
AnnotationListBase |
getList()
Allows you to access the CollectionBase members used modify the annotation group. |
AnnotationObject |
getList(int n)
Deprecated. You should use getList() instead. |
int |
getPattern()
Gets the Pattern. |
java.lang.String |
getURL()
Deprecated. You should use AnnotationGroup.getLink().getUrl instead. |
java.lang.String |
getURLTarget()
Deprecated. You should use AnnotationGroup.getLink().getTarget instead. |
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(java.awt.Color value)
Sets the inside fill color for the objects included in an annotation group. |
void |
setPattern(int value)
Used to set a pattern style for a group of annotation objects. |
void |
setURL(java.lang.String value)
Deprecated. You should use AnnotationGroup.getLink().setUrl instead. |
void |
setURLTarget(java.lang.String value)
Deprecated. You should use AnnotationGroup.getLink().setTarget instead. |
Methods inherited from class SoftwareFX.ChartFX.Annotation.AnnotationObject |
---|
attach, attach, attach, detach, flip, getAnchor, getHeight, getLeft, getLink, getObjectBounds, getTag, getTop, getWidth, isAllowModify, isAllowMove, isDrawingArea, isPaintBefore, isVisible, refresh, rotate, setAllowModify, setAllowMove, setAnchor, setDrawingArea, setHeight, setLeft, setObjectBounds, setPaintBefore, 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(SoftwareFX.ChartFX.Annotation.Line)
.
getBorder
in class AnnotationObject
public java.awt.Color getColor()
Gets the Color. For more detail see setColor(java.awt.Color)
.
getColor
in class AnnotationObject
public AnnotationObject getList(int n)
getList()
instead.
public AnnotationListBase getList()
Allows you to access the CollectionBase members used modify the annotation group.
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.getItem(int)
,
AnnotationListBase.add(java.lang.Object)
,
AnnotationListBase.contains(java.lang.Object)
,
AnnotationListBase.remove(java.lang.Object)
,
AnnotationObject
,
AnnotationX
public int getPattern()
Gets the Pattern. For more detail see setPattern(int)
.
getPattern
in class AnnotationObject
public java.lang.String getURL()
AnnotationGroup.getLink().getUrl
instead.
getURL
in class AnnotationObject
AnnotationObject.getLink()
public java.lang.String getURLTarget()
AnnotationGroup.getLink().getTarget
instead.
getURLTarget
in class AnnotationObject
AnnotationObject.getLink()
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(java.lang.Object)
,
AnnotationListBase.remove(java.lang.Object)
,
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(int)
, Line.setWidth(int)
, Line.setEndCap(int)
and Line.setStartCap(int)
of selected line annotation group.
setBorder
in class AnnotationObject
Line.setColor(java.awt.Color)
,
Line.setStyle(int)
,
Line.setWidth(int)
,
Line.setEndCap(int)
,
Line.setStartCap(int)
,
Line
public void setColor(java.awt.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(SoftwareFX.ChartFX.Annotation.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(SoftwareFX.ChartFX.Annotation.Line)
public void setPattern(int value)
Used to set a pattern style for a group of annotation objects.
HatchStyle :
Specifies the different hatch patterns available.Value | Description |
---|---|
HatchStyle.BACKWARD_DIAGONAL | A pattern of lines on a diagonal from upper right to lower left. |
HatchStyle.CROSS | Specifies horizontal and vertical lines that cross. |
HatchStyle.DARK_DOWNWARD_DIAGONAL | Specifies diagonal lines that slant to the right from top points to bottom points, are spaced 50 percent closer together than, and are twice the width of ForwardDiagonal. This hatch pattern is not antialiased. |
HatchStyle.DARK_HORIZONTAL | Specifies horizontal lines that are spaced 50 percent closer together than Horizontal and are twice the width of HatchStyleHorizontal. |
HatchStyle.DARK_UPWARD_DIAGONAL | Specifies diagonal lines that slant to the left from top points to bottom points, are spaced 50 percent closer together than BackwardDiagonal, and are twice its width, but the lines are not antialiased. |
HatchStyle.DARK_VERTICAL | Specifies vertical lines that are spaced 50 percent closer together than Vertical and are twice its width. |
HatchStyle.DASHED_DOWNWARD_DIAGONAL | Specifies dashed diagonal lines, that slant to the right from top points to bottom points. |
HatchStyle.DASHED_HORIZONTAL | Specifies dashed horizontal lines. |
HatchStyle.DASHED_UPWARD_DIAGONAL | Specifies dashed diagonal lines, that slant to the left from top points to bottom points. |
HatchStyle.DASHED_VERTICAL | Specifies dashed vertical lines. |
HatchStyle.DIAGONAL_BRICK | Specifies a hatch that has the appearance of layered bricks that slant to the left from top points to bottom points. |
HatchStyle.DIAGONAL_CROSS | Specifies forward diagonal and backward diagonal lines that cross. The lines are antialiased. |
HatchStyle.DIVOT | Specifies a hatch that has the appearance of divots. |
HatchStyle.DOTTED_DIAMOND | Specifies forward diagonal and backward diagonal lines, each of which is composed of dots, that cross. |
HatchStyle.DOTTED_GRID | Specifies horizontal and vertical lines, each of which is composed of dots, that cross. |
HatchStyle.FORWARD_DIAGONAL | A pattern of lines on a diagonal from upper left to lower right. |
HatchStyle.HORIZONTAL | A pattern of horizontal lines. |
HatchStyle.HORIZONTAL_BRICK | Specifies a hatch that has the appearance of horizontally layered bricks. |
HatchStyle.LARGE_CHECKER_BOARD | Specifies a hatch that has the appearance of a checkerboard with squares that are twice the size of SmallCheckerBoard. |
HatchStyle.LARGE_CONFETTI | Specifies a hatch that has the appearance of confetti, and is composed of larger pieces than SmallConfetti. |
HatchStyle.LARGE_GRID | Specifies the hatch style Cross. |
HatchStyle.LIGHT_DOWNWARD_DIAGONAL | Specifies diagonal lines that slant to the right from top points to bottom points and are spaced 50 percent closer together than DownwardDiagonal, but they are not antialiased. |
HatchStyle.LIGHT_HORIZONTAL | Specifies horizontal lines that are spaced 50 percent closer together than Horizontal. |
HatchStyle.LIGHT_UPWARD_DIAGONAL | Specifies diagonal lines that slant to the left from top points to bottom points and are spaced 50 percent closer together than BackwardDiagonal, but they are not antialiased. |
HatchStyle.LIGHT_VERTICAL | Specifies vertical lines that are spaced 50 percent closer together than Vertical. |
HatchStyle.MAX | Specifies hatch style SolidDiamond. |
HatchStyle.MIN | Specifies hatch style Horizonal. |
HatchStyle.NARROW_HORIZONTAL | Specifies horizontal lines that are spaced 75 percent closer together than hatch style Horizontal (or 25 percent closer together than LightHorizontal). |
HatchStyle.NARROW_VERTICAL | Specifies vertical lines that are spaced 75 percent closer together than hatch style Vertical (or 25 percent closer together than LightVertical). |
HatchStyle.OUTLINED_DIAMOND | Specifies forward diagonal and backward diagonal lines that cross but are not antialiased. |
HatchStyle.PERCENT_05 | Specifies a 5-percent hatch. The ratio of foreground color to background color is 5:100. |
HatchStyle.PERCENT_10 | Specifies a 10-percent hatch. The ratio of foreground color to background color is 10:100. |
HatchStyle.PERCENT_20 | Specifies a 20-percent hatch. The ratio of foreground color to background color is 20:100. |
HatchStyle.PERCENT_25 | Specifies a 25-percent hatch. The ratio of foreground color to background color is 25:100. |
HatchStyle.PERCENT_30 | Specifies a 30-percent hatch. The ratio of foreground color to background color is 30:100. |
HatchStyle.PERCENT_40 | Specifies a 40-percent hatch. The ratio of foreground color to background color is 40:100. |
HatchStyle.PERCENT_50 | Specifies a 50-percent hatch. The ratio of foreground color to background color is 50:100. |
HatchStyle.PERCENT_60 | Specifies a 60-percent hatch. The ratio of foreground color to background color is 60:100. |
HatchStyle.PERCENT_70 | Specifies a 70-percent hatch. The ratio of foreground color to background color is 70:100. |
HatchStyle.PERCENT_75 | Specifies a 75-percent hatch. The ratio of foreground color to background color is 75:100. |
HatchStyle.PERCENT_80 | Specifies a 80-percent hatch. The ratio of foreground color to background color is 80:100. |
HatchStyle.PERCENT_90 | Specifies a 90-percent hatch. The ratio of foreground color to background color is 90:100. |
HatchStyle.PLAID | Specifies a hatch that has the appearance of a plaid material. |
HatchStyle.SHINGLE | Specifies a hatch that has the appearance of diagonally-layered shingles that slant to the right from top points to bottom points. |
HatchStyle.SMALL_CHECKER_BOARD | Specifies a hatch that has the appearance of a checkerboard. |
HatchStyle.SMALL_CONFETTI | Specifies a hatch that has the appearance of confetti. |
HatchStyle.SMALL_GRID | Specifies horizontal and vertical lines that cross and are spaced 50 percent closer together than hatch style Cross. |
HatchStyle.SOLID_DIAMOND | Specifies a hatch that has the appearance of a checkerboard placed diagonally. |
HatchStyle.SPHERE | Specifies a hatch that has the appearance of spheres laid adjacent to one another. |
HatchStyle.TRELLIS | Specifies a hatch that has the appearance of a trellis. |
HatchStyle.VERTICAL | A pattern of vertical lines. |
HatchStyle.WAVE | Specifies horizontal lines that are composed of tildes. |
HatchStyle.WEAVE | Specifies a hatch that has the appearance of a woven material. |
HatchStyle.WIDE_DOWNWARD_DIAGONAL | Specifies diagonal lines that slant to the right from top points to bottom points, have the same spacing as hatch style ForwardDiagonal, and are triple its width, but are not antialiased. |
HatchStyle.WIDE_UPWARD_DIAGONAL | Specifies diagonal lines that slant to the left from top points to bottom points, have the same spacing as hatch style BackwardDiagonal, and are triple its width, but are not antialiased. |
HatchStyle.ZIG_ZAG | Specifies horizontal lines that are composed of zigzags. |
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(SoftwareFX.ChartFX.Annotation.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(SoftwareFX.ChartFX.Annotation.Line)
,
setColor(java.awt.Color)
public void setURL(java.lang.String value)
AnnotationGroup.getLink().setUrl
instead.
setURL
in class AnnotationObject
AnnotationObject.getLink()
public void setURLTarget(java.lang.String value)
AnnotationGroup.getLink().setTarget
instead.
setURLTarget
in class AnnotationObject
AnnotationObject.getLink()
|
http://www.softwarefx.com | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |