dog.gui
Class DCheckboxGroup

java.lang.Object
  |
  +--dog.gui.DCheckboxGroup
All Implemented Interfaces:
java.awt.event.ActionListener, java.util.EventListener, Referential

public class DCheckboxGroup
extends java.lang.Object
implements Referential, java.awt.event.ActionListener

A checkbox and button state manager.

This class handles a mutual exclusion relation between a set of checkboxes and buttons.


Field Summary
protected  java.util.Vector checkboxes
          The checkboxes managed by this group.
protected  DCheckbox current
          The currently selected checkbox.
protected  java.lang.Object reference
          The object reference.
 
Constructor Summary
DCheckboxGroup()
          Constructs a checkbox group.
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent event)
          One of the checkboxes was pressed.
 void addCheckbox(DCheckbox checkbox)
          Adds a checkbox to this group.
 java.lang.Object getReference()
          Returns the object reference.
 DCheckbox getSelectedCheckbox()
          Returns the current checkbox in this group.
 void removeCheckbox(DCheckbox checkbox)
          Removes a checkbox from this group.
 void setReference(java.lang.Object reference)
          Sets the object reference.
 void setSelectedCheckbox(DCheckbox checkbox)
          Sets the current checkbox in this group.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

checkboxes

protected java.util.Vector checkboxes
The checkboxes managed by this group.

current

protected DCheckbox current
The currently selected checkbox.

reference

protected java.lang.Object reference
The object reference.
Constructor Detail

DCheckboxGroup

public DCheckboxGroup()
Constructs a checkbox group.
Method Detail

getSelectedCheckbox

public DCheckbox getSelectedCheckbox()
Returns the current checkbox in this group.

setSelectedCheckbox

public void setSelectedCheckbox(DCheckbox checkbox)
                         throws java.beans.PropertyVetoException
Sets the current checkbox in this group.
Throws:
java.beans.PropertyVetoException - if the current checkbox could not be changed

getReference

public java.lang.Object getReference()
Returns the object reference.
Specified by:
getReference in interface Referential

setReference

public void setReference(java.lang.Object reference)
Sets the object reference.
Specified by:
setReference in interface Referential
Parameters:
reference - the object reference to store.

addCheckbox

public void addCheckbox(DCheckbox checkbox)
Adds a checkbox to this group.

removeCheckbox

public void removeCheckbox(DCheckbox checkbox)
Removes a checkbox from this group.

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent event)
One of the checkboxes was pressed.
Specified by:
actionPerformed in interface java.awt.event.ActionListener