dsto.dfc.swt.util
Class CmdToggleDataBeanProperty
java.lang.Object
dsto.dfc.util.BasicPropertyEventSource
dsto.dfc.swt.commands.AbstractCommand
dsto.dfc.swt.util.CmdToggleDataBeanProperty
- All Implemented Interfaces:
- PropertyListener, Command, CustomMenuCommand, CustomToolbarCommand, Copyable, Disposable, JavaBean, PropertyEventSource, Serializable, Cloneable, EventListener
public class CmdToggleDataBeanProperty
- extends AbstractCommand
- implements CustomMenuCommand, CustomToolbarCommand, PropertyListener, Disposable
Command that toggles a boolean property of an
IDataBean
.
- Version:
- $Revision$
- See Also:
- Serialized Form
Methods inherited from class dsto.dfc.swt.commands.AbstractCommand |
addCommandListener, clone, createDefaultDisplayName, fireCommandExecuted, fireCommandExecuted, getAccelerator, getContextMenuGroup, getDescription, getDisplayName, getGroupInView, getIcon, getLogString, getMainMenuGroup, getMnemonic, getName, getToolbarGroup, isEnabled, isInteractive, removeCommandListener, setAccelerator, setContextMenuGroup, setDescription, setDisplayName, setEnabled, setIcon, setInteractive, setMainMenuGroup, setMnemonic, setName, setToolbarGroup |
Methods inherited from class dsto.dfc.util.BasicPropertyEventSource |
addPropertyChangeListener, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getPropertyChangeSource, removePropertyChangeListener, setPropertyChangeSource |
Methods inherited from interface dsto.dfc.swt.commands.Command |
addCommandListener, getAccelerator, getDescription, getDisplayName, getGroupInView, getIcon, getLogString, getMnemonic, getName, isEnabled, isInteractive, removeCommandListener, setAccelerator, setContextMenuGroup, setDescription, setDisplayName, setEnabled, setIcon, setMainMenuGroup, setMnemonic, setToolbarGroup |
CmdToggleDataBeanProperty
public CmdToggleDataBeanProperty(IDataBean bean,
String property,
String name,
String iconName,
String group,
String description,
char mnemonic,
int accelerator)
dispose
public void dispose()
- Description copied from interface:
Disposable
- Dispose of the object (unregister listeners, close open resources
etc). It should be safe to call this method more than once.
Note for beans that support client event listeners: if there are
listeners registered when this is called, this method should do
nothing.
- Specified by:
dispose
in interface Disposable
execute
public void execute()
- Description copied from interface:
Command
- Execute the command. Commands should fire
CommandListener.commandExecuted(CommandEvent)
when executed.
- Specified by:
execute
in interface Command
- Specified by:
execute
in class AbstractCommand
getValue
public boolean getValue()
setValue
public void setValue(boolean newValue)
createMenuProvider
public CommandMenuItemProvider createMenuProvider(CommandView commandView,
org.eclipse.swt.widgets.Menu menu,
int index)
- Description copied from interface:
CustomMenuCommand
- Create a menu UI provider for the command.
- Specified by:
createMenuProvider
in interface CustomMenuCommand
- Parameters:
commandView
- The command view.menu
- The host menu for the UI.index
- The index for the UI item(s).
- Returns:
- A CommandMenuItemProvider that provides the UI.
createToolbarProvider
public CommandToolbarItemProvider createToolbarProvider(CommandView commandView,
org.eclipse.swt.widgets.ToolBar toolbar,
int index)
- Description copied from interface:
CustomToolbarCommand
- Create a toolbarUI provider for the command.
- Specified by:
createToolbarProvider
in interface CustomToolbarCommand
- Parameters:
commandView
- The command view.toolbar
- The host toolbar for the UI.index
- The index for the UI item(s).
- Returns:
- A CommandMenuItemProvider that provides the UI.
propertyValueChanged
public void propertyValueChanged(PropertyEvent e)
- Specified by:
propertyValueChanged
in interface PropertyListener
Copyright © 2008 Commonwealth of Australia