dsto.dfc.swing.commands
Interface EnumeratedCommand
- All Superinterfaces:
- Command, EnumerationValue, Iconic, PropertyEventSource
- All Known Implementing Classes:
- AbstractEnumeratedCommand
public interface EnumeratedCommand
- extends Command, EnumerationValue, PropertyEventSource
Defines a command whose behaviour 'selects' from a defined set of
enumerated values.
- Version:
- $Revision$
- Author:
- Matthew
- See Also:
EnumerationValue
,
AbstractEnumeratedCommand
Method Summary |
int |
getMaxSelectedValues()
Get the maximum number of values that may be selected at any one
time. |
Object[] |
getNextSelectedValues()
Get the values that will be set by executing the command. |
Object[] |
getSelectedValues()
The currently selected values. |
void |
setNextSelectedValues(Object[] values)
Set the values that will be 'selected' when execute() is next
called (this is usually called immediately before execute() by an
action listener attached to the appropriate menu item). |
Methods inherited from interface dsto.dfc.swing.commands.Command |
canReplace, execute, getAccelerator, getDescription, getDisplayName, getGroupInView, getLogString, getMnemonic, getName, isEnabled, isInteractive |
setNextSelectedValues
void setNextSelectedValues(Object[] values)
- Set the values that will be 'selected' when execute() is next
called (this is usually called immediately before execute() by an
action listener attached to the appropriate menu item). The
number of values in the array must not be more than specified by
getMaxSelectedValues().
- See Also:
getMaxSelectedValues()
getNextSelectedValues
Object[] getNextSelectedValues()
- Get the values that will be set by executing the command.
- See Also:
setNextSelectedValues(java.lang.Object[])
getSelectedValues
Object[] getSelectedValues()
- The currently selected values. If these values change, the
command should fire a property change event. If
maxSelectedValues is 0, this should return null or an empty
array.
getMaxSelectedValues
int getMaxSelectedValues()
- Get the maximum number of values that may be selected at any one
time. eg this may affect the way the menu items are rendered for
the command: if max selected values is 0, then vanilla
JMenuItem's are used for each value, if 1 JRadioButtonMenuItem's
are used and if >1 then JCheckBoxMenuItem's are used.
- See Also:
setNextSelectedValues(java.lang.Object[])
Copyright © 2008 Commonwealth of Australia