Chart FX 7 for Java Server

com.softwarefx.chartfx.server
Class ToolBarItem

java.lang.Object
  extended by com.softwarefx.chartfx.server.ToolBarItem

public class ToolBarItem
extends Object

Provides access to an item of the ToolBar object.

The ToolBarItem Class is accessed using the indexer of the ToolBar Class . Please refer to the Item property of the ToolBar Class for more information.

The ToolBarItem Class is the WinForms equivalent of the MenuItem Class . However, each ToolBarItem object needs to be associated with a Command object. Since a Command object is uniquely identified by an ID, a ToolBarItem is associated to a Command object using the setCommandId(int) property. Besides, the CommandStyle property provides a shortcut to the style of the associated Command.

In the following screenshot, a custom command has been defined using the Commands property of the Chart. The first item of the Chart.getMenuBar() object has been associated to this custom Command:


Constructor Summary
ToolBarItem()
           
ToolBarItem(CommandId commandId)
           
ToolBarItem(int commandId)
           
 
Method Summary
 int getCommandId()
          Gets the CommandId.
 void setCommandId(int value)
          Sets the Command ID of the ToolBarItem.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ToolBarItem

public ToolBarItem()

ToolBarItem

public ToolBarItem(CommandId commandId)

ToolBarItem

public ToolBarItem(int commandId)
Method Detail

getCommandId

public int getCommandId()

Gets the CommandId. For more detail see setCommandId(int).


setCommandId

public void setCommandId(int value)

Sets the Command ID of the ToolBarItem.

Remarks:
  • A Command ID is a unique identifier. Please refer to the Commands List available in Chart FX.

  • Below, the first command of the Chart.getToolBar() is related to the CommandId.About command. On the other hand, the first command of the Chart.getMenuBar()Chart.getMenuBar() is related to the CommandId.Area command:

  • See Also:
    Command, ToolBar

    http://www.softwarefx.com

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