|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object dsto.dfc.swing.commands.AbstractCommand dsto.dfc.swing.commands.AbstractMutableCommand dsto.dfc.swing.commands.AbstractCompositeCommand
public abstract class AbstractCompositeCommand
The AbstractCompositeCommand should be used when you want to have a list of commands that are in some way linked together.
Field Summary |
---|
Fields inherited from class dsto.dfc.swing.commands.AbstractMutableCommand |
---|
listeners |
Fields inherited from class dsto.dfc.swing.commands.AbstractCommand |
---|
displayName, icon |
Fields inherited from interface dsto.dfc.swing.icons.Iconic |
---|
NULL_ICON |
Constructor Summary | |
---|---|
AbstractCompositeCommand()
Default constructor creates a menu provider. |
Method Summary | |
---|---|
void |
addChangeListener(ChangeListener l)
Custom menu providers should fire change events when the menu UI needs to be updated. |
boolean |
canReplace(Command command)
Returns false; |
List |
createMenuItems()
Create the menu items that represent the UI for the command. |
void |
destroyMenuItems(List menuItems)
Destroy menu items created by createMenuItems (). |
abstract void |
execute()
Execute the command. |
KeyStroke |
getAccelerator()
Get a keyboard accelerator for the command. |
abstract Command[] |
getCommands()
Returns the complete list of defined 'selectable' commands. |
abstract String |
getDescription()
A short description of the command, suitable for a tooltip or use in a status panel. |
abstract String |
getGroupInView(String viewName)
Get the preferred group that this command should appear in for a given view. |
abstract Icon |
getIcon()
The small (16x16) icon for the object. |
Icon |
getLargeIcon()
The large (32x32) icon. |
String |
getLogString()
Returns the command name followed by empty brackets. |
abstract int |
getMaxSelectedCommands()
Get the maximum number of commands that may be selected at any one time. |
abstract char |
getMnemonic()
Get a character shortcut for the command (eg for use on a menu). |
abstract String |
getName()
The formal identifying name for this command (eg edit.Copy, file.Open). |
abstract Command[] |
getSelectedCommands()
Gets the currently selected command/s. |
abstract boolean |
isInteractive()
True if this command will interact with the user when execute() is called. |
boolean |
isSelected(Command cmdChild)
|
void |
removeChangeListener(ChangeListener l)
|
Methods inherited from class dsto.dfc.swing.commands.AbstractMutableCommand |
---|
addPropertyChangeListener, clone, isEnabled, removePropertyChangeListener, setEnabled, setIcon |
Methods inherited from class dsto.dfc.swing.commands.AbstractCommand |
---|
actionPerformed, getDefaultDisplayName, getDisplayName, setDisplayName |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface dsto.dfc.swing.commands.Command |
---|
getDisplayName, isEnabled |
Methods inherited from interface dsto.dfc.util.PropertyEventSource |
---|
addPropertyChangeListener, removePropertyChangeListener |
Constructor Detail |
---|
public AbstractCompositeCommand()
Method Detail |
---|
public abstract Command[] getSelectedCommands()
CompositeCommand
getSelectedCommands
in interface CompositeCommand
public abstract int getMaxSelectedCommands()
CompositeCommand
getMaxSelectedCommands
in interface CompositeCommand
public abstract Command[] getCommands()
CompositeCommand
getCommands
in interface CompositeCommand
public abstract void execute()
Command
execute
in interface Command
execute
in class AbstractCommand
public abstract String getName()
Command
getName
in interface Command
getName
in interface Iconic
getName
in class AbstractCommand
public abstract String getDescription()
Command
getDescription
in interface Command
getDescription
in class AbstractCommand
public abstract boolean isInteractive()
Command
isInteractive
in interface Command
isInteractive
in class AbstractCommand
public abstract String getGroupInView(String viewName)
Command
If the command changes its group in any view it should generate a groupInView property change event with the old value set to the old group and the new value set to the new group.
getGroupInView
in interface Command
getGroupInView
in class AbstractCommand
viewName
- The name of the view.
public abstract char getMnemonic()
Command
getMnemonic
in interface Command
getMnemonic
in class AbstractCommand
public abstract Icon getIcon()
Iconic
getIcon
in interface Iconic
getIcon
in class AbstractCommand
public String getLogString()
AbstractCommand
getLogString
in interface Command
getLogString
in class AbstractCommand
public boolean canReplace(Command command)
AbstractCommand
canReplace
in interface Command
canReplace
in class AbstractCommand
public KeyStroke getAccelerator()
Command
getAccelerator
in interface Command
getAccelerator
in class AbstractCommand
public Icon getLargeIcon()
Iconic
getLargeIcon
in interface Iconic
getLargeIcon
in class AbstractCommand
public boolean isSelected(Command cmdChild)
public List createMenuItems()
CustomMenuProvider
createMenuItems
in interface CustomMenuProvider
public void destroyMenuItems(List menuItems)
CustomMenuProvider
destroyMenuItems
in interface CustomMenuProvider
public void removeChangeListener(ChangeListener l)
removeChangeListener
in interface CustomMenuProvider
public void addChangeListener(ChangeListener l)
CustomMenuProvider
addChangeListener
in interface CustomMenuProvider
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |