org.apache.pivot.wtk
Class ButtonGroup

java.lang.Object
  extended by org.apache.pivot.wtk.ButtonGroup
All Implemented Interfaces:
Iterable<Button>, Group<Button>
Direct Known Subclasses:
RadioButtonGroup

public class ButtonGroup
extends Object
implements Group<Button>, Iterable<Button>

Class representing a toggle button group.


Constructor Summary
ButtonGroup()
           
 
Method Summary
 boolean add(Button button)
          Adds an element to the group.
 boolean contains(Button button)
          Tests the existence of an element in the group.
 ListenerList<ButtonGroupListener> getButtonGroupListeners()
           
 Button getSelection()
           
 Iterator<Button> iterator()
           
 boolean remove(Button button)
          Removes an element from the group.
 void setSelection(Button selection)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ButtonGroup

public ButtonGroup()
Method Detail

add

public boolean add(Button button)
Description copied from interface: Group
Adds an element to the group.

Specified by:
add in interface Group<Button>
Parameters:
button - The element to add to the group.
Returns:
true if the element was added to the group; false, otherwise.

remove

public boolean remove(Button button)
Description copied from interface: Group
Removes an element from the group.

Specified by:
remove in interface Group<Button>
Parameters:
button - The element to remove from the set.
Returns:
true if the element was removed from the group; false, otherwise.

contains

public boolean contains(Button button)
Description copied from interface: Group
Tests the existence of an element in the group.

Specified by:
contains in interface Group<Button>
Parameters:
button - The element whose presence in the group is to be tested.
Returns:
true if the element exists in the group; false, otherwise.

getSelection

public Button getSelection()

setSelection

public void setSelection(Button selection)

iterator

public Iterator<Button> iterator()
Specified by:
iterator in interface Iterable<Button>

getButtonGroupListeners

public ListenerList<ButtonGroupListener> getButtonGroupListeners()