|
Chart FX 7 for Java Desktop | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.softwarefx.chartfx.desktop.annotation.Annotations
public class Annotations
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 |
addInternalCommandListener(AnnotationCommandListener value)
Adds a InternalCommandListener to the listener list. |
void |
addMouseDownListener(com.softwarefx.MouseListener value)
Adds a MouseDownListener to the listener list. |
void |
addMouseMoveListener(com.softwarefx.MouseListener value)
Adds a MouseMoveListener to the listener list. |
void |
addMouseUpListener(com.softwarefx.MouseListener value)
Adds a MouseUpListener to the listener list. |
void |
addObjectCreatedListener(AnnotationListener value)
Adds a ObjectCreatedListener to the listener list. |
void |
addSelectionChangedListener(SelectionChangedListener value)
Adds a SelectionChangedListener to the listener list. |
void |
addSelectionDeletedListener(SelectionDeletedListener value)
Adds a SelectionDeletedListener to the listener list. |
void |
addUserCommandListener(AnnotationCommandListener value)
Adds a UserCommandListener to the listener list. |
Chart |
getChart()
Gets the Chart. |
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. |
com.softwarefx.MouseListener[] |
getMouseDownListeners()
Returns an array of all the MouseDownListeners added to this class with addMouseDownListeners(). |
com.softwarefx.MouseListener[] |
getMouseMoveListeners()
Returns an array of all the MouseMoveListeners added to this class with addMouseMoveListeners(). |
com.softwarefx.MouseListener[] |
getMouseUpListeners()
Returns an array of all the MouseUpListeners added to this class with addMouseUpListeners(). |
Class<?> |
getNewObjectType()
Gets the NewObjectType. |
AnnotationListener[] |
getObjectCreatedListeners()
Returns an array of all the ObjectCreatedListeners added to this class with addObjectCreatedListeners(). |
SelectionChangedListener[] |
getSelectionChangedListeners()
Returns an array of all the SelectionChangedListeners added to this class with addSelectionChangedListeners(). |
SelectionDeletedListener[] |
getSelectionDeletedListeners()
Returns an array of all the SelectionDeletedListeners added to this class with addSelectionDeletedListeners(). |
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()
Error: Member Annotations.Dirty member not found |
boolean |
isEnableUI()
Gets the EnableUI. |
void |
removeInternalCommandListener(AnnotationCommandListener value)
Removes a InternalCommandListener from the listener list. |
void |
removeMouseDownListener(com.softwarefx.MouseListener value)
Removes a MouseDownListener from the listener list. |
void |
removeMouseMoveListener(com.softwarefx.MouseListener value)
Removes a MouseMoveListener from the listener list. |
void |
removeMouseUpListener(com.softwarefx.MouseListener value)
Removes a MouseUpListener from the listener list. |
void |
removeObjectCreatedListener(AnnotationListener value)
Removes a ObjectCreatedListener from the listener list. |
void |
removeSelectionChangedListener(SelectionChangedListener value)
Removes a SelectionChangedListener from the listener list. |
void |
removeSelectionDeletedListener(SelectionDeletedListener value)
Removes a SelectionDeletedListener 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 |
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 |
---|
public Annotations()
Method Detail |
---|
public void addInternalCommandListener(AnnotationCommandListener value)
Adds a InternalCommandListener to the listener list.
value
- The InternalCommandListener to be added.public void addMouseDownListener(com.softwarefx.MouseListener value)
Adds a MouseDownListener to the listener list.
value
- The MouseDownListener to be added.public void addMouseMoveListener(com.softwarefx.MouseListener value)
Adds a MouseMoveListener to the listener list.
value
- The MouseMoveListener to be added.public void addMouseUpListener(com.softwarefx.MouseListener value)
Adds a MouseUpListener to the listener list.
value
- The MouseUpListener to be added.public void addObjectCreatedListener(AnnotationListener value)
Adds a ObjectCreatedListener to the listener list.
value
- The ObjectCreatedListener to be added.public void addSelectionChangedListener(SelectionChangedListener value)
Adds a SelectionChangedListener to the listener list.
value
- The SelectionChangedListener to be added.public void addSelectionDeletedListener(SelectionDeletedListener value)
Adds a SelectionDeletedListener to the listener list.
value
- The SelectionDeletedListener to be added.public void addUserCommandListener(AnnotationCommandListener value)
Adds a UserCommandListener to the listener list.
value
- The UserCommandListener to be added.public Chart getChart()
Gets the Chart. For more detail see setChart(com.softwarefx.chartfx.desktop.Chart)
.
public CommandCollection getCommands()
Gets the list of commands associated with the Annotation Extension.
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.desktop.annotation.AnnCommandID
Command
public Color getDefaultBorderColor()
Gets the DefaultBorderColor. For more detail see setDefaultBorderColor(java.awt.Color)
.
public Color getDefaultFillColor()
Gets the DefaultFillColor. For more detail see setDefaultFillColor(java.awt.Color)
.
public AnnotationCommandListener[] getInternalCommandListeners()
Returns an array of all the InternalCommandListeners added to this class with addInternalCommandListeners().
public AnnotationList getList()
Allows you to access the CollectionBase members used modify the annotation list.
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.
getSelectionList()
public com.softwarefx.MouseListener[] getMouseDownListeners()
Returns an array of all the MouseDownListeners added to this class with addMouseDownListeners().
public com.softwarefx.MouseListener[] getMouseMoveListeners()
Returns an array of all the MouseMoveListeners added to this class with addMouseMoveListeners().
public com.softwarefx.MouseListener[] getMouseUpListeners()
Returns an array of all the MouseUpListeners added to this class with addMouseUpListeners().
public Class<?> getNewObjectType()
Gets the NewObjectType. For more detail see setNewObjectType(java.lang.Class>)
.
public AnnotationListener[] getObjectCreatedListeners()
Returns an array of all the ObjectCreatedListeners added to this class with addObjectCreatedListeners().
public SelectionChangedListener[] getSelectionChangedListeners()
Returns an array of all the SelectionChangedListeners added to this class with addSelectionChangedListeners().
public SelectionDeletedListener[] getSelectionDeletedListeners()
Returns an array of all the SelectionDeletedListeners added to this class with addSelectionDeletedListeners().
public AnnotationListBase getSelectionList()
Allows you to set attributes directly to a selected list of annotation objects.
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.
AnnotationListBase.add(com.softwarefx.chartfx.desktop.annotation.AnnotationObject)
,
AnnotationListBase.contains(com.softwarefx.chartfx.desktop.annotation.AnnotationObject)
,
AnnotationListBase.insert(int, com.softwarefx.chartfx.desktop.annotation.AnnotationObject)
,
AnnotationListBase.remove(com.softwarefx.chartfx.desktop.annotation.AnnotationObject)
public ToolBar getToolBar()
Used to show and hide the annotation toolbar in the chart area.
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.
Chart.getExtensions()
,
setEnableUI(boolean)
,
setNewObjectType(java.lang.Class>)
,
Chart
public AnnotationCommandListener[] getUserCommandListeners()
Returns an array of all the UserCommandListeners added to this class with addUserCommandListeners().
public AnnotationObject hitTest(int x, int y)
Allows you to simulate a mouse click in a particular x,y position in the chart.
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)AnnotationObject
public boolean isDirty()
Error: Member Annotations.Dirty member not found
ERROR: Doc member not found
public boolean isEnableUI()
Gets the EnableUI. For more detail see setEnableUI(boolean)
.
public void removeInternalCommandListener(AnnotationCommandListener value)
Removes a InternalCommandListener from the listener list.
value
- The InternalCommandListener to be removed.public void removeMouseDownListener(com.softwarefx.MouseListener value)
Removes a MouseDownListener from the listener list.
value
- The MouseDownListener to be removed.public void removeMouseMoveListener(com.softwarefx.MouseListener value)
Removes a MouseMoveListener from the listener list.
value
- The MouseMoveListener to be removed.public void removeMouseUpListener(com.softwarefx.MouseListener value)
Removes a MouseUpListener from the listener list.
value
- The MouseUpListener to be removed.public void removeObjectCreatedListener(AnnotationListener value)
Removes a ObjectCreatedListener from the listener list.
value
- The ObjectCreatedListener to be removed.public void removeSelectionChangedListener(SelectionChangedListener value)
Removes a SelectionChangedListener from the listener list.
value
- The SelectionChangedListener to be removed.public void removeSelectionDeletedListener(SelectionDeletedListener value)
Removes a SelectionDeletedListener from the listener list.
value
- The SelectionDeletedListener to be removed.public void removeUserCommandListener(AnnotationCommandListener value)
Removes a UserCommandListener from the listener list.
value
- The UserCommandListener to be removed.public void setChart(Chart value)
Sets the Chart object for the Annotations object.
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.
Chart
public void setDefaultBorderColor(Color value)
Used to set the border color for annotation objects created using the annotation toolbar.
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.
setDefaultFillColor(java.awt.Color)
,
getToolBar()
public void setDefaultFillColor(Color value)
Used to set the fill color for annotation objects created using the annotation toolbar.
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.
setDefaultBorderColor(java.awt.Color)
,
getToolBar()
,
setEnableUI(boolean)
public void setDirty(boolean value)
Error: Member Annotations.Dirty member not found
ERROR: Doc member not found
public void setEnableUI(boolean value)
Used to allow/prevent the user from interacting with objects you add programmatically.
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.
AnnotationObject.setAllowModify(boolean)
,
AnnotationObject.setAllowMove(boolean)
,
getToolBar()
,
AnnotationObject
public void setNewObjectType(Class<?> value)
Allows you to select the type of the object to be created by the next mouse or keyboard input.
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.
setEnableUI(boolean)
|
http://www.softwarefx.com | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |