Package com.spinyowl.legui.component
Class RadioButtonGroup
java.lang.Object
com.spinyowl.legui.component.RadioButtonGroup
- All Implemented Interfaces:
Serializable
Group of radio buttons which determines that only one radio button can be selected in group.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidadd(RadioButton radioButton) Used to add radio button to group.voidUsed to deselect all of radio buttons.booleanstatic RadioButtonGroupgetGroupByIndex(int index) Returns radioButtonGroup selected by index or new one.intgetIndex()Returns radio button group index.Returns all radio buttons in group.Used to get selected radio button.inthashCode()booleanisSelected(RadioButton radioButton) Returns true if provided radio button selected.protected voidremove(RadioButton radioButton) Used to remove radio button to group.voidsetSelection(RadioButton radioButton, boolean selected) Used to change selected radio button.toString()
-
Constructor Details
-
RadioButtonGroup
public RadioButtonGroup()Default constructor.
-
-
Method Details
-
getGroupByIndex
Returns radioButtonGroup selected by index or new one.- Parameters:
index- index to search.- Returns:
- RadioButtonGroup instance.
-
getIndex
public int getIndex()Returns radio button group index.- Returns:
- index of radio button group.
-
add
Used to add radio button to group.- Parameters:
radioButton- radio button to add.
-
remove
Used to remove radio button to group.- Parameters:
radioButton- radio button to remove.
-
getSelection
Used to get selected radio button.- Returns:
- selected radio button.
-
clearSelection
public void clearSelection()Used to deselect all of radio buttons. -
setSelection
Used to change selected radio button.- Parameters:
radioButton- radio button to select.selected- flag to set for provider radio button.
-
isSelected
Returns true if provided radio button selected.- Parameters:
radioButton- radio button to check.- Returns:
- true if provided radio button selected.
-
getRadioButtons
Returns all radio buttons in group.- Returns:
- all radio buttons in group.
-
toString
-
equals
-
hashCode
public int hashCode()
-