public final class DockableToolBar extends DockableBar
| Constructor and Description |
|---|
DockableToolBar()
Constructs a newly allocated DockableToolBar object
|
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Clears all items from the DockableToolBar object.
|
int |
findCommand(int id)
Returns the position of given command with a specific ID in the DockableToolBar.
|
int |
findCommandId(CommandId id)
Returns the position of given command with a specific CommandId in the DockableToolBar.
|
ToolBarItem |
get(int n)
Gets or sets a ToolBarItem for a selected index in the DockableToolBar object.
|
com.softwarefx.server.CommandCollection |
getCommands()
Returns the CommandCollection for the DockableToolBar object.
|
int |
getLength()
Gets the total number of ToolBarItems for a DockableToolBar object.
|
void |
insert(int position,
ToolBarItem item)
Used to insert a ToolBarItem in the DockableToolBar at a selected position.
|
boolean |
isShowImages()
Gets or sets a value indicating whether to show or hide images for ToolBarItems.
|
java.util.Iterator<ToolBarItem> |
iterator()
Description goes here
|
void |
removeAt(int position)
Used to remove ToolBarItems from a DockableToolBar.
|
void |
removeAt(int position,
int count)
Used to remove ToolBarItems from a DockableToolBar.
|
void |
set(int n,
ToolBarItem value)
Gets or sets a ToolBarItem for a selected index in the DockableToolBar object.
|
void |
setShowImages(boolean value)
Gets or sets a value indicating whether to show or hide images for ToolBarItems.
|
addVisibleChangedListener, getBackColor, getBorder, getDock, getHeight, getWidth, getZOrder, isAutoSize, isVisible, removeVisibleChangedListener, resetAutoSize, resetBackColor, resetBorder, resetDock, resetHeight, resetVisible, resetWidth, resetZOrder, setAutoSize, setBackColor, setBorder, setDock, setHeight, setVisible, setWidth, setZOrderpublic DockableToolBar()
public com.softwarefx.server.CommandCollection getCommands()
Returns the CommandCollection for the DockableToolBar object.
int CommandId_PointLabels; CommandId_PointLabels = CommandId.PointLabels; chart1.getToolBar().getCommands().get(CommandId_PointLabels).setEnabled(false);
public ToolBarItem get(int n)
Gets or sets a ToolBarItem for a selected index in the DockableToolBar object.
Developers may obtain the ToolBarItem object for a command in the DockableToolBar using this method. Using the supported DockableToolBar class members, developers configure attributes for a command.
To configure the 4th ToolBarItem as Print:
chart1.getToolBar().get(4).setCommandId(CommandId.PRINT);
n - public void set(int n,
ToolBarItem value)
Gets or sets a ToolBarItem for a selected index in the DockableToolBar object.
Developers may obtain the ToolBarItem object for a command in the DockableToolBar using this method. Using the supported DockableToolBar class members, developers configure attributes for a command.
To configure the 4th ToolBarItem as Print:
chart1.getToolBar().get(4).setCommandId(CommandId.PRINT);
n - value - public int getLength()
Gets the total number of ToolBarItems for a DockableToolBar object.
int totalItems; totalItems = chart1.getToolBar().getLength();
public boolean isShowImages()
chart1.getToolBar().setShowImages(true);
public void setShowImages(boolean value)
chart1.getToolBar().setShowImages(true);
value - public void clear()
You can use the
To clear all the toolbar items:
chart1.getToolBar().clear();
public int findCommand(int id)
This method is very useful when trying to remove an icon from a DockableToolBar object.
The CommandId Enum makes it simpler to specify which command you need to find the position of.
id - ID for the command to find.public int findCommandId(CommandId id)
This method is very useful when trying to remove an icon from a DockableToolBar object.
The CommandId Enum makes it simpler to specify which command you need to find the position of.
id - CommandId to find.public void insert(int position,
ToolBarItem item)
Used to insert a ToolBarItem in the DockableToolBar at a selected position.
To Insert the Print ToolBarItem as the first item in the ToolBar:
ToolBarItem command1; command1 = new ToolBarItem(CommandId.PRINT); chart1.getToolBar().Insert(0, command1);
position - Position in the DockableToolBar to insert the ToolBarItem.item - ToolBarItem to insert.public java.util.Iterator<ToolBarItem> iterator()
public void removeAt(int position)
To remove the 3rd and 4th ToolBarItems:
chart1.getToolBar().removeAt(1, 2);
position - Position before the ToolBarItem to remove.public void removeAt(int position,
int count)
To remove the 3rd and 4th ToolBarItems:
chart1.getToolBar().removeAt(1, 2);
position - Number of ToolBarItems to remove after the configured position.count - Position of the ToolBarItem to begin removing.2014 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.