| Used to create a multiple-exclusion scope for a set of buttons.
Creating a set of buttons with the same ButtonGroup object means
that turning "on" one of those buttons turns off all other buttons in the
group.
A SButtonGroup can be used with any set of objects that inherit from
SAbstractButton , because they support the selected state.
Initially, all buttons in the group are unselected. Once any button is
selected, one button is always selected in the group. There is no way to
turn a button programmatically to "off", in order to clear the button
group.
Details:The implementation of the button group is a
bit tricky for the HTML generation. In HTML, groups of components are
usually formed by giving them all the same name. The problem is, that
any
SComponent , especially the
SAbstractButton , have globally
unique names. So this implementation gives all buttons in the
group the name of this SButtonGroup, and sets their value to
their actual name. So a bit of dispatching is already done here.
author: Armin Haaf See Also: javax.swing.ButtonGroup |