|
|||||||||||
| 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.swt.launch.SwtMenuLaunchTask
This AbstractLaunchTask is the base
class for launch tasks creating menus in the context of SWT applications.
It contains several methods useful in order to create menus or
menu items.
| Nested Class Summary | |
protected class |
SwtMenuLaunchTask.menuItemsListener
This SelectionListener is used in order to perform
the BaseCommand associated to a given MenuItem
when it is selected, if the BaseCommand is enabled.
|
| 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 | |
SwtMenuLaunchTask(SwtApplicationFrame applicationFrame)
Creates the SwtMenuLaunchTask which intends to initialize
default menus for a given SwtApplicationFrame. |
|
SwtMenuLaunchTask(SwtApplicationFrame applicationFrame,
java.lang.String nameKey)
Creates the SwtMenuLaunchTask which intends to initialize
default menus for a given SwtApplicationFrame. |
|
| Method Summary | |
protected org.eclipse.swt.widgets.MenuItem |
addMenuItem(org.eclipse.swt.widgets.Menu parentMenu,
java.lang.String commandId,
SwtKeyStroke swtkeystroke)
This routine adds to the passed parentMenu and returns a
MenuItem associated to the BaseCommand with identifier
commandId.
|
protected org.eclipse.swt.widgets.MenuItem |
addMenuItem(org.eclipse.swt.widgets.Menu parentMenu,
java.lang.String commandId,
SwtKeyStroke swtkeystroke,
org.eclipse.swt.widgets.Display display,
java.lang.String iconurl,
java.lang.Class referenceClass)
This routine adds to the passed parentMenu and returns a
MenuItem associated to the BaseCommand with identifier
commandId.
|
protected org.eclipse.swt.widgets.MenuItem |
addSeparator(org.eclipse.swt.widgets.Menu parentMenu)
Adds a separator to the passed Menu.
|
protected org.eclipse.swt.widgets.Menu |
createMenu(java.lang.String id)
This routine adds a new Menu to the application's menu bar. |
protected org.eclipse.swt.widgets.Menu |
createSubMenu(org.eclipse.swt.widgets.Menu parentMenu,
java.lang.String id)
This routine adds a new Menu to the passed Menu. |
void |
postCreate(java.lang.Object object)
This method is invoked once the LaunchTask.run() method is about to return.
|
| Methods inherited from class com.tensegrity.skeleton.swing.launch.AbstractLaunchTask |
findResourceText, getApplicationFrame, getName, getStatusPrefix, getStatusPrefixResourceKey |
| 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 SwtMenuLaunchTask(SwtApplicationFrame applicationFrame)
SwtMenuLaunchTask which intends to initialize
default menus for a given SwtApplicationFrame.
applicationFrame - Application context for this LaunchTask.
public SwtMenuLaunchTask(SwtApplicationFrame applicationFrame,
java.lang.String nameKey)
SwtMenuLaunchTask which intends to initialize
default menus for a given SwtApplicationFrame.
applicationFrame - Application context for this LaunchTask.nameKey - the resource key for the name of this launch task| Method Detail |
protected org.eclipse.swt.widgets.MenuItem addMenuItem(org.eclipse.swt.widgets.Menu parentMenu,
java.lang.String commandId,
SwtKeyStroke swtkeystroke)
This routine adds to the passed parentMenu and returns a
MenuItem associated to the BaseCommand with identifier
commandId.
parentMenu - the Menu to which the MenuItem is to be added.commandId - a BaseCommand identifier.swtkeystroke - the SwtKeyStroke associated to the BaseCommand
with identifier commandId. Can be
null if no accelerator should be added to the
MenuItem.
MenuItem associated to the BaseCommand with
identifier commandId.
protected org.eclipse.swt.widgets.MenuItem addMenuItem(org.eclipse.swt.widgets.Menu parentMenu,
java.lang.String commandId,
SwtKeyStroke swtkeystroke,
org.eclipse.swt.widgets.Display display,
java.lang.String iconurl,
java.lang.Class referenceClass)
This routine adds to the passed parentMenu and returns a
MenuItem associated to the BaseCommand with identifier
commandId.
parentMenu - the Menu to which the MenuItem is to be added.commandId - a BaseCommand identifier.swtkeystroke - the SwtKeyStroke associated to the BaseCommand
with identifier commandId. Can be
null if no accelerator should be added to the
MenuItem.display - the Display required to load the icon. Can be
null if no icon should be added to the
MenuItem.iconurl - the icon path. Can be null if no icon should be
added to the MenuItem.referenceClass - the Class used as reference in order to load the icon.
Can be null if no icon should be added to the
MenuItem.
MenuItem associated to the BaseCommand with
identifier commandId.protected org.eclipse.swt.widgets.MenuItem addSeparator(org.eclipse.swt.widgets.Menu parentMenu)
Adds a separator to the passed Menu.
parentMenu - the Menu to which the separator is added.
protected org.eclipse.swt.widgets.Menu createMenu(java.lang.String id)
This routine adds a new Menu to the application's menu bar. The
passed id is the unique identifier for the Menu and is
used in order to retrieve its localized text.
id - unique identifier for the Menu used in order to
retrieve its localized text.
Menu.ApplicationFrame.getMenuBar()
protected org.eclipse.swt.widgets.Menu createSubMenu(org.eclipse.swt.widgets.Menu parentMenu,
java.lang.String id)
This routine adds a new Menu to the passed Menu. The
passed id is the unique identifier for the Menu and is
used in order to retrieve its localized text.
parentMenu - the parent Menu.id - unique identifier for the Menu used in order to
retrieve its localized text.
Menu.public void postCreate(java.lang.Object object)
LaunchTask.run() method is about to return.
The parameter is the Menu initialized by this launch task.
postCreate in class AbstractLaunchTaskobject - the Menu initialized by this launch task.AbstractLaunchTask.postCreate(Object)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||