|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.tensegrity.gui.launch.LaunchTask
com.tensegrity.skeleton.swing.launch.AbstractLaunchTask
com.tensegrity.skeleton.swing.launch.AbstractToolBarLaunchTask
An abstract ToolBar task as "must-extend" class for future ToolBar LaunchTask implementation. This class provides the methods to fill ToolBars.
| Field Summary |
| Fields inherited from class com.tensegrity.gui.launch.LaunchTask |
lasterror, LAUNCHTASKSTATUS_FATAL, LAUNCHTASKSTATUS_FATAL_RETRY, LAUNCHTASKSTATUS_SERIOUS, LAUNCHTASKSTATUS_SERIOUS_RETRY, LAUNCHTASKSTATUS_SHUTDOWN, LAUNCHTASKSTATUS_SUCCESS, LAUNCHTASKSTATUS_WARNING |
| Constructor Summary | |
AbstractToolBarLaunchTask(ApplicationFrame applicationFrame)
Constructor |
|
AbstractToolBarLaunchTask(ApplicationFrame applicationFrame,
java.lang.String nameKey)
Constructor |
|
| Method Summary | |
protected void |
addSeparator(SwingToolBar toolbar)
Adds a Separator the end of the given ToolBar. |
protected void |
addSeparator(SwingToolBar toolbar,
int index)
This method adds a Separator to the passed
ToolBar at the specified index |
protected void |
addToToolBar(java.lang.String id,
java.lang.Class resourceClass)
Adds a new Button to the end of the ToolBar of the application. |
protected void |
addToToolBar(java.lang.String id,
java.lang.String icon)
Adds a new Button to the end of the default ToolBar of the application. |
protected void |
addToToolBar(java.lang.String id,
java.lang.String icon,
java.lang.Class resourceClass)
Adds a new Button to the end of the ToolBar of the application. |
protected void |
addToToolBar(java.lang.String id,
java.lang.String icon,
int index)
Inserts a command specified by the id and icon
to the ToolBar at the given index. |
protected void |
addToToolBar(java.lang.String id,
java.lang.String icon,
int index,
java.lang.String defaultIcon)
Adds a new Button at position index of the default ToolBar
of the application. |
protected void |
addToToolBar(java.lang.String id,
java.lang.String icon,
java.lang.String defaultIcon)
Adds a new Button to the end of the default ToolBar of the application. |
protected void |
addToToolBar(java.lang.String id,
java.lang.String icon,
java.lang.String defaultIcon,
java.lang.Class resourceClass)
Adds a new Button to the end of the ToolBar of the application. |
protected void |
addToToolBar(java.lang.String id,
java.lang.String icon,
java.lang.String defaultIcon,
int index,
java.lang.Class resourceClass)
Adds a new Button at position indexthe end of the ToolBar of
the application. |
protected javax.swing.JButton |
addToToolBar(SwingToolBar toolbar,
BaseCommand command,
java.lang.String iconurl,
java.lang.String defaultIcon)
The method addToToolbar is a convience method to add new elements to the end of a given ToolBar. |
protected javax.swing.JButton |
addToToolBar(SwingToolBar toolbar,
BaseCommand command,
java.lang.String iconurl,
java.lang.String defaultIcon,
int index,
java.lang.Class resourceClass)
Adds a button to the specified ToolBar by calling the
#addToToolBarToggleButton(SwingToolBar, Command, String, String, int, Class)
method. |
protected void |
addToToolBar(SwingToolBar toolbar,
java.lang.String id,
java.lang.Class resourceClass)
Adds a new Button to the end of the ToolBar of the application. |
protected javax.swing.AbstractButton |
addToToolBarToggleButton(SwingToolBar toolbar,
java.lang.String commandId,
java.lang.Class resourceClass)
Adds a ToggleButton to the given ToolBar Loads the icons from the properties key Icon.Command.COMMANDID and IconToggled.Command.COMMANDID |
protected javax.swing.AbstractButton |
addToToolBarToggleButton(SwingToolBar toolbar,
java.lang.String commandId,
java.lang.String iconUrl,
java.lang.String iconToggledUrl,
java.lang.String defaultIconUrl,
java.lang.String defaultIconToggledUrl,
java.lang.Class resourceClass)
Adds a ToggleButton to the given toolbar by using the SwingCommandRegistry#addToToolBarToggleButton(SwingToolBar, Command, String, String, Class)
-method. |
protected void |
addToToolBarToggleButton(SwingToolBar toolbar,
java.lang.String commandId,
java.lang.String iconUrl,
java.lang.String iconToggledUrl,
java.lang.String defaultIconUrl,
java.lang.String defaultIconToggledUrl,
int index,
java.lang.Class resourceClass)
Adds a ToggleButton to the given toolbar by using the #addToToolBarToggleButton(SwingToolBar, Command, String, String, Class)
method. |
protected void |
addZoomCombo(SwingToolBar toolBar)
Creates a new ZoomComboBox and adds it to the given ToolBar. |
protected ZoomComboBox |
createZoomCombo()
Creates the ZoomComboBox. |
protected void |
fillZoomCombo(ZoomComboBox combo)
Adds all zoom graph commands to the combo that should be selectable by the user |
int |
getIndexOf(java.lang.String id,
SwingToolBar toolbar)
Returns the index of the button with the given command id. |
protected ToolBar |
getToolBar(java.lang.String name)
Returns the ToolBar with the given name or null, if there is no matching ToolBar |
protected java.awt.Component |
removeToolbarComponent(java.lang.String id,
SwingToolBar toolbar)
Utility method used in order to remove a specific component from the passed ToolBar. |
| Methods inherited from class com.tensegrity.skeleton.swing.launch.AbstractLaunchTask |
findResourceText, getApplicationFrame, getName, getStatusPrefix, getStatusPrefixResourceKey, postCreate |
| Methods inherited from class com.tensegrity.gui.launch.LaunchTask |
getError, getStatusDetails, run |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public AbstractToolBarLaunchTask(ApplicationFrame applicationFrame)
applicationFrame - Application context for this LaunchTask.
public AbstractToolBarLaunchTask(ApplicationFrame applicationFrame,
java.lang.String nameKey)
applicationFrame - Application context for this LaunchTask.nameKey - The resource key for the name of this launchtask| Method Detail |
protected void addToToolBar(java.lang.String id,
java.lang.String icon,
java.lang.String defaultIcon)
id and uses the given icon. The
defaultIcon will be used when the LookAndFeel switches to
the WindowsLookAndFeel.
id - the id of the command to add.icon - name of the icon to use.defaultIcon - name of the icon to use when being in windows LnF.
protected void addToToolBar(java.lang.String id,
java.lang.String icon)
id and uses the given icon.
id - the id of the command to add.icon - name of the icon to use.
protected void addToToolBar(java.lang.String id,
java.lang.String icon,
int index)
id and icon
to the ToolBar at the given index.
id - the command id.icon - icon to use.index - position within the ToolBar.
protected void addToToolBar(java.lang.String id,
java.lang.String icon,
int index,
java.lang.String defaultIcon)
index of the default ToolBar
of the application. The button will trigger the command associated with
the given id and uses the given icon. The
defaultIcon will be used when the LookAndFeel switches to
the WindowsLookAndFeel.
id - the id of the command to add.icon - name of the icon to use.index - position where to add the new element.defaultIcon - name of the icon to use when being in windows LnF.
protected void addToToolBar(java.lang.String id,
java.lang.String icon,
java.lang.String defaultIcon,
java.lang.Class resourceClass)
id and uses
the given icon. The defaultIcon will be used
when the LookAndFeel switches to the WindowsLookAndFeel. The
resourceClass will be used to load the icons.
id - the id of the command to add.icon - name of the icon to use.defaultIcon - name of the icon to use when being in windows LnF.resourceClass - Class instance to use, to load files.
protected void addToToolBar(java.lang.String id,
java.lang.String icon,
java.lang.Class resourceClass)
id and uses
the given icon. The defaultIcon will be used
when the LookAndFeel switches to the WindowsLookAndFeel. The
resourceClass will be used to load the icons.
id - the id of the command to add.icon - name of the icon to use.resourceClass - Class instance to use, to load files.
protected void addToToolBar(java.lang.String id,
java.lang.Class resourceClass)
id.
It will use the icon that is stored in the properties under the key "Icon.Command." + COMMANDID.
The resourceClass will be used to load the icons.
id - the id of the command to add.resourceClass - Class instance to use, to load files.
protected void addToToolBar(SwingToolBar toolbar,
java.lang.String id,
java.lang.Class resourceClass)
id.
It will use the icon that is stored in the properties under the key "Icon.Command." + COMMANDID.
The resourceClass will be used to load the icons.
toolbar - The ToolBar to add the button toid - the id of the command to add.resourceClass - Class instance to use, to load files.
protected void addToToolBar(java.lang.String id,
java.lang.String icon,
java.lang.String defaultIcon,
int index,
java.lang.Class resourceClass)
indexthe end of the ToolBar of
the application. The button will trigger the command associated with the
given id and uses the given icon. The
defaultIcon will be used when the LookAndFeel switches to
the WindowsLookAndFeel. The resourceClass will be used to
load the icons.
id - the id of the command to add.icon - name of the icon to use.defaultIcon - name of the icon to use when being in windows LnF.index - position where to add the new element.resourceClass - Class instance to use, to load files.
protected final javax.swing.JButton addToToolBar(SwingToolBar toolbar,
BaseCommand command,
java.lang.String iconurl,
java.lang.String defaultIcon)
toolbar - ToolBar instance to add to.command - instance of iconurl - url of the icondefaultIcon - name of the icon to use when being in windows LnF.
- Returns:
- the JButton which was added to the ToolBar.
protected final javax.swing.JButton addToToolBar(SwingToolBar toolbar,
BaseCommand command,
java.lang.String iconurl,
java.lang.String defaultIcon,
int index,
java.lang.Class resourceClass)
ToolBar by calling the
#addToToolBarToggleButton(SwingToolBar, Command, String, String, int, Class)
method. Furthermore, the resulting button action will have an extra
property called SwingUtil.TENSEGRITY_ICON that holds the
icon displayed by the tensegrity Look and feel.
toolbar - ToolBar instance to add to.command - instance of BaseCommand to associate with the new element.iconurl - url of the icondefaultIcon - name of the icon to use when being in windows LnF.index - position to add the new element to.resourceClass - Class instance to use, to load files.
protected final javax.swing.AbstractButton addToToolBarToggleButton(SwingToolBar toolbar,
java.lang.String commandId,
java.lang.Class resourceClass)
toolbar - ToolBar instance to add to.commandId - instance of BaseCommand to associate with the new element.resourceClass - Class instance to use, to load files.
protected final javax.swing.AbstractButton addToToolBarToggleButton(SwingToolBar toolbar,
java.lang.String commandId,
java.lang.String iconUrl,
java.lang.String iconToggledUrl,
java.lang.String defaultIconUrl,
java.lang.String defaultIconToggledUrl,
java.lang.Class resourceClass)
SwingCommandRegistry#addToToolBarToggleButton(SwingToolBar, Command, String, String, Class)
-method. Furthermore the resulting action of the ToggleButton will get an extra
property called SwingUtil.TENSEGRITY_ICON which holds the
icon to be used in the tensegrity Look and feel.
Icons corresponding to the passed iconToggledUrl and defaultToggledUrl
are displayed when the button is toggled.
toolbar - ToolBar instance to add to.commandId - instance of BaseCommand to associate with the new element.iconUrl - url of the iconiconToggledUrl - url of the toggled icondefaultIconUrl - name of the icon to use when being in windows LnF.defaultIconToggledUrl - name of the toggle icon to use when being in windows LnF.resourceClass - Class instance to use, to load files.
protected final void addToToolBarToggleButton(SwingToolBar toolbar,
java.lang.String commandId,
java.lang.String iconUrl,
java.lang.String iconToggledUrl,
java.lang.String defaultIconUrl,
java.lang.String defaultIconToggledUrl,
int index,
java.lang.Class resourceClass)
#addToToolBarToggleButton(SwingToolBar, Command, String, String, Class)
method. Furthermore the resulting action of the ToggleButton will get an extra
property called SwingUtil.TENSEGRITY_ICON which holds the
icon to be used in the tensegrity look and feel. Icons corresponding
to the passed iconToggledUrl and
defaultToggledUrl are displayed when the button is
toggled. The given index specifies the position on the
ToolBar where the ToggleButton
should be inserted.
toolbar - ToolBar instance to add to.commandId - instance of BaseCommand to associate with the new element.iconUrl - url of the iconiconToggledUrl - url of the toggled icondefaultIconUrl - name of the icon to use when being in windows LnF.defaultIconToggledUrl - name of the toggle icon to use when being in windows LnF.index - position where to add the element to.resourceClass - Class instance to use, to load files.protected final void addSeparator(SwingToolBar toolbar)
toolbar - the ToolBar instance to add the separator to.
protected final void addSeparator(SwingToolBar toolbar,
int index)
This method adds a Separator to the passed
ToolBar at the specified index
toolbar - The ToolBar to add the separator to.index - the position where to add the separator.JToolBar.Separator
protected java.awt.Component removeToolbarComponent(java.lang.String id,
SwingToolBar toolbar)
id - the id of the command to remove from the ToolBar.toolbar - the target ToolBar to operate on.
public int getIndexOf(java.lang.String id,
SwingToolBar toolbar)
id - The command id to look fortoolbar - The tookbar to examine
protected final ToolBar getToolBar(java.lang.String name)
name - The name of the ToolBar to look for
protected void addZoomCombo(SwingToolBar toolBar)
toolBar - the ToolBar instance to add the combo to.protected void fillZoomCombo(ZoomComboBox combo)
combo - The combo to add the commands toprotected ZoomComboBox createZoomCombo()
ZoomActionComboBox.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||