Klasse UiListControl<T,C extends UiListControl<T,C>>

java.lang.Object
org.obrel.core.RelatedObject
Alle implementierten Schnittstellen:
UiHasFocusEvents<T,C>, UiHasUpdateEvents<T,C>, org.obrel.core.Relatable
Bekannte direkte Unterklassen:
UiMultiSelectionList, UiSingleSelectionList

public abstract class UiListControl<T,C extends UiListControl<T,C>> extends UiControl<T,C> implements UiHasUpdateEvents<T,C>
Base class for interactive components that display a list of selectable values.
  • Konstruktordetails

    • UiListControl

      public UiListControl(UiContainer<?> parent, org.obrel.core.RelationType<T> paramType, de.esoco.lib.property.ListStyle listStyle)
      Creates a new instance for an existing parameter type.
      Parameter:
      parent - The parent container
      paramType - The parameter relation type
      listStyle - The list style
    • UiListControl

      public UiListControl(UiContainer<?> parent, Class<? super T> datatype, de.esoco.lib.property.ListStyle listStyle)
      Creates a new instance. If the datatype is an enum all enum values will be pre-set as the list values.
      Parameter:
      parent - The parent container
      datatype - The datatype of the list values
      listStyle - The list style
  • Methodendetails

    • getSelection

      public T getSelection()
      Returns the currently selected list value.
      Gibt zurück:
      The selected value (NULL for none)
    • onSelection

      public final C onSelection(Consumer<T> eventHandler)
      Sets the event handler for selection events of this table.
      Parameter:
      eventHandler - The event handler
      Gibt zurück:
      This instance for concatenation
    • onUpdate

      public C onUpdate(Consumer<T> eventHandler)
      Registers an event handler that will be invoked on update events with the new component value.
      Angegeben von:
      onUpdate in Schnittstelle UiHasUpdateEvents<T,C extends UiListControl<T,C>>
      Parameter:
      eventHandler - The event handler to be invoked
      Gibt zurück:
      The component the handler has been registered on
    • select

      public C select(T value)
      Sets the selected value.
      Parameter:
      value - The new selection or NULL for none
      Gibt zurück:
      This instance
    • setSelection

      public void setSelection(T value)
      Sets the selected value.
      Parameter:
      value - The new selection or NULL for none