Class LightCombo

    • Constructor Detail

      • LightCombo

        public LightCombo​(boolean quickSearchAllowed,
                          boolean onlyComboValuesAllowed)
        Instantiates a new light combo.
        Parameters:
        quickSearchAllowed - true to enable quick search
        onlyComboValuesAllowed - true to allow only combo values
      • LightCombo

        public LightCombo​(boolean quickSearchAllowed)
        Instantiates a new light combo.
        Parameters:
        quickSearchAllowed - true to enable quick search
      • LightCombo

        public LightCombo()
        The default constructor without quick search.
    • Method Detail

      • setQuickSearchAllowed

        public void setQuickSearchAllowed​(boolean quickSearchAllowed)
        Sets if quicksearch is allowed.
        Parameters:
        quickSearchAllowed - - true if quicksearch should be allowed.
      • isQuickSearchAllowed

        public boolean isQuickSearchAllowed()
        Returns true if quicksearch is allowed.
        Returns:
        true if quicksearch is allowed.
      • getArrowButton

        public LightImageButton getArrowButton()
        Gets the arrow button.
        Returns:
        the arrow button.
      • addItem

        public void addItem​(LightCombo.Item item,
                            int index)
        Adds the item to this combo.
        Parameters:
        item - the item to add.
        index - the item index.
      • addItem

        public void addItem​(LightCombo.Item item)
        Appends the item to this combo.
        Parameters:
        item - the item to append.
      • setItem

        public void setItem​(int index,
                            LightCombo.Item item)
        Sets the item at the specified index.
        Parameters:
        index - the index of the item.
        item - the new item.
      • getSelectionIndex

        public int getSelectionIndex()
        Gets the selection index.
        Returns:
        the selection index or -1 if nothing selected.
      • getItemCount

        public int getItemCount()
        Gets the item count.
        Returns:
        the item count.
      • setItems

        public void setItems​(LightCombo.Item[] items)
        Sets all the items.
        Parameters:
        items - the new items.
      • removeAllItems

        public void removeAllItems()
        Removes all items from this combo.
      • removeItem

        public void removeItem​(int index)
        Removes the item at the specified index.
        Parameters:
        index - the index.
      • selectItem

        public void selectItem​(int index)
        Selects the item at the given index.
        Parameters:
        index - the index of item to select.
      • deselectAll

        public void deselectAll()
        Clears the item selection.
      • clearSelection

        public void clearSelection()
        Clears text selection.
      • addSelectionIndexListener

        public void addSelectionIndexListener​(IChangedListener<LightCombo,​Integer> listener)
        Adds the selection index listener.
        Parameters:
        listener - the listener to add.
      • removeSelectionIndexListener

        public void removeSelectionIndexListener​(IChangedListener<LightCombo,​Integer> listener)
        Removes the selection index listener.
        Parameters:
        listener - the listener to remove.
      • toggleDropdown

        public void toggleDropdown​(boolean visible)
        Displays or hides the drop-down list.
        Parameters:
        visible - true to show / refresh the drop-down, false to hide it.