Interface IUIRadioComponent

    • Field Detail

      • PN_GROUP_NAME

        static final java.lang.String PN_GROUP_NAME
        Property name: radio component group StringProp.
        See Also:
        Constant Field Values
      • PN_SELECTED

        static final java.lang.String PN_SELECTED
        Property name: selected BoolProp.
        See Also:
        Constant Field Values
      • SELECTED_ATOM

        static final Atom SELECTED_ATOM
        Property atom: selected BoolProp.
      • PN_SELECTED_NO_MATCH

        static final java.lang.String PN_SELECTED_NO_MATCH
        Property name: selection for no match BoolProp.
        See Also:
        Constant Field Values
      • PN_SELECTED_VALUE

        static final java.lang.String PN_SELECTED_VALUE
        Property name: selected value.
        See Also:
        Constant Field Values
    • Method Detail

      • getGroupName

        default java.lang.String getGroupName()
        Gets the group name of the component.
        Returns:
        The group name or null for none.
      • isUnselected

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

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

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

        default int getSelectedIndex()
        Gets the first selected index. For radio buttons and menu items, this means the index in the radio group. The ordering of the group is NOT related to the tab order, but rather the ordering they are found from container to children and so on.
        Specified by:
        getSelectedIndex in interface IUISingleIndexedSelectionComp
        Returns:
        The first index in the current selection, or -1 for none.
      • getSelectedIndicies

        default int[] getSelectedIndicies()
        Gets the selected indicies. For radio buttons and menu items, this means the index in the radio group. The ordering of the group is NOT related to the tab order, but rather the ordering they are found from container to children and so on.
        Specified by:
        getSelectedIndicies in interface IUIIndexedSelectionComp
        Specified by:
        getSelectedIndicies in interface IUISingleIndexedSelectionComp
        Returns:
        A new array of the selected indices (that may be modified to your liking), or a static zero in length array for no selection. The array is either of length 1 for one selection, or zero for none.
      • setSelection

        default java.lang.String setSelection​(int index)
        Sets the selection as a single selected item at specified index.
        Specified by:
        setSelection in interface IUIIndexedSelectionComp
        Parameters:
        index - The single item to select at index, -1 to clear the selection.
        Returns:
        null for success, otherwise an error message why the selection failed.
      • isSelectedByDefault

        default boolean isSelectedByDefault()
        Checks if this radio component is selected by default in the group when selection doesn't match. Only one radio component in a group can return true with this method.
        Returns:
        true if selected by default, false otherwise.
      • setSelection

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

        default UIComp[] getRadioSelectionComponents()
        Gets the components being part of the selection group. Each component returned implements the this IUIRadioComponent interface.
        Returns:
        An array of the selection components.
      • getSelectedRadioComponent

        default UIComp getSelectedRadioComponent()
        Gets the currently selected radio component in the group.
        Returns:
        The selected radio component, null for none. The component implements this IUIRadioComponent interface.
      • 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.