Interface IUICheckComponent

    • Field Detail

      • CHECKED_ATOM

        static final Atom CHECKED_ATOM
        Property atom: checked.
      • PN_CHECKED_VALUE

        static final java.lang.String PN_CHECKED_VALUE
        Property name: checked value.
        See Also:
        Constant Field Values
      • PN_UNCHECKED_VALUE

        static final java.lang.String PN_UNCHECKED_VALUE
        Property name: unchecked value.
        See Also:
        Constant Field Values
      • PN_CHECK_NO_MATCH

        static final java.lang.String PN_CHECK_NO_MATCH
        Property name: check state for non-matching values.
        See Also:
        Constant Field Values
    • Method Detail

      • 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.
      • 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.