Package com.jidesoft.swing
Class SplitButtonGroup
- java.lang.Object
-
- javax.swing.ButtonGroup
-
- com.jidesoft.swing.SplitButtonGroup
-
- All Implemented Interfaces:
java.io.Serializable
public class SplitButtonGroup extends javax.swing.ButtonGroup
SplitButtonGroup extends ButtonGroup to provide the same button grouping function for JideToggleSplitButton. SplitButtonGroup supports regular JButton or JideButton as well.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SplitButtonGroup()
Creates a newButtonGroup
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(javax.swing.AbstractButton b)
Adds the button to the group.boolean
isSelected(javax.swing.ButtonModel m)
Returns whether aButtonModel
is selected.void
remove(javax.swing.AbstractButton b)
Removes the button from the group.void
setSelected(javax.swing.ButtonModel m, boolean b)
Sets the selected value for theButtonModel
.
-
-
-
Method Detail
-
add
public void add(javax.swing.AbstractButton b)
Adds the button to the group.- Overrides:
add
in classjavax.swing.ButtonGroup
- Parameters:
b
- the button to be added
-
remove
public void remove(javax.swing.AbstractButton b)
Removes the button from the group.- Overrides:
remove
in classjavax.swing.ButtonGroup
- Parameters:
b
- the button to be removed
-
setSelected
public void setSelected(javax.swing.ButtonModel m, boolean b)
Sets the selected value for theButtonModel
. Only one button in the group may be selected at a time.- Overrides:
setSelected
in classjavax.swing.ButtonGroup
- Parameters:
m
- theButtonModel
b
-true
if this button is to be selected, otherwisefalse
-
isSelected
public boolean isSelected(javax.swing.ButtonModel m)
Returns whether aButtonModel
is selected.- Overrides:
isSelected
in classjavax.swing.ButtonGroup
- Returns:
true
if the button is selected, otherwise returnsfalse
-
-