|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdsto.dfc.swt.commands.CommandViewMenuProvider
public final class CommandViewMenuProvider
Synchronizes a popup menu with a CommandView.
Constructor Summary | |
---|---|
CommandViewMenuProvider(org.eclipse.swt.widgets.Menu menu,
org.eclipse.swt.widgets.Widget control,
CommandView commandView)
Create a new instance. |
|
CommandViewMenuProvider(org.eclipse.swt.widgets.Menu menu,
org.eclipse.swt.widgets.Widget control,
CommandView commandView,
CommandViewNode root)
Create a new instance. |
Method Summary | |
---|---|
void |
childAdded(CommandViewNodeEvent e)
Fired when a child is added to the node. |
void |
childMoved(CommandViewNodeEvent e)
Fired when a child is moved within the node. |
void |
childRemoved(CommandViewNodeEvent e)
Fired when a child is removed from the node. |
void |
commandChanged(CommandViewNodeEvent e)
Fired when a child is moved within the node. |
void |
dispose()
Remove all listeners and references created for menu synchronisation. |
void |
handleEvent(org.eclipse.swt.widgets.Event e)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CommandViewMenuProvider(org.eclipse.swt.widgets.Menu menu, org.eclipse.swt.widgets.Widget control, CommandView commandView)
menu
- The menu to manage.control
- The control hosting the menu (may be null). If non-null,
this control is monitored for double-clicks to invoke the default command.
This option will usually only be used by context menus.commandView
- The command view backing the menu.public CommandViewMenuProvider(org.eclipse.swt.widgets.Menu menu, org.eclipse.swt.widgets.Widget control, CommandView commandView, CommandViewNode root)
menu
- The menu to manage.control
- The control hosting the menu (may be null). If non-null,
this control is monitored for double-clicks to invoke the default command.
This option will usually only be used by context menus.commandView
- The command view backing the menu.root
- The root of the command tree.Method Detail |
---|
public void dispose()
public void handleEvent(org.eclipse.swt.widgets.Event e)
handleEvent
in interface org.eclipse.swt.widgets.Listener
public void childAdded(CommandViewNodeEvent e)
CommandViewNodeListener
childAdded
in interface CommandViewNodeListener
e
- The event. e e.getNode () == new node, e.getOldIndex ()
== -1, e.getNewIndex () == index of new node.public void childRemoved(CommandViewNodeEvent e)
CommandViewNodeListener
childRemoved
in interface CommandViewNodeListener
e
- The event. e.getNode () == removed node, e.getOldIndex
() == old index of node, e.getNewIndex () == -1.public void childMoved(CommandViewNodeEvent e)
CommandViewNodeListener
childMoved
in interface CommandViewNodeListener
e
- The event. e.getNode () == moved node, e.getOldIndex ()
== old index of node, e.getNewIndex () == new index.public void commandChanged(CommandViewNodeEvent e)
CommandViewNodeListener
commandChanged
in interface CommandViewNodeListener
e
- The event. e.getSourceNode () == node that changed,
e.getNode () == null, e.getOldCommand () == old command (may be
null), e.getNewCommand () == new command.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |