Klasse UiContainer<C extends UiContainer<C>>

java.lang.Object
org.obrel.core.RelatedObject
de.esoco.process.param.ParameterWrapper<List<org.obrel.core.RelationType<?>>,C>
de.esoco.process.ui.UiComponent<List<org.obrel.core.RelationType<?>>,C>
de.esoco.process.ui.UiContainer<C>
Alle implementierten Schnittstellen:
org.obrel.core.Relatable
Bekannte direkte Unterklassen:
UiComposite, UiLayoutContainer, UiSubFragment

public abstract class UiContainer<C extends UiContainer<C>> extends UiComponent<List<org.obrel.core.RelationType<?>>,C>
The base class for all UI containers.
  • Konstruktordetails

    • UiContainer

      protected UiContainer(UiContainer<?> parent, UiLayout layout)
      Creates a new instance with a certain layout.
      Parameter:
      parent - The parent container or NULL for a root container
      layout - The layout of this container
    • UiContainer

      protected UiContainer(UiContainer<?> parent, InteractionFragment fragment, UiLayout layout)
      Creates a new instance that wraps a specific fragment.
      Parameter:
      parent - The parent container or NULL for a root container
      fragment - The fragment to wrap
      layout - The layout of this container
  • Methodendetails

    • builder

      public final UiBuilder<C> builder()
      Returns a UiBuilder instance for this container. The builder instance is cached internally so that it doesn't need to be kept by the invoking code.
      Gibt zurück:
      A UI builder instance for this container
    • clear

      public void clear()
      Clears this container by removing all child components.
    • getComponents

      public List<UiComponent<?,?>> getComponents()
      Returns the components of this container in the order in which they have been added.
      Gibt zurück:
      The collection of components
    • onClickInContainerArea

      public final C onClickInContainerArea(Consumer<C> eventHandler)
      Sets the event handler for click events on this container's visible area that is not occupied by components. The handler will receive this container instance as it's argument.
      Parameter:
      eventHandler - The event handler
      Gibt zurück:
      This instance for concatenation
    • toString

      public String toString()
      Setzt außer Kraft:
      toString in Klasse UiComponent<List<org.obrel.core.RelationType<?>>,C extends UiContainer<C>>
    • applyProperties

      protected void applyProperties()
      Overridden to apply the container layout and to invoke this method recursively on all child components.
      Setzt außer Kraft:
      applyProperties in Klasse UiComponent<List<org.obrel.core.RelationType<?>>,C extends UiContainer<C>>
      Siehe auch:
    • attachTo

      protected void attachTo(UiContainer<?> parent)
      Overridden to setup the container fragment and to attach it to the parent fragment.
      Setzt außer Kraft:
      attachTo in Klasse UiComponent<List<org.obrel.core.RelationType<?>>,C extends UiContainer<C>>
      Parameter:
      parent - The parent container
      Siehe auch:
    • buildContent

      protected void buildContent(UiBuilder<?> builder)
      This method can be overridden by subclasses to build the content of this container. Alternatively, the content can also be built by adding components to it after creation. If both mechanisms are used in combination the call to buildContent(UiBuilder) will occur afterwards because it is invoked just before the container is made visible (from applyProperties().

      The UiBuilder argument is the same instance that is returned by builder().

      The default implementation of this method does nothing.

      Parameter:
      builder - The builder to create the container UI with
    • componentAdded

      protected void componentAdded(UiComponent<?,?> component)
      Will be invoked if a new component has been added to this container. Can be overridden by subclasses to handle component additions. The complete list of child components (including the new one at the end) can be queried with getComponents().

      The default implementation does nothing.

      Parameter:
      component - The component that has been added
    • componentListChanged

      protected void componentListChanged()
      Will be invoked after the list of components has been modified. The base implementation resets the layout for recalculation.
    • getLayout

      protected UiLayout getLayout()
      Returns the layout of this container.
      Gibt zurück:
      The layout
    • isBuilt

      protected final boolean isBuilt()
      Checks if the content of this container has already been built. Can be used by subclasses to check the initialization status of a container.
      Gibt zurück:
      TRUE if the container content has been built
    • remove

      protected void remove(UiComponent<?,?> component)
      Removes a component from this container.
      Parameter:
      component - The component to remove