Chart FX 7 for Java Server

com.softwarefx.chartfx.server.annotation
Class AnnotationGroup

java.lang.Object
  extended by com.softwarefx.chartfx.server.annotation.AnnotationObject
      extended by com.softwarefx.chartfx.server.annotation.AnnotationGroup

public 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(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

AnnotationGroup

public AnnotationGroup()

AnnotationGroup

public AnnotationGroup(AnnotationObject[] annotationObjects)
Method Detail

getBorder

public Line getBorder()

Gets the Border. For more detail see setBorder(com.softwarefx.chartfx.server.Line).

Overrides:
getBorder in class AnnotationObject

getColor

public Color getColor()

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

Overrides:
getColor in class AnnotationObject

getLink

public Link getLink()

Gets the Link object for a selected AnnotationGroup.

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

  • Overrides:
    getLink in class AnnotationObject
    See Also:
    Link.setUrl(java.lang.String), Link.setTarget(java.lang.String), Link

    getList

    public AnnotationListBase getList()

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

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

  • See Also:
    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

    getPattern

    public HatchStyle getPattern()

    Gets the Pattern. For more detail see setPattern(com.softwarefx.HatchStyle).

    Overrides:
    getPattern in class AnnotationObject

    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(com.softwarefx.chartfx.server.annotation.AnnotationObject), AnnotationListBase.remove(com.softwarefx.chartfx.server.annotation.AnnotationObject), 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(com.softwarefx.DashStyle), Line.setWidth(int), Line.setEndCap(com.softwarefx.LineCap) and Line.setStartCap(com.softwarefx.LineCap) of selected line annotation group.

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

    setColor

    public void setColor(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(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.

  • Overrides:
    setColor in class AnnotationObject
    See Also:
    Line.setColor(java.awt.Color), setBorder(com.softwarefx.chartfx.server.Line)

    setPattern

    public void setPattern(HatchStyle value)

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

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

  • Overrides:
    setPattern in class AnnotationObject
    See Also:
    setBorder(com.softwarefx.chartfx.server.Line), setColor(java.awt.Color)

    http://www.softwarefx.com

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