com.ontimize.util.swing
Class NullableButtonGroup
java.lang.Object
javax.swing.ButtonGroup
com.ontimize.util.swing.NullableButtonGroup
- All Implemented Interfaces:
- java.io.Serializable
- public class NullableButtonGroup
- extends javax.swing.ButtonGroup
This class implements a ButtonGroup. Originally, this component always tries to select one of the components (radio buttons typically) placed inside. With this class is allowed null selection
(a non-visible radio button is selected).
- Author:
- Imatia Innovation SL
- See Also:
- Serialized Form
|
Field Summary |
protected boolean |
allowNullSelection
Boolean to allow null selection. |
static java.lang.String |
NULL_SELECTION
|
protected javax.swing.JRadioButton |
nullButton
Hidden JRadioButton to allow null selection in radio buttons. |
| Fields inherited from class javax.swing.ButtonGroup |
buttons |
| Methods inherited from class javax.swing.ButtonGroup |
add, getButtonCount, getElements, getSelection, isSelected, remove |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NULL_SELECTION
public static final java.lang.String NULL_SELECTION
- See Also:
- Constant Field Values
nullButton
protected javax.swing.JRadioButton nullButton
- Hidden JRadioButton to allow null selection in radio buttons. It is automatically selected when
not exist visible RadioButtons.
allowNullSelection
protected boolean allowNullSelection
- Boolean to allow null selection.
NullableButtonGroup
public NullableButtonGroup(boolean allowNullSelection)
createcomponent
public void createcomponent()
setSelected
public void setSelected(javax.swing.ButtonModel m,
boolean b)