Interface SelectorSection

    • Method Detail

      • setItems

        void setItems​(java.util.List<TypedObject> items)
        Sets the (root) items which this selector should render.
        Parameters:
        items - this selector's new items
      • getItems

        java.util.List<TypedObject> getItems()
        Returns this selector's (root) items.
        Returns:
        the root items of this selector
      • setMultiple

        void setMultiple​(boolean multi)
        Sets whether this selector supports multiple selection or not.
        Parameters:
        multi - whether multiple selection should be allowed or not
      • isMultiple

        boolean isMultiple()
        Returns whether this selector supports multiple selection or not.
        Returns:
        true if multiple selection is allowed, false otherwise
      • setSelectedItems

        void setSelectedItems​(java.util.List<TypedObject> selectedItems)
        Sets the selector's selected items to selectedItems.
        Parameters:
        selectedItems - the new selection of the selector
        See Also:
        setSelectedItemsDirectly(List)
      • setSelectedItem

        void setSelectedItem​(TypedObject selectedItem)
        Sets the selector's selected item to selectedItem
        Parameters:
        selectedItem - the selected item
      • getSelectedItems

        java.util.List<TypedObject> getSelectedItems()
        Returns the selector's currently selected items.
        Returns:
        the selector's selected items
      • getSelectedItem

        TypedObject getSelectedItem()
        Returns the selected item.

        Note: In multiple selection mode, it is up to the implementing classes to define what is considered to be the selected item.

        Returns:
        the selected item
        See Also:
        getSelectedItems()
      • selectionChanged

        void selectionChanged()
        Called whenever this selector's selection has changed.
      • isItemActive

        boolean isItemActive​(TypedObject item)
        Returns whether the item item is active or not. Exactly what active means depends on the implementation. Typically active selector items are rendered differently than normal items.

        Parameters:
        item - the item
        Returns:
        true if item is active, false otherwise
      • setInitiallySelected

        void setInitiallySelected​(boolean initSelection)
        Sets whether the first item should be initially selected or not.
        Parameters:
        initSelection - true if inital selection should be enabled, false otherwise
      • isInitiallySelected

        boolean isInitiallySelected()
        Returns whether initial selection is enabled or not.
        Returns:
        true if initial selection is enabled, false otherwise