|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdsto.dfc.swt.commands.Commands
public final class Commands
Generic command utility methods.
Field Summary | |
---|---|
static Object |
SHOW_NAME_KEY
|
Method Summary | |
---|---|
static void |
createMenu(org.eclipse.swt.widgets.Decorations shell,
CommandView view)
|
static void |
createToolbar(org.eclipse.swt.widgets.CoolBar coolbar,
CommandView commandView)
Create a toolbar from the specified command view. |
static Command |
findCommand(org.eclipse.swt.widgets.Control control,
Class commandClass)
Find a command in the context or toolbar view for a control. |
static Command |
findCommand(org.eclipse.swt.widgets.Control control,
String name)
Find a command in the context or toolbar view for a control. |
static CommandView |
getCommandView(org.eclipse.swt.widgets.Control control,
String viewName)
Get/create the menu view for a control. |
static CommandView |
getContextView(org.eclipse.swt.widgets.Control control)
Get/create the context menu view for a control. |
static CommandView |
getMenuView(org.eclipse.swt.widgets.Decorations shell)
Get/create the main menu view for a control. |
static CommandView |
getToolbarView(org.eclipse.swt.widgets.Control control)
|
static void |
setContextMenuView(org.eclipse.swt.widgets.Control control,
CommandView view)
|
static void |
setMenuView(org.eclipse.swt.widgets.Control control,
CommandView view)
|
static void |
setToolbarView(org.eclipse.swt.widgets.Control control,
CommandView view)
|
static void |
showName(CommandView view,
Command command)
Shortcut to set the SHOW_NAME_KEY command property to true. |
static void |
showName(CommandView view,
String commandName)
Shortcut to set the SHOW_NAME_KEY command property to true. |
static void |
syncMenu(CommandView view,
org.eclipse.swt.widgets.Menu menu)
Connect a command view with a menu. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final Object SHOW_NAME_KEY
Method Detail |
---|
public static void syncMenu(CommandView view, org.eclipse.swt.widgets.Menu menu)
view
- The command view. Must be a context menu view.menu
- The menu.
IllegalArgumentException
- if command view is not a context
menu view.CommandViewMenuProvider
public static CommandView getContextView(org.eclipse.swt.widgets.Control control)
public static void setContextMenuView(org.eclipse.swt.widgets.Control control, CommandView view)
public static CommandView getMenuView(org.eclipse.swt.widgets.Decorations shell)
public static void createMenu(org.eclipse.swt.widgets.Decorations shell, CommandView view)
public static void setMenuView(org.eclipse.swt.widgets.Control control, CommandView view)
public static CommandView getToolbarView(org.eclipse.swt.widgets.Control control)
public static void setToolbarView(org.eclipse.swt.widgets.Control control, CommandView view)
public static CommandView getCommandView(org.eclipse.swt.widgets.Control control, String viewName)
public static void createToolbar(org.eclipse.swt.widgets.CoolBar coolbar, CommandView commandView)
public static void showName(CommandView view, Command command)
SHOW_NAME_KEY
command property to true. This
will hint to the toolbar UI generator to show the command's name as well
as its icon on the toolbar. Tip: you should call this before adding the
command to the view for the toolbar UI to honor it.
public static void showName(CommandView view, String commandName)
SHOW_NAME_KEY
command property to true. This
will hint to the toolbar UI generator to show the command's name as well
as its icon on the toolbar. Tip: you should call this before adding the
command to the view for the toolbar UI to honor it.
public static Command findCommand(org.eclipse.swt.widgets.Control control, String name)
public static Command findCommand(org.eclipse.swt.widgets.Control control, Class commandClass)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |