Class AbstractCompositeComponent

java.lang.Object
org.teamapps.ux.component.AbstractCompositeComponent
All Implemented Interfaces:
ClientObject, Component

public abstract class AbstractCompositeComponent extends Object implements Component
A base class that can be used by application developers in order to create their own components that consist of a composition of other components.

Example: A VerticalLayout containing toolbar with three buttons and a table, interacting in a certain manner.

Using this superclass, the composite component is a Component but not a VerticalLayout (see example above).

In particular, this means that this component can be used in the same way as any other component, including being added as child to other components.

  • Constructor Details

    • AbstractCompositeComponent

      public AbstractCompositeComponent()
  • Method Details

    • getMainComponent

      public abstract Component getMainComponent()
      Returns:
      the top-level component of this composite component
    • getId

      public String getId()
      Specified by:
      getId in interface ClientObject
    • render

      public void render()
      Specified by:
      render in interface ClientObject
    • unrender

      public void unrender()
      Specified by:
      unrender in interface ClientObject
    • isRendered

      public boolean isRendered()
      Specified by:
      isRendered in interface ClientObject
    • createUiReference

      public org.teamapps.dto.UiClientObjectReference createUiReference()
      Description copied from interface: ClientObject
      Creates a ui reference to a client object. Ui references are just a simple way to reference objects on the client side.
      Specified by:
      createUiReference in interface ClientObject
    • setParent

      public void setParent(Component container)
      Description copied from interface: Component
      Used internally for setting the component's container. May only be invoked by the new container!!
      Specified by:
      setParent in interface Component
    • getParent

      public Component getParent()
      Specified by:
      getParent in interface Component
    • isVisible

      public boolean isVisible()
      Specified by:
      isVisible in interface Component
    • setVisible

      public void setVisible(boolean visible)
      Specified by:
      setVisible in interface Component
    • toggleCssClass

      public void toggleCssClass(String selector, String className, boolean enabled)
      Specified by:
      toggleCssClass in interface Component
    • setCssStyle

      public void setCssStyle(String selector, String propertyName, String value)
      Specified by:
      setCssStyle in interface Component
    • setAttribute

      public void setAttribute(String selector, String attributeName, String value)
      Specified by:
      setAttribute in interface Component