org.xmlhammer.gui.util
Class SelectablePanelGroup

java.lang.Object
  extended by org.xmlhammer.gui.util.SelectablePanelGroup

public class SelectablePanelGroup
extends java.lang.Object

Put comment...

Version:
$Revision: 1.4 $, $Date: 2006/09/06 17:48:19 $
Author:
Edwin Dankert

Field Summary
protected  java.util.ArrayList<SelectablePanel> panels
           
(package private)  SelectablePanel selection
          The current selection.
 
Constructor Summary
SelectablePanelGroup()
          default constructor
 
Method Summary
 void add(SelectablePanel p)
          Adds the panel to the group.
 java.util.Iterator<SelectablePanel> getElements()
          Returns all the panels that are participating in this group.
 int getPanelCount()
          Returns the number of panels in the group.
 SelectablePanel getSelection()
          Returns the model of the selected button.
 boolean isSelected(SelectablePanel p)
          Returns whether a SelectablePanel is selected.
 void remove(SelectablePanel p)
          Removes the panel from the group.
 void setSelected(SelectablePanel p, boolean b)
          Sets the selected value for the SelectablePanel.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

panels

protected java.util.ArrayList<SelectablePanel> panels

selection

SelectablePanel selection
The current selection.

Constructor Detail

SelectablePanelGroup

public SelectablePanelGroup()
default constructor

Method Detail

add

public void add(SelectablePanel p)
Adds the panel to the group.

Parameters:
p - the panel to be added

remove

public void remove(SelectablePanel p)
Removes the panel from the group.

Parameters:
p - the panel to be removed

getElements

public java.util.Iterator<SelectablePanel> getElements()
Returns all the panels that are participating in this group.

Returns:
an Enumeration of the panels in this group

getSelection

public SelectablePanel getSelection()
Returns the model of the selected button.

Returns:
the selected button model

setSelected

public void setSelected(SelectablePanel p,
                        boolean b)
Sets the selected value for the SelectablePanel. Only one panel in the group may be selected at a time.

Parameters:
p - the SelectablePanel
b - true if this panel is to be selected, otherwise false

isSelected

public boolean isSelected(SelectablePanel p)
Returns whether a SelectablePanel is selected.

Returns:
true if the panel is selected, otherwise returns false

getPanelCount

public int getPanelCount()
Returns the number of panels in the group.

Returns:
the number of panels.


Copyright 2005-2005-2008 Edwin Dankert. All Rights Reserved.