|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--fdda.dialog.swing.utils.ToggleButtonGroup
Groups several ToggleButtons together so that only one of them is active at each point of time. There may be a 'default' button to revert to. In this case, reverting may also be blocked by selecting the current button 'sticky'.
Constructor Summary | |
ToggleButtonGroup()
Constructor. |
Method Summary | |
void |
addButton(AbstractButton button)
Adds a button to the group. |
boolean |
isSticky()
Returns whether the current selection is 'sticky'. |
void |
removeButton(AbstractButton button)
Removes a button from the group. |
boolean |
revertToDefaultButton()
If a default button is specified and the current selection isn't sticky, selects the default button. |
void |
selectButton(AbstractButton button)
Selects a button. |
void |
selectButton(AbstractButton button,
boolean sticky)
Selects a button. |
void |
selectButtonSticky(AbstractButton button)
Selects a button. |
void |
setDefaultButton(AbstractButton button)
Sets the default button. |
boolean |
unselectCurrentButton(AbstractButton button)
Same as revertToDefaultButton, except that the sticky bit is ignored. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ToggleButtonGroup()
Method Detail |
public void addButton(AbstractButton button)
button
- the buttonpublic void removeButton(AbstractButton button)
button
- the buttonpublic void setDefaultButton(AbstractButton button)
button
- the button or nullpublic void selectButton(AbstractButton button)
button
- the button
IllegalArgumentException
- if button isn't in the grouppublic void selectButtonSticky(AbstractButton button)
button
- the button
IllegalArgumentException
- if button isn't in the grouppublic void selectButton(AbstractButton button, boolean sticky)
button
- the buttonsticky
- whether the selection shall be sticky
IllegalArgumentException
- if button isn't in the grouppublic boolean revertToDefaultButton()
public boolean unselectCurrentButton(AbstractButton button)
button
- the button
public boolean isSticky()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |