|
Chart FX for Java 6.5 | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object SoftwareFX.ChartFX.CommandList
public final class CommandList
Provides access to the CommandList object.
Constructor Summary | |
---|---|
CommandList()
|
Method Summary | |
---|---|
java.util.Enumeration |
elements()
Returns an enumeration of the values in the CommandList . |
int |
findSubCommandID(int nID)
Gets the SubCommandID for the selected sub command index in a command list. |
int |
getItem(int n)
Gets the Item. |
boolean |
hasMoreElements()
Tests if this enumeration contains more elements. |
void |
insertSubCommands(int nItems,
int nIndex)
Allows you to insert a subcommand to a command list. |
java.lang.Object |
nextElement()
Returns the next element of this enumeration if this enumeration object has at least one more element to provide. |
void |
removeAllSubCommands()
Allows you to remove all subcommands from the subcommands list associated with a particular command. |
void |
removeSubCommand(int nIndex)
Allows you to remove a particular subcommand from the subcommands list. |
void |
setItem(int n,
int value)
Gets and Sets the element at the specified position in the CommandList. |
int |
size()
Returns the number of elements in this collection. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CommandList()
Method Detail |
---|
public java.util.Enumeration elements()
Returns an enumeration of the values in the CommandList . Use the Enumeration methods on the returned object to fetch the elements sequentially.
public int findSubCommandID(int nID)
Gets the SubCommandID for the selected sub command index in a command list.
The ID is an integer that you will use to identify the command when the user press or interacts with it. This is a unique ID that will be associated to the custom command and no other custom command may have the same ID. Chart FX defines its pre-defined IDs between CommandID.First (29440) and CommandID.Last (29951), so please make sure you don't use a number in this range as it will cause unpredictable results.
This method may be used to find the ID of a subcommand. By doing this, you can trap events and add custom actions to pre-existing commands.
nID
- An integer specifying the index of the subcommand you want to find the ID. (zero based)Command.getSubCommandID(int)
,
insertSubCommands(int, int)
,
removeAllSubCommands()
,
removeSubCommand(int)
public int getItem(int n)
Gets the Item. For more detail see setItem(int, int)
.
public boolean hasMoreElements()
Tests if this enumeration contains more elements.
hasMoreElements
in interface java.util.Enumeration
public void insertSubCommands(int nItems, int nIndex)
Allows you to insert a subcommand to a command list.
This method allows you to insert custom subcommands or predefined subcommands. The below sample inserts below inserts a 'Save' command into the Personalized Options command list.
nItems
- nIndex
- Command.getSubCommandID(int)
,
Command.getID()
,
findSubCommandID(int)
,
removeAllSubCommands()
,
removeSubCommand(int)
public java.lang.Object nextElement()
Returns the next element of this enumeration if this enumeration object has at least one more element to provide.
nextElement
in interface java.util.Enumeration
public void removeAllSubCommands()
Allows you to remove all subcommands from the subcommands list associated with a particular command.
RemoveAllSubCommands should be followed by one or more calls to SubCommandID since an empty list is not supported (Unpredictable results may occur).
removeSubCommand(int)
,
Command
public void removeSubCommand(int nIndex)
Allows you to remove a particular subcommand from the subcommands list.
Please note that when you remove a particular sub-command from the subcommand list, the indexes will be shifted to the actual number of subcommands available in the command. Please refer to the SubCommandID property for more information about subcommand lists.
You can remove all subcommands associated with a command with the removeAllSubCommands()
method.
nIndex
- removeAllSubCommands()
public void setItem(int n, int value)
Gets and Sets the element at the specified position in the CommandList.
public int size()
Returns the number of elements in this collection.
|
http://www.softwarefx.com | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |