Class AbstractCompositeComponent

  • All Implemented Interfaces:
    ClientObject, Component

    public abstract class AbstractCompositeComponent
    extends java.lang.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 Detail

      • AbstractCompositeComponent

        public AbstractCompositeComponent()
    • Method Detail

      • getMainComponent

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

        public java.lang.String getId()
        Specified by:
        getId 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
      • setVisible

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

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

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

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