dsto.dfc.swt.commands
Class CmdToggleWindowStyle
java.lang.Object
dsto.dfc.util.BasicPropertyEventSource
dsto.dfc.swt.commands.AbstractCommand
dsto.dfc.swt.commands.BasicToggleCommand
dsto.dfc.swt.commands.CmdToggleWindowStyle
- All Implemented Interfaces:
- Command, CustomMenuCommand, CustomToolbarCommand, Copyable, JavaBean, PropertyEventSource, Serializable, Cloneable
public class CmdToggleWindowStyle
- extends BasicToggleCommand
Command to toggle a style setting on a JFace window. Since most styles
cannot be changed on a shell once created, the style setting is changed by
toggling the boolean value of given data bean property and re-creating the
window using close/open. It is assumed that the window bases its style
settings on the changed property.
- Version:
- $Revision$
- Author:
- mpp
- See Also:
- Serialized Form
Method Summary |
void |
execute()
Execute the command. |
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 |
CmdToggleWindowStyle
public CmdToggleWindowStyle(String name,
org.eclipse.jface.window.Window window,
IDataBean preferences,
String styleProperty)
- Create the command.
- Parameters:
name
- The name of the command eg "Always On Top", "Resizable", etc.window
- The window.preferences
- The preferences to modify.styleProperty
- The property to toggle.
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
- Overrides:
execute
in class BasicToggleCommand
Copyright © 2008 Commonwealth of Australia