dsto.dfc.swing.commands
Interface CompositeCommand

All Superinterfaces:
Command, Iconic, PropertyEventSource
All Known Implementing Classes:
AbstractCompositeCommand

public interface CompositeCommand
extends Command, PropertyEventSource

Use when you want a command that 'selects' from a defined set of commands.

Author:
Mofeed.

Field Summary
 
Fields inherited from interface dsto.dfc.swing.icons.Iconic
NULL_ICON
 
Method Summary
 Command[] getCommands()
          Returns the complete list of defined 'selectable' commands.
 int getMaxSelectedCommands()
          Get the maximum number of commands that may be selected at any one time.
 Command[] getSelectedCommands()
          Gets the currently selected command/s.
 
Methods inherited from interface dsto.dfc.swing.commands.Command
canReplace, execute, getAccelerator, getDescription, getDisplayName, getGroupInView, getLogString, getMnemonic, getName, isEnabled, isInteractive
 
Methods inherited from interface dsto.dfc.swing.icons.Iconic
getIcon, getLargeIcon
 
Methods inherited from interface dsto.dfc.util.PropertyEventSource
addPropertyChangeListener, removePropertyChangeListener
 

Method Detail

getSelectedCommands

Command[] getSelectedCommands()
Gets the currently selected command/s. If these values change, the composite command should fire a property change event. If maxSelectedCommands = 0, this should return an empty array.


getMaxSelectedCommands

int getMaxSelectedCommands()
Get the maximum number of commands 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, the normal JMenuItems are used for each value, if 1, then JRadioButtonMenuItems are used and if > 1 then JCheckBoxMenuItems are used.


getCommands

Command[] getCommands()
Returns the complete list of defined 'selectable' commands.



Copyright © 2008 Commonwealth of Australia