Chart FX 7 for Java Desktop

com.softwarefx.chartfx.desktop
Class ToolBar

java.lang.Object
  extended by com.softwarefx.chartfx.desktop.DockableBar
      extended by com.softwarefx.chartfx.desktop.ToolBar
All Implemented Interfaces:
Serializable, Iterable<ToolBarItem>

public class ToolBar
extends DockableBar
implements Serializable, Iterable<ToolBarItem>

Provides access to the ToolBar object.

The ToolBar Class is used to control the chart's toolbar object. This object exposes the members of the DockableBar object to control visual attributes of the chart. The ToolBar object supports members to control Clear, Insert and Remove ToolBarItems for a chart's toolbar.

A ToolBarItem may be associated with internal or user defined Command. So by creating a custom Command and configuring a ToolBarItem for that command, developers may create custom toolbars including both pre-defined and custom commands.

See Also:
Serialized Form

Constructor Summary
ToolBar()
           
 
Method Summary
 void clear()
          Clears all items from the toolbar object.
 int findCommand(CommandId id)
          Returns the position of given command in the toolbar.
 int findCommand(int id)
          Returns the position of given command in the toolbar.
 ToolBarItem get(int n)
          Error: Member ToolBar.
 CommandCollection getCommands()
          Returns the CommandCollection for the ToolBar object.
 int getLength()
          Gets the total number of ToolBarItems for a toolbar object.
 void insert(int position, ToolBarItem item)
          Used to insert a ToolBarItem in the ToolBar at a selected position.
 boolean isShowImages()
          Gets the ShowImages.
 Iterator<ToolBarItem> iterator()
          Returns an iterator over the elements in this collection.
 void removeAt(int position)
          Used to remove ToolBarItems from a ToolBar.
 void removeAt(int position, int count)
          Used to remove ToolBarItems from a ToolBar.
 void set(int n, ToolBarItem value)
          Error: Member ToolBar.
 void setShowImages(boolean value)
          Sets a value indicating whether to show or hide images for ToolBarItems.
 
Methods inherited from class com.softwarefx.chartfx.desktop.DockableBar
getBackColor, getBorder, getDock, getHeight, getWidth, getZOrder, isAutoSize, isVisible, resetBackColor, setAutoSize, setBackColor, setBorder, setDock, setHeight, setVisible, setWidth, setZOrder
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ToolBar

public ToolBar()
Method Detail

clear

public void clear()

Clears all items from the toolbar object.

Remarks:
  • Clearing the items for a particular tool will not clear the items that are accessible through other tools. For example, if you remove all the items of the Chart FX ToolBar, the Chart FX MenuBar and Context menus will still include their items (Commands).

  • You can use the removeAt(int) method to remove items from a selected toolbar position.

  • See Also:
    getLength(), setShowImages(boolean), Chart.getToolBar(), insert(int, com.softwarefx.chartfx.desktop.ToolBarItem), removeAt(int), Chart

    findCommand

    public int findCommand(CommandId id)

    Returns the position of given command in the toolbar.

    Remarks:
  • This method is very useful when trying to remove an icon from the tool bar.

  • The CommandId Enum makes it simpler to specify which command you need to find the position of.

  • Parameters:
    id - CommandId for the command to find.

    findCommand

    public int findCommand(int id)

    Returns the position of given command in the toolbar.

    Remarks:
  • This method is very useful when trying to remove an icon from the tool bar.

  • The CommandId Enum makes it simpler to specify which command you need to find the position of.

  • Parameters:
    id - CommandId for the command to find.

    get

    public ToolBarItem get(int n)

    Error: Member ToolBar. member not found

    ERROR: Doc member not found


    getCommands

    public CommandCollection getCommands()

    Returns the CommandCollection for the ToolBar object.

    Remarks:
  • The supported members of the CommandCollection Class will allow you to administer the toolbar command items. All the standard collection methods are supported.

  • This object is normally accessed when you want to customize the Chart FX toolbar or change any options associated with the default tool. For more information please see the Programmer's Guide reference.

  • Please refer to the Command object for more information on properties supported by this object.

  • See Also:
    Command

    getLength

    public int getLength()

    Gets the total number of ToolBarItems for a toolbar object.

    See Also:
    setShowImages(boolean), clear(), insert(int, com.softwarefx.chartfx.desktop.ToolBarItem), removeAt(int), Chart, ToolBarItem

    insert

    public void insert(int position,
                       ToolBarItem item)

    Used to insert a ToolBarItem in the ToolBar at a selected position.

    Parameters:
    position - Position in the toolbar to insert the ToolBarItem.
    item - ToolBarItem to insert.
    See Also:
    getLength(), setShowImages(boolean), Chart.getToolBar(), clear(), removeAt(int), Chart

    isShowImages

    public boolean isShowImages()

    Gets the ShowImages. For more detail see setShowImages(boolean).


    iterator

    public Iterator<ToolBarItem> iterator()

    Returns an iterator over the elements in this collection.

    Specified by:
    iterator in interface Iterable<ToolBarItem>

    removeAt

    public void removeAt(int position)

    Used to remove ToolBarItems from a ToolBar.

    Remarks:
  • Removing ToolBarITems for a particular tool will not remove the items that are accessible through other tools. For example, if you remove all the items of the Chart FX ToolBar, the Chart FX MenuBar and Context menus will still include their items (Commands).

  • Parameters:
    position - Position of the ToolBarItem to begin removing.
    See Also:
    getLength(), setShowImages(boolean), Chart.getToolBar(), clear(), insert(int, com.softwarefx.chartfx.desktop.ToolBarItem), Chart

    removeAt

    public void removeAt(int position,
                         int count)

    Used to remove ToolBarItems from a ToolBar.

    Remarks:
  • Removing ToolBarITems for a particular tool will not remove the items that are accessible through other tools. For example, if you remove all the items of the Chart FX ToolBar, the Chart FX MenuBar and Context menus will still include their items (Commands).

  • Parameters:
    position - Position of the ToolBarItem to begin removing.
    count - Number of ToolBarItems to remove after the configured position.
    See Also:
    getLength(), setShowImages(boolean), Chart.getToolBar(), clear(), insert(int, com.softwarefx.chartfx.desktop.ToolBarItem), Chart

    set

    public void set(int n,
                    ToolBarItem value)

    Error: Member ToolBar. member not found

    ERROR: Doc member not found


    setShowImages

    public void setShowImages(boolean value)

    Sets a value indicating whether to show or hide images for ToolBarItems.

    See Also:
    Chart.getToolBar(), clear(), insert(int, com.softwarefx.chartfx.desktop.ToolBarItem), removeAt(int), Chart, ToolBarItem

    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.