|
Chart FX 7 for Java Server | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.softwarefx.chartfx.server.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 |
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 |
---|
public Annotations()
Method Detail |
---|
public void addClickListener(AnnotationListener value)
Adds a ClickListener to the listener list.
value
- The ClickListener to be added.public void addInternalCommandListener(AnnotationCommandListener value)
Adds a InternalCommandListener to the listener list.
value
- The InternalCommandListener 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.server.Chart)
.
public AnnotationListener[] getClickListeners()
Returns an array of all the ClickListeners added to this class with addClickListeners().
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.server.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 Class<?> getNewObjectType()
Gets the NewObjectType. For more detail see setNewObjectType(java.lang.Class>)
.
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.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)
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()
Gets the isDirty. For more detail see #setisDirty
.
public boolean isEnableUI()
Gets the EnableUI. For more detail see setEnableUI(boolean)
.
public boolean isEnableViewState()
Gets the EnableViewState. For more detail see setEnableViewState(boolean)
.
public void removeClickListener(AnnotationListener value)
Removes a ClickListener from the listener list.
value
- The ClickListener to be removed.public void removeInternalCommandListener(AnnotationCommandListener value)
Removes a InternalCommandListener from the listener list.
value
- The InternalCommandListener 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 setEnableViewState(boolean value)
Sets a value indicating whether the server object persists its view state.
You must enable view state for the server control to maintain its state across HTTP requests.
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 |