Class BooleanSelection

java.lang.Object
com.iizix.prop.ui.selection.BooleanSelection
All Implemented Interfaces:
IUIBooleanSelection, IUISelection

public class BooleanSelection extends Object implements IUIBooleanSelection
The boolean on/off (or selected/unselected) selection state.
Author:
Christopher Mindus
  • Constructor Details

    • BooleanSelection

      public BooleanSelection(IUIBooleanSelectionComp source, boolean isSelected)
      Constructor.
      Parameters:
      source - The component source.
      isSelected - The selection state.
  • Method Details

    • isSelected

      public boolean isSelected()
      Returns the selection state.
      Specified by:
      isSelected in interface IUIBooleanSelection
      Returns:
      true if selected, false if unselected.
    • isUnselected

      public boolean isUnselected()
      Returns if the selection is not set.
      Specified by:
      isUnselected in interface IUIBooleanSelection
      Returns:
      true if unselected, true if selected.
    • isON

      public boolean isON()
      Returns if the selection is "on".
      Specified by:
      isON in interface IUIBooleanSelection
      Returns:
      true if on, false otherwise.
    • isOFF

      public boolean isOFF()
      Returns if the selection is "off".
      Specified by:
      isOFF in interface IUIBooleanSelection
      Returns:
      true if off, true otherwise.
    • getBooleanSource

      public IUIBooleanSelectionComp getBooleanSource()
      Get the source component of the event.
      Specified by:
      getBooleanSource in interface IUIBooleanSelection
      Returns:
      The boolean-type component.
    • getSource

      public IUISelectionComp getSource()
      Get the source component of the event.
      Specified by:
      getSource in interface IUISelection
      Returns:
      The source.
    • getUISource

      public UIComp getUISource()
      Gets the UI component being the source of the event.
      Specified by:
      getUISource in interface IUISelection
      Returns:
      The UI component.
    • equals

      public boolean equals(Object o)
      Equals.
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Converts the selection to a string.
      Overrides:
      toString in class Object