public class Annotations extends java.lang.Object implements IExtension
The Annotations
Below is an example of creating an Annotation Extension object and adding it to the chart using the Extension method:
Constructor and Description |
---|
Annotations()
Constructs a newly allocated Annotations object
|
Modifier and Type | Method and Description |
---|---|
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 or sets the Chart object for the Annotations object.
|
com.softwarefx.server.CommandCollection |
getCommands()
Gets the list of commands associated with the Annotation Extension.
|
java.awt.Color |
getDefaultBorderColor()
Used to set the border color for annotation objects created using the annotation toolbar.
|
java.awt.Color |
getDefaultFillColor()
Used to set the fill color for annotation objects created using the annotation toolbar.
|
AnnotationList |
getList()
Allows you to access the CollectionBase members used modify the annotation list.
|
java.lang.Class<?> |
getNewObjectType()
Allows you to select the type of the object to be created by the next mouse or keyboard input.
|
AnnotationListBase |
getSelectionList()
Allows you to set attributes directly to a selected list of annotation objects.
|
AnnotationObject |
hitTest(int x,
int y)
Allows you to simulate a mouse click in a particular x,y position in the chart.
|
boolean |
isDirty()
Returns a boolean specifying if the annotation extension object has been modified.
|
boolean |
isEnableViewState()
Gets or sets a value indicating whether the server object persists its view state.
|
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)
Gets or sets the Chart object for the Annotations object.
|
void |
setDefaultBorderColor(java.awt.Color value)
Used to set the border color for annotation objects created using the annotation toolbar.
|
void |
setDefaultFillColor(java.awt.Color value)
Used to set the fill color for annotation objects created using the annotation toolbar.
|
void |
setDirty(boolean value)
Returns a boolean specifying if the annotation extension object has been modified.
|
void |
setEnableViewState(boolean value)
Gets or sets a value indicating whether the server object persists its view state.
|
void |
setNewObjectType(java.lang.Class<?> value)
Allows you to select the type of the object to be created by the next mouse or keyboard input.
|
public Chart getChart()
Gets or sets the Chart object for the Annotations object.
To configure the attach the Annotation Extension to a chart:
Annotations annExt; annExt = new Annotations(); annExt.setChart(chart1);
public void setChart(Chart value)
Gets or sets the Chart object for the Annotations object.
To configure the attach the Annotation Extension to a chart:
Annotations annExt; annExt = new Annotations(); annExt.setChart(chart1);
value
- public com.softwarefx.server.CommandCollection getCommands()
public java.awt.Color getDefaultBorderColor()
public void setDefaultBorderColor(java.awt.Color value)
value
- public java.awt.Color getDefaultFillColor()
public void setDefaultFillColor(java.awt.Color value)
value
- public boolean isDirty()
Returns a boolean specifying if the annotation extension object has been modified.
When True is returned the annotation extension has been modified, therefore the extension has been marked 'Dirty'.
This method allows you to detect if a user has added an annotaton object to the chart via the annotation TooBar. When an object has been added to the annotation extension programmatically by the developer, this method will also return True.
To determine whether the annotation extension has been marked dirty:
public void setDirty(boolean value)
Returns a boolean specifying if the annotation extension object has been modified.
When True is returned the annotation extension has been modified, therefore the extension has been marked 'Dirty'.
This method allows you to detect if a user has added an annotaton object to the chart via the annotation TooBar. When an object has been added to the annotation extension programmatically by the developer, this method will also return True.
To determine whether the annotation extension has been marked dirty:
value
- public boolean isEnableViewState()
public void setEnableViewState(boolean value)
value
- public AnnotationList getList()
public java.lang.Class<?> getNewObjectType()
public void setNewObjectType(java.lang.Class<?> value)
value
- public AnnotationListBase getSelectionList()
public AnnotationObject hitTest(int x, int y)
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.
x
- The X position in chart coordinates (pixel value).y
- The Y position in chart coordinates (pixel value).public void addClickListener(AnnotationListener value)
value
- public void removeClickListener(AnnotationListener value)
value
- public void addInternalCommandListener(AnnotationCommandListener value)
value
- public void removeInternalCommandListener(AnnotationCommandListener value)
value
- public void addUserCommandListener(AnnotationCommandListener value)
value
- public void removeUserCommandListener(AnnotationCommandListener value)
value
- 2014 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.