Interface IUICheckComponent

All Superinterfaces:
IComponent, ICustomDataProvider, IGProp<GProp<?>[]>, IMessageBox, IPropCnr, IUIComp, IUISelectionComp, IUITriStateSelectionComp, IVSComponentListener, IVSComponentState, IVSFieldListener
All Known Implementing Classes:
EUICheckBox, EUICheckedMenuItem, UICheckBox, UICheckedMenuItem

public interface IUICheckComponent extends IUITriStateSelectionComp
Components with check state implement this interface.
Author:
Christopher Mindus
  • Field Details

  • Method Details

    • getCheckState

      default int getCheckState()
      Gets the check state.
      Specified by:
      getCheckState in interface IUITriStateSelectionComp
      Returns:
      Returns 0={$link com.iizix.prop.ui.IUITriStateSelection#UNSELECTED}, 1={$link com.iizix.prop.ui.IUITriStateSelection#CHECKED} or 2={$link com.iizix.prop.ui.IUITriStateSelection#THIRD_STATE}.
    • isChecked

      default boolean isChecked()
      Verifies if the component is checked.
      Specified by:
      isChecked in interface IUITriStateSelectionComp
      Returns:
      true if the component is checked, false if unselected or in third state.
    • setChecked

      default boolean setChecked(boolean on)
      Sets the checked state.
      Specified by:
      setChecked in interface IUITriStateSelectionComp
      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.

      If a component has a VirtualSpace connection, setting the third state will not have any effect. This since it would create an inconsistent state of the component.

      Specified by:
      setChecked in interface IUITriStateSelectionComp
      Parameters:
      state - The check state: 0=unchecked, 1=checked, 2=third state.
      Returns:
      true if state is changed, false for no change or failure (state has wrong value).
    • isSelected

      default boolean isSelected()
      Returns the selection of state of the component.

      For a multiple-selection capable component, this indicates any selection, i.e. true is returned as soon as at least one element is selected, false for none.

      The checkbox for example has two "selected states": checked and third state: in this case, true is returned for the third state as well as the checked state.

      Specified by:
      isSelected in interface IUISelectionComp
      Returns:
      true if the component is selected, false otherwise.
    • isUnselected

      default boolean isUnselected()
      Returns if the state is unselected.
      Returns:
      true if unchecked, false if checked or in third state.
    • isThirdState

      default boolean isThirdState()
      Returns if the state is third state, i.e. neither checked nor unselected.
      Returns:
      true if third state, false if checked or unselected.
    • 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 IUITriStateSelection getSelection()
      Gets the current selection of the component.
      Specified by:
      getSelection in interface IUISelectionComp
      Returns:
      The current selection of the component.
    • isSelectionTriStateBased

      default boolean isSelectionTriStateBased()
      Returns if the selection component supports tri-state based selection for e.g. checkboxes.
      Specified by:
      isSelectionTriStateBased in interface IUISelectionComp
      Returns:
      true.