Interface IUICheck2Component

All Superinterfaces:
IComponent, ICustomDataProvider, IGProp<GProp<?>[]>, IMessageBox, IPropCnr, IUIBooleanSelectionComp, IUIComp, IUISelectionComp, IVSComponentListener, IVSComponentState, IVSFieldListener
All Known Implementing Classes:
EMUISwitch, MUISwitch

public interface IUICheck2Component extends IUIBooleanSelectionComp
Components with check state implement this interface without third state possibility.
Author:
Christopher Mindus
  • Field Details

  • Method Details

    • getCheckState

      default int getCheckState()
      Gets the check state.

      Third state is not supported.

      Returns:
      Returns 0=unchecked, 1=checked.
    • isChecked

      default boolean isChecked()
      Verifies if the component is checked.
      Returns:
      true if the component is checked, false if unselected or in third state.
    • isSelected

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

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

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

      default boolean isOFF()
      Returns if the selection is "off".
      Specified by:
      isOFF in interface IUIBooleanSelectionComp
      Returns:
      true if off, true otherwise.
    • setChecked

      default boolean setChecked(boolean on)
      Sets the checked state.
      Parameters:
      on - The check state.
      Returns:
      true if state is changed, false for no change.
    • setChecked

      default boolean setChecked(int state)
      Sets the checked state.
      Parameters:
      state - The check state: 0=unchecked, 1=checked.

      Third state is not supported.

      Returns:
      true if state is changed, false for no change or failure (state has wrong value).
    • setSelection

      default boolean setSelection(boolean isSelected)
      Sets the selection.
      Specified by:
      setSelection in interface IUIBooleanSelectionComp
      Parameters:
      isSelected - The selected state.
      Returns:
      true if state is changed, false for no change.
    • getSelectionType

      default int getSelectionType()
      Gets the selection type of the component.
      Specified by:
      getSelectionType in interface IUISelectionComp
      Returns:
      A value indicating the selection capability as the SELECTION_TYPE_* values define.
    • getSelection

      default IUISelection getSelection()
      Gets the current selection of the component.
      Specified by:
      getSelection in interface IUISelectionComp
      Returns:
      The current selection of the component.
    • setSelection

      default String setSelection(IUISelection selection)
      Sets the selection.
      Specified by:
      setSelection in interface IUISelectionComp
      Parameters:
      selection - The selection.
      Returns:
      null if selection is set successfully, otherwise the reason why the selection failed to be set, e.g. "Unsupported selection base" if the selection is indexed for a checkbox that only supports tri-state based selections.