Package com.kheops.ui.component
Class ButtonGroup
java.lang.Object
com.kheops.ui.component.ButtonGroup
This class is 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.
 
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.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidAdds the button to the group.voidAdds a listener for this group.voidbuttonSelected(Button button) Sets/unsets the selected value for theButton.voidbuttonSelected(Button button, boolean fireActionEvent) Sets/unsets the selected value for theButton.Returns the selected button;nullif none.voidRemoves the button from the group.voidRemoves all buttons from the group.
- 
Constructor Details- 
ButtonGrouppublic ButtonGroup()Creates a newButtonGroup.
 
- 
- 
Method Details- 
addButtonSelectionChangedListenerAdds a listener for this group.- Parameters:
- listener-
 
- 
addAdds the button to the group.- Parameters:
- button- the button to be added
 
- 
removeAllpublic void removeAll()Removes all buttons from the group.
- 
removeRemoves the button from the group.- Parameters:
- button- the button to be removed
 
- 
buttonSelectedSets/unsets the selected value for theButton. Only one button in the group may be selected at a time.- Parameters:
- button- the- Button
 
- 
buttonSelectedSets/unsets the selected value for theButton. Only one button in the group may be selected at a time.- Parameters:
- button- the- Button
- fireActionEvent- do we fire the ActionEvent associated with this button
 
- 
getSelectionReturns the selected button;nullif none.- Returns:
- selected button
 
 
-