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