Chart FX for Java 6.5

SoftwareFX.ChartFX.Annotation
Class AnnotationGroup

java.lang.Object
  extended by SoftwareFX.ChartFX.Annotation.AnnotationObject
      extended by SoftwareFX.ChartFX.Annotation.AnnotationGroup

public final class AnnotationGroup
extends AnnotationObject

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

AnnotationGroup

public AnnotationGroup()

AnnotationGroup

public AnnotationGroup(AnnotationObject annotationObjects)
Method Detail

getBorder

public Line getBorder()

Gets the Border. For more detail see setBorder(SoftwareFX.ChartFX.Annotation.Line).

Overrides:
getBorder in class AnnotationObject

getColor

public java.awt.Color getColor()

Gets the Color. For more detail see setColor(java.awt.Color).

Overrides:
getColor in class AnnotationObject

getList

public AnnotationObject getList(int n)
Deprecated. You should use getList() instead.


getList

public AnnotationListBase getList()

Allows you to access the CollectionBase members used modify the annotation group.

Remarks:
  • Creating an annotation group allows you to control attributes for all the objects included in the list with one property assignment to the group.

  • See Also:
    AnnotationListBase.getItem(int), AnnotationListBase.add(java.lang.Object), AnnotationListBase.contains(java.lang.Object), AnnotationListBase.remove(java.lang.Object), AnnotationObject, AnnotationX

    getPattern

    public int getPattern()

    Gets the Pattern. For more detail see setPattern(int).

    Overrides:
    getPattern in class AnnotationObject

    getURL

    public java.lang.String getURL()
    Deprecated. You should use AnnotationGroup.getLink().getUrl instead.

    Overrides:
    getURL in class AnnotationObject
    See Also:
    AnnotationObject.getLink()

    getURLTarget

    public java.lang.String getURLTarget()
    Deprecated. You should use AnnotationGroup.getLink().getTarget instead.

    Overrides:
    getURLTarget in class AnnotationObject
    See Also:
    AnnotationObject.getLink()

    recalcBounds

    public void recalcBounds()

    Used to recalculate the bounding rectangle for a group of objects.

    Remarks:
  • 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.

  • See Also:
    AnnotationListBase.add(java.lang.Object), AnnotationListBase.remove(java.lang.Object), AnnotationObject.refresh(), AnnotationObject, AnnotationListBase

    setBorder

    public void setBorder(Line value)

    Allows you to apply border attributes to a selected annotation group.

    Remarks:
  • 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.

  • Overrides:
    setBorder in class AnnotationObject
    See Also:
    Line.setColor(java.awt.Color), Line.setStyle(int), Line.setWidth(int), Line.setEndCap(int), Line.setStartCap(int), Line

    setColor

    public void setColor(java.awt.Color value)

    Sets the inside fill color for the objects included in an annotation group.

    Remarks:
  • 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.

  • Overrides:
    setColor in class AnnotationObject
    See Also:
    Line.setColor(java.awt.Color), setBorder(SoftwareFX.ChartFX.Annotation.Line)

    setPattern

    public void setPattern(int value)

    Used to set a pattern style for a group of annotation objects.

    Values:
    HatchStyle : Specifies the different hatch patterns available.
    ValueDescription
    HatchStyle.BACKWARD_DIAGONALA pattern of lines on a diagonal from upper right to lower left.
    HatchStyle.CROSSSpecifies horizontal and vertical lines that cross.
    HatchStyle.DARK_DOWNWARD_DIAGONALSpecifies 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_HORIZONTALSpecifies horizontal lines that are spaced 50 percent closer together than Horizontal and are twice the width of HatchStyleHorizontal.
    HatchStyle.DARK_UPWARD_DIAGONALSpecifies 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_VERTICALSpecifies vertical lines that are spaced 50 percent closer together than Vertical and are twice its width.
    HatchStyle.DASHED_DOWNWARD_DIAGONALSpecifies dashed diagonal lines, that slant to the right from top points to bottom points.
    HatchStyle.DASHED_HORIZONTALSpecifies dashed horizontal lines.
    HatchStyle.DASHED_UPWARD_DIAGONALSpecifies dashed diagonal lines, that slant to the left from top points to bottom points.
    HatchStyle.DASHED_VERTICALSpecifies dashed vertical lines.
    HatchStyle.DIAGONAL_BRICKSpecifies a hatch that has the appearance of layered bricks that slant to the left from top points to bottom points.
    HatchStyle.DIAGONAL_CROSSSpecifies forward diagonal and backward diagonal lines that cross. The lines are antialiased.
    HatchStyle.DIVOTSpecifies a hatch that has the appearance of divots.
    HatchStyle.DOTTED_DIAMONDSpecifies forward diagonal and backward diagonal lines, each of which is composed of dots, that cross.
    HatchStyle.DOTTED_GRIDSpecifies horizontal and vertical lines, each of which is composed of dots, that cross.
    HatchStyle.FORWARD_DIAGONALA pattern of lines on a diagonal from upper left to lower right.
    HatchStyle.HORIZONTALA pattern of horizontal lines.
    HatchStyle.HORIZONTAL_BRICKSpecifies a hatch that has the appearance of horizontally layered bricks.
    HatchStyle.LARGE_CHECKER_BOARDSpecifies a hatch that has the appearance of a checkerboard with squares that are twice the size of SmallCheckerBoard.
    HatchStyle.LARGE_CONFETTISpecifies a hatch that has the appearance of confetti, and is composed of larger pieces than SmallConfetti.
    HatchStyle.LARGE_GRIDSpecifies the hatch style Cross.
    HatchStyle.LIGHT_DOWNWARD_DIAGONALSpecifies 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_HORIZONTALSpecifies horizontal lines that are spaced 50 percent closer together than Horizontal.
    HatchStyle.LIGHT_UPWARD_DIAGONALSpecifies 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_VERTICALSpecifies vertical lines that are spaced 50 percent closer together than Vertical.
    HatchStyle.MAXSpecifies hatch style SolidDiamond.
    HatchStyle.MINSpecifies hatch style Horizonal.
    HatchStyle.NARROW_HORIZONTALSpecifies horizontal lines that are spaced 75 percent closer together than hatch style Horizontal (or 25 percent closer together than LightHorizontal).
    HatchStyle.NARROW_VERTICALSpecifies vertical lines that are spaced 75 percent closer together than hatch style Vertical (or 25 percent closer together than LightVertical).
    HatchStyle.OUTLINED_DIAMONDSpecifies forward diagonal and backward diagonal lines that cross but are not antialiased.
    HatchStyle.PERCENT_05Specifies a 5-percent hatch. The ratio of foreground color to background color is 5:100.
    HatchStyle.PERCENT_10Specifies a 10-percent hatch. The ratio of foreground color to background color is 10:100.
    HatchStyle.PERCENT_20Specifies a 20-percent hatch. The ratio of foreground color to background color is 20:100.
    HatchStyle.PERCENT_25Specifies a 25-percent hatch. The ratio of foreground color to background color is 25:100.
    HatchStyle.PERCENT_30Specifies a 30-percent hatch. The ratio of foreground color to background color is 30:100.
    HatchStyle.PERCENT_40Specifies a 40-percent hatch. The ratio of foreground color to background color is 40:100.
    HatchStyle.PERCENT_50Specifies a 50-percent hatch. The ratio of foreground color to background color is 50:100.
    HatchStyle.PERCENT_60Specifies a 60-percent hatch. The ratio of foreground color to background color is 60:100.
    HatchStyle.PERCENT_70Specifies a 70-percent hatch. The ratio of foreground color to background color is 70:100.
    HatchStyle.PERCENT_75Specifies a 75-percent hatch. The ratio of foreground color to background color is 75:100.
    HatchStyle.PERCENT_80Specifies a 80-percent hatch. The ratio of foreground color to background color is 80:100.
    HatchStyle.PERCENT_90Specifies a 90-percent hatch. The ratio of foreground color to background color is 90:100.
    HatchStyle.PLAIDSpecifies a hatch that has the appearance of a plaid material.
    HatchStyle.SHINGLESpecifies a hatch that has the appearance of diagonally-layered shingles that slant to the right from top points to bottom points.
    HatchStyle.SMALL_CHECKER_BOARDSpecifies a hatch that has the appearance of a checkerboard.
    HatchStyle.SMALL_CONFETTISpecifies a hatch that has the appearance of confetti.
    HatchStyle.SMALL_GRIDSpecifies horizontal and vertical lines that cross and are spaced 50 percent closer together than hatch style Cross.
    HatchStyle.SOLID_DIAMONDSpecifies a hatch that has the appearance of a checkerboard placed diagonally.
    HatchStyle.SPHERESpecifies a hatch that has the appearance of spheres laid adjacent to one another.
    HatchStyle.TRELLISSpecifies a hatch that has the appearance of a trellis.
    HatchStyle.VERTICALA pattern of vertical lines.
    HatchStyle.WAVESpecifies horizontal lines that are composed of tildes.
    HatchStyle.WEAVESpecifies a hatch that has the appearance of a woven material.
    HatchStyle.WIDE_DOWNWARD_DIAGONALSpecifies 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_DIAGONALSpecifies 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_ZAGSpecifies horizontal lines that are composed of zigzags.

    Remarks:
  • 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.

  • Overrides:
    setPattern in class AnnotationObject
    See Also:
    setBorder(SoftwareFX.ChartFX.Annotation.Line), setColor(java.awt.Color)

    setURL

    public void setURL(java.lang.String value)
    Deprecated. You should use AnnotationGroup.getLink().setUrl instead.

    Overrides:
    setURL in class AnnotationObject
    See Also:
    AnnotationObject.getLink()

    setURLTarget

    public void setURLTarget(java.lang.String value)
    Deprecated. You should use AnnotationGroup.getLink().setTarget instead.

    Overrides:
    setURLTarget in class AnnotationObject
    See Also:
    AnnotationObject.getLink()

    http://www.softwarefx.com

    2007 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.