|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectdsto.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 CompositeCommandpublic abstract int getMaxSelectedCommands()
CompositeCommand
getMaxSelectedCommands in interface CompositeCommandpublic abstract Command[] getCommands()
CompositeCommand
getCommands in interface CompositeCommandpublic abstract void execute()
Command
execute in interface Commandexecute in class AbstractCommandpublic abstract String getName()
Command
getName in interface CommandgetName in interface IconicgetName in class AbstractCommandpublic abstract String getDescription()
Command
getDescription in interface CommandgetDescription in class AbstractCommandpublic abstract boolean isInteractive()
Command
isInteractive in interface CommandisInteractive in class AbstractCommandpublic abstract String getGroupInView(String viewName)
CommandIf 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 CommandgetGroupInView in class AbstractCommandviewName - The name of the view.
public abstract char getMnemonic()
Command
getMnemonic in interface CommandgetMnemonic in class AbstractCommandpublic abstract Icon getIcon()
Iconic
getIcon in interface IconicgetIcon in class AbstractCommandpublic String getLogString()
AbstractCommand
getLogString in interface CommandgetLogString in class AbstractCommandpublic boolean canReplace(Command command)
AbstractCommand
canReplace in interface CommandcanReplace in class AbstractCommandpublic KeyStroke getAccelerator()
Command
getAccelerator in interface CommandgetAccelerator in class AbstractCommandpublic Icon getLargeIcon()
Iconic
getLargeIcon in interface IconicgetLargeIcon in class AbstractCommandpublic boolean isSelected(Command cmdChild)
public List createMenuItems()
CustomMenuProvider
createMenuItems in interface CustomMenuProviderpublic void destroyMenuItems(List menuItems)
CustomMenuProvider
destroyMenuItems in interface CustomMenuProviderpublic void removeChangeListener(ChangeListener l)
removeChangeListener in interface CustomMenuProviderpublic 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 | |||||||||