org.pietschy.command
Class ToggleGroupController

java.lang.Object
  extended by org.pietschy.command.ToggleGroupController

public class ToggleGroupController
extends java.lang.Object


Constructor Summary
ToggleGroupController()
           
 
Method Summary
 void add(ToggleCommand command)
           
 void handleSelectionRequest(ToggleCommand toggleCommand, boolean selected)
          Handles a particular selection request on a particular command.
 boolean isEmptySelectionAllowed()
          Checks if this groups allows empty selection.
 boolean isExclusive()
           
 void remove(ToggleCommand command)
           
 void setEmptySelectionAllowed(boolean emptySelectionAllowed)
          Sets if this groups allows empty selection.
 void setExclusive(boolean exclusive)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ToggleGroupController

public ToggleGroupController()
Method Detail

add

public void add(ToggleCommand command)

remove

public void remove(ToggleCommand command)

isEmptySelectionAllowed

public boolean isEmptySelectionAllowed()
Checks if this groups allows empty selection.

Returns:
true if the group allows empty selection, false if there must always be at least on selected command.

setEmptySelectionAllowed

public void setEmptySelectionAllowed(boolean emptySelectionAllowed)
Sets if this groups allows empty selection.

Parameters:
emptySelectionAllowed - true if the group should allow empty selection, false if there must always be at least on selected command.

isExclusive

public boolean isExclusive()

setExclusive

public void setExclusive(boolean exclusive)

handleSelectionRequest

public void handleSelectionRequest(ToggleCommand toggleCommand,
                                   boolean selected)
Handles a particular selection request on a particular command.

Parameters:
toggleCommand - the command that has been selected
selected - the new state of the command.