Chart FX for Java 6.5

SoftwareFX.ChartFX
Class CommandList

java.lang.Object
  extended by SoftwareFX.ChartFX.CommandList
All Implemented Interfaces:
java.util.Enumeration

public final class CommandList
extends java.lang.Object
implements java.util.Enumeration

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

CommandList

public CommandList()
Method Detail

elements

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.


findSubCommandID

public int findSubCommandID(int nID)

Gets the SubCommandID for the selected sub command index in a command list.

Remarks:
  • 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.

  • Parameters:
    nID - An integer specifying the index of the subcommand you want to find the ID. (zero based)
    See Also:
    Command.getSubCommandID(int), insertSubCommands(int, int), removeAllSubCommands(), removeSubCommand(int)

    getItem

    public int getItem(int n)

    Gets the Item. For more detail see setItem(int, int).


    hasMoreElements

    public boolean hasMoreElements()

    Tests if this enumeration contains more elements.

    Specified by:
    hasMoreElements in interface java.util.Enumeration

    insertSubCommands

    public void insertSubCommands(int nItems,
                                  int nIndex)

    Allows you to insert a subcommand to a command list.

    Remarks:
  • 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.

  • Parameters:
    nItems -
    nIndex -
    See Also:
    Command.getSubCommandID(int), Command.getID(), findSubCommandID(int), removeAllSubCommands(), removeSubCommand(int)

    nextElement

    public java.lang.Object nextElement()

    Returns the next element of this enumeration if this enumeration object has at least one more element to provide.

    Specified by:
    nextElement in interface java.util.Enumeration

    removeAllSubCommands

    public void removeAllSubCommands()

    Allows you to remove all subcommands from the subcommands list associated with a particular command.

    Remarks:
  • RemoveAllSubCommands should be followed by one or more calls to SubCommandID since an empty list is not supported (Unpredictable results may occur).

  • See Also:
    removeSubCommand(int), Command

    removeSubCommand

    public void removeSubCommand(int nIndex)

    Allows you to remove a particular subcommand from the subcommands list.

    Remarks:
  • 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.

  • Parameters:
    nIndex -
    See Also:
    removeAllSubCommands()

    setItem

    public void setItem(int n,
                        int value)

    Gets and Sets the element at the specified position in the CommandList.


    size

    public int size()

    Returns the number of elements in this collection.


    http://www.softwarefx.com

    2007 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.