Chart FX 7 for Java Server

com.softwarefx.chartfx.server.annotation
Class Annotations

java.lang.Object
  extended by com.softwarefx.chartfx.server.annotation.Annotations
All Implemented Interfaces:
IExtension

public class Annotations
extends Object
implements IExtension

Provides access to the Annotations object.

The Annotations Class is used to create the Annotation Extension object. The Annotation Extension object must be added to your charting application if you plan on using any of the Annotation features. Once the Annotation Extension object has been created, the supported members of this Class allow you to select the type of annotation list you will create. The annotation list will consist of all the individual annotation objects which will be included in a chart. Once the desired objects have been added to the annotation list and the annotation list has been added to the Annotation Extension object, the Annotation Extension object may be added to your charting application.

Below is an example of creating an Annotation Extension object and adding it to the chart using the Extension property:


Constructor Summary
Annotations()
           
 
Method Summary
 void addClickListener(AnnotationListener value)
          Adds a ClickListener to the listener list.
 void addInternalCommandListener(AnnotationCommandListener value)
          Adds a InternalCommandListener to the listener list.
 void addUserCommandListener(AnnotationCommandListener value)
          Adds a UserCommandListener to the listener list.
 Chart getChart()
          Gets the Chart.
 AnnotationListener[] getClickListeners()
          Returns an array of all the ClickListeners added to this class with addClickListeners().
 CommandCollection getCommands()
          Gets the list of commands associated with the Annotation Extension.
 Color getDefaultBorderColor()
          Gets the DefaultBorderColor.
 Color getDefaultFillColor()
          Gets the DefaultFillColor.
 AnnotationCommandListener[] getInternalCommandListeners()
          Returns an array of all the InternalCommandListeners added to this class with addInternalCommandListeners().
 AnnotationList getList()
          Allows you to access the CollectionBase members used modify the annotation list.
 Class<?> getNewObjectType()
          Gets the NewObjectType.
 AnnotationListBase getSelectionList()
          Allows you to set attributes directly to a selected list of annotation objects.
 ToolBar getToolBar()
          Used to show and hide the annotation toolbar in the chart area.
 AnnotationCommandListener[] getUserCommandListeners()
          Returns an array of all the UserCommandListeners added to this class with addUserCommandListeners().
 AnnotationObject hitTest(int x, int y)
          Allows you to simulate a mouse click in a particular x,y position in the chart.
 boolean isDirty()
          Gets the isDirty.
 boolean isEnableUI()
          Gets the EnableUI.
 boolean isEnableViewState()
          Gets the EnableViewState.
 void removeClickListener(AnnotationListener value)
          Removes a ClickListener from the listener list.
 void removeInternalCommandListener(AnnotationCommandListener value)
          Removes a InternalCommandListener from the listener list.
 void removeUserCommandListener(AnnotationCommandListener value)
          Removes a UserCommandListener from the listener list.
 void setChart(Chart value)
          Sets the Chart object for the Annotations object.
 void setDefaultBorderColor(Color value)
          Used to set the border color for annotation objects created using the annotation toolbar.
 void setDefaultFillColor(Color value)
          Used to set the fill color for annotation objects created using the annotation toolbar.
 void setDirty(boolean value)
          Error: Member Annotations.Dirty member not found
 void setEnableUI(boolean value)
          Used to allow/prevent the user from interacting with objects you add programmatically.
 void setEnableViewState(boolean value)
          Sets a value indicating whether the server object persists its view state.
 void setNewObjectType(Class<?> value)
          Allows you to select the type of the object to be created by the next mouse or keyboard input.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Annotations

public Annotations()
Method Detail

addClickListener

public void addClickListener(AnnotationListener value)

Adds a ClickListener to the listener list.

Parameters:
value - The ClickListener to be added.

addInternalCommandListener

public void addInternalCommandListener(AnnotationCommandListener value)

Adds a InternalCommandListener to the listener list.

Parameters:
value - The InternalCommandListener to be added.

addUserCommandListener

public void addUserCommandListener(AnnotationCommandListener value)

Adds a UserCommandListener to the listener list.

Parameters:
value - The UserCommandListener to be added.

getChart

public Chart getChart()

Gets the Chart. For more detail see setChart(com.softwarefx.chartfx.server.Chart).


getClickListeners

public AnnotationListener[] getClickListeners()

Returns an array of all the ClickListeners added to this class with addClickListeners().


getCommands

public CommandCollection getCommands()

Gets the list of commands associated with the Annotation Extension.

Remarks:
  • Customizing the Annotation Toolbar works exactly like customizing the Chart FX toolbar. Please see the Customizing Tools section in the Programmer's Guide for a more detailed explaination of this process.

  • When customizing the Annotation Toolbar, you may reference the pre-defined annotation commands. To do so, you will access the AnnCommandID enumeration located at the following package:

    com.softwarefx.chartfx.server.annotation.AnnCommandID

  • See Also:
    Command

    getDefaultBorderColor

    public Color getDefaultBorderColor()

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


    getDefaultFillColor

    public Color getDefaultFillColor()

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


    getInternalCommandListeners

    public AnnotationCommandListener[] getInternalCommandListeners()

    Returns an array of all the InternalCommandListeners added to this class with addInternalCommandListeners().


    getList

    public AnnotationList getList()

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

    Remarks:
  • Using this property, you will have access to add and remove items from the annotation list. You can also count the number of current items on the list.

  • This property is used to create the annotation lists. Once the annotation list has been created and applied to the chart, you can see the annotation objects in the chart area.

  • If you would like to add items to a selection list, you can use the getSelectionList() property.

  • See Also:
    getSelectionList()

    getNewObjectType

    public Class<?> getNewObjectType()

    Gets the NewObjectType. For more detail see setNewObjectType(java.lang.Class).


    getSelectionList

    public AnnotationListBase getSelectionList()

    Allows you to set attributes directly to a selected list of annotation objects.

    Remarks:
  • A selection list is a group of annotation objects that have been selected by the user using the mouse. Using the SelectionList property and the supported members of the SelectionList Class , you can add and items to the selection list programmatically as if a user selected the items using their mouse.

  • 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)

    getToolBar

    public ToolBar getToolBar()

    Used to show and hide the annotation toolbar in the chart area.

    Remarks:
  • You will need to add the annotation extension to your projects using the Chart.getExtensions() property of the Chart Class .

  • The setEnableUI(boolean) property controls if the user is able to interact with objects you add programmatically. It also must be set to True in order to display the annotation toolbar.

  • The getToolBar() property is used to display the annotation toolbar in the chart. You must create the annotation extension object, set the setEnableUI(boolean) attribute to true, and add the annotation extension to the chart. At this point you may set the getToolBar() Property to True to make the toolbar visible.

  • The setNewObjectType(java.lang.Class) property allows you to programmatically select an annotation object in the annotation toolbar.

  • See Also:
    Chart.getExtensions(), setEnableUI(boolean), setNewObjectType(java.lang.Class), Chart

    getUserCommandListeners

    public AnnotationCommandListener[] getUserCommandListeners()

    Returns an array of all the UserCommandListeners added to this class with addUserCommandListeners().


    hitTest

    public AnnotationObject hitTest(int x,
                                    int y)

    Allows you to simulate a mouse click in a particular x,y position in the chart.

    Remarks:
  • You can use this method in conjunction with any of the Chart FX mouse clicks events to check if a particular annotation object is located where the user clicked.

  • Parameters:
    x - The x position in chart coordinates. (pixel value)
    y - The y position in chart coordinates. (pixel value)
    See Also:
    AnnotationObject

    isDirty

    public boolean isDirty()

    Gets the isDirty. For more detail see #setisDirty.


    isEnableUI

    public boolean isEnableUI()

    Gets the EnableUI. For more detail see setEnableUI(boolean).


    isEnableViewState

    public boolean isEnableViewState()

    Gets the EnableViewState. For more detail see setEnableViewState(boolean).


    removeClickListener

    public void removeClickListener(AnnotationListener value)

    Removes a ClickListener from the listener list.

    Parameters:
    value - The ClickListener to be removed.

    removeInternalCommandListener

    public void removeInternalCommandListener(AnnotationCommandListener value)

    Removes a InternalCommandListener from the listener list.

    Parameters:
    value - The InternalCommandListener to be removed.

    removeUserCommandListener

    public void removeUserCommandListener(AnnotationCommandListener value)

    Removes a UserCommandListener from the listener list.

    Parameters:
    value - The UserCommandListener to be removed.

    setChart

    public void setChart(Chart value)

    Sets the Chart object for the Annotations object.

    Remarks:
  • By configuring the Chart property, developers can attach a the annotation extension to a chart.

  • When using the design-time controls for the Annotation Object, you can attach the extension to any Chart object existing on the page.

  • See Also:
    Chart

    setDefaultBorderColor

    public void setDefaultBorderColor(Color value)

    Used to set the border color for annotation objects created using the annotation toolbar.

    Remarks:
  • Setting this property to a color will instruct Chart FX to use the configured color as the border color for all objects created using the annotation toolbar.

  • You setDefaultFillColor(java.awt.Color) allows you to configure the fill color for all annotation objects created using the annotation toolbar.

  • The getToolBar() property is used to display the annotation toolbar in the chart. You must create the annotation extension object, set the enabled attribute to true, and add the annotation extension to the chart. At this point you may set the getToolBar() Property to True to make the toolbar visible.

  • See Also:
    setDefaultFillColor(java.awt.Color), getToolBar()

    setDefaultFillColor

    public void setDefaultFillColor(Color value)

    Used to set the fill color for annotation objects created using the annotation toolbar.

    Remarks:
  • Setting this property to a color will instruct Chart FX to use the configured color as the fill color for all objects created using the annotation toolbar.

  • You setDefaultBorderColor(java.awt.Color) allows you to configure the border color for all annotation objects created using the annotation toolbar.

  • The getToolBar() property is used to display the annotation toolbar in the chart. You must create the annotation extension object, set the enabled attribute to true, and add the annotation extension to the chart. At this point you may set the getToolBar() Property to True to make the toolbar visible.

  • See Also:
    setDefaultBorderColor(java.awt.Color), getToolBar(), setEnableUI(boolean)

    setDirty

    public void setDirty(boolean value)

    Error: Member Annotations.Dirty member not found

    ERROR: Doc member not found


    setEnableUI

    public void setEnableUI(boolean value)

    Used to allow/prevent the user from interacting with objects you add programmatically.

    Remarks:
  • When set to true, users are allowed to interact with annotation objects created programmatically. When set to false, users do not have access.

  • The getToolBar() property is used to display the annotation toolbar in the chart. You must create the annotation extension object, set the enabled attribute to true, and add the annotation extension to the chart. At this point you may set the getToolBar() Property to True to make the toolbar visible.

  • See Also:
    AnnotationObject.setAllowModify(boolean), AnnotationObject.setAllowMove(boolean), getToolBar(), AnnotationObject

    setEnableViewState

    public void setEnableViewState(boolean value)

    Sets a value indicating whether the server object persists its view state.

    Remarks:
  • You must enable view state for the server control to maintain its state across HTTP requests.


  • setNewObjectType

    public void setNewObjectType(Class<?> value)

    Allows you to select the type of the object to be created by the next mouse or keyboard input.

    Remarks:
  • Setting this property is equivalent to pressing one of the Object Type buttons in the annotation toolbar (Rectangle, Circle, Etc.).

  • After setting this property to a selected annotation object, the next mouse event fired in the chart area will draw that object at that position.

  • See Also:
    setEnableUI(boolean)

    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.