public class CommandToggleGroupModel
extends java.lang.Object
| Constructor | Description |
|---|---|
CommandToggleGroupModel() |
Creates a new command group.
|
| Modifier and Type | Method | Description |
|---|---|---|
void |
add(Command command) |
Adds the specified command to the group.
|
void |
clearSelection() |
Clears the selection of this command toggle group model.
|
java.util.Collection<Command> |
getCommands() |
Returns an unmodifiable collection with all the commands tracked by this model.
|
Command |
getSelected() |
Returns the selected command of this group model.
|
boolean |
isAllowsClearingSelection() |
Returns the current value for clearing selection.
|
void |
remove(Command command) |
Removes the specified command from the group.
|
void |
removeAll() |
|
void |
setAllowsClearingSelection(boolean allowsClearingSelection) |
Sets the new value for clearing selection.
|
void |
setSelected(Command command,
boolean isSelected) |
Changes the selected status of the specified command.
|
public CommandToggleGroupModel()
public java.util.Collection<Command> getCommands()
public void setAllowsClearingSelection(boolean allowsClearingSelection)
true is
passed, the selection can be cleared in clearSelection() or
setSelected(Command, boolean) (passing the
currently selected command and false).allowsClearingSelection - The new value for clearing selection.public boolean isAllowsClearingSelection()
true is
returned when selection can be cleared in clearSelection() or
setSelected(Command, boolean) (passing the
currently selected command and false).public void add(Command command)
command - The command to be added.public void remove(Command command)
command - The command to be removedpublic void removeAll()
public void setSelected(Command command, boolean isSelected)
command - command.isSelected - Selection indication.public Command getSelected()
null.public void clearSelection()