Ontimize 5.2072EN

com.ontimize.util.swing
Class NullableButtonGroup

java.lang.Object
  extended byjavax.swing.ButtonGroup
      extended bycom.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
 
Constructor Summary
NullableButtonGroup(boolean allowNullSelection)
           
 
Method Summary
 void createcomponent()
           
 void setSelected(javax.swing.ButtonModel m, boolean b)
           
 
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
 

Field Detail

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.

Constructor Detail

NullableButtonGroup

public NullableButtonGroup(boolean allowNullSelection)
Method Detail

createcomponent

public void createcomponent()

setSelected

public void setSelected(javax.swing.ButtonModel m,
                        boolean b)

Ontimize