Class RadioButtonGroup

java.lang.Object
com.spinyowl.legui.component.RadioButtonGroup
All Implemented Interfaces:
Serializable

public class RadioButtonGroup extends Object implements Serializable
Group of radio buttons which determines that only one radio button can be selected in group.
See Also:
  • Constructor Details

    • RadioButtonGroup

      public RadioButtonGroup()
      Default constructor.
  • Method Details

    • getGroupByIndex

      public static RadioButtonGroup getGroupByIndex(int index)
      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

      protected void add(RadioButton radioButton)
      Used to add radio button to group.
      Parameters:
      radioButton - radio button to add.
    • remove

      protected void remove(RadioButton radioButton)
      Used to remove radio button to group.
      Parameters:
      radioButton - radio button to remove.
    • getSelection

      public RadioButton getSelection()
      Used to get selected radio button.
      Returns:
      selected radio button.
    • clearSelection

      public void clearSelection()
      Used to deselect all of radio buttons.
    • setSelection

      public void setSelection(RadioButton radioButton, boolean selected)
      Used to change selected radio button.
      Parameters:
      radioButton - radio button to select.
      selected - flag to set for provider radio button.
    • isSelected

      public boolean isSelected(RadioButton radioButton)
      Returns true if provided radio button selected.
      Parameters:
      radioButton - radio button to check.
      Returns:
      true if provided radio button selected.
    • getRadioButtons

      public List<RadioButton> getRadioButtons()
      Returns all radio buttons in group.
      Returns:
      all radio buttons in group.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object