Interface ContentSelector<T>


public interface ContentSelector<T>
An UI for selecting content of a given type.
  • Method Details

    • addChangeListener

      void addChangeListener(ChangeListener l)
      Adds a change listener that will be notified when the selection has changed.
    • removeChangeListener

      void removeChangeListener(ChangeListener l)
      Removes a change listener.
    • getSelectorUI

      JPanel getSelectorUI()
      Returns the selector UI.
    • getTitle

      String getTitle()
      Returns the title of the selector, e.g. "Models" for models etc.
    • getTinyIcon

      Icon getTinyIcon(boolean inverted)
      Returns a representative icon for the type of entity being selected.
    • getMediumIcon

      Icon getMediumIcon(boolean inverted)
      Returns a representative icon for the type of entity being selected.
    • setAllSelected

      void setAllSelected()
      Sets the selector to select all entities.
    • setNoneSelected

      void setNoneSelected()
      Sets the selector to select no entities.
    • getSelectedContentRepresentation

      String getSelectedContentRepresentation()
      Returns a string representation for the selected content.
    • isContentSelected

      boolean isContentSelected()
      Returns true if any content is selected.
    • getSelectedContent

      T getSelectedContent()
      Returns the selected content, or null if no content was selected.
    • setSelectionContext

      default void setSelectionContext(String context)
      Set an optional context string for the selected entities. The default string will be for example "5 models". Adding a context string will change the message to "5 models {context}", e.g. "5 models will be published".
      Parameters:
      context -
    • setAlwaysSelected

      default void setAlwaysSelected(Predicate alwaysSelected)