Module tvbrowser

Class SelectableItem<E>


  • public class SelectableItem<E>
    extends java.lang.Object
    A class for a selectable Item.
    Author:
    René Mach
    • Constructor Summary

      Constructors 
      Constructor Description
      SelectableItem​(E item, boolean selected)  
      SelectableItem​(E item, boolean selected, boolean isSelectable)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      E getItem()  
      boolean isSelectable()  
      boolean isSelected()  
      void setSelected​(boolean selected)
      Sets the selection state of the item.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SelectableItem

        public SelectableItem​(E item,
                              boolean selected)
        Parameters:
        item - The item.
        selected - Item is selected.
      • SelectableItem

        public SelectableItem​(E item,
                              boolean selected,
                              boolean isSelectable)
        Parameters:
        item - The item.
        selected - Item is selected.
        isSelectable - If the item is slectable. Note the item still can be selected but cannot be changed by the user.
        Since:
        2.7.2
    • Method Detail

      • setSelected

        public void setSelected​(boolean selected)
        Sets the selection state of the item.
        Parameters:
        selected - If the item is selected.
      • isSelected

        public boolean isSelected()
        Returns:
        If the item is selected.
      • getItem

        public E getItem()
        Returns:
        The item.
      • isSelectable

        public boolean isSelectable()
        Returns:
        If this item can be changed by the user.
        Since:
        2.7.2