Class Component

  • Direct Known Subclasses:
    BsComponent, Context, ScrollTop

    public abstract class Component
    extends Object
    The abstract class of all component used in Reflow rendering.
    Since:
    2.0
    Author:
    devacfr
    • Constructor Detail

      • Component

        protected Component​(@Nonnull
                            ISkinConfig config)
        Constructor.
        Parameters:
        config - the current skin config.
    • Method Detail

      • getCssClass

        @Nonnull
        public String getCssClass()
        Returns:
        Returns a String representing the css classes to apply to component.
      • setCssClass

        protected void setCssClass​(String cssClass)
        Parameters:
        cssClass - the cssClass to set
      • getCssOptions

        @Nonnull
        public final String getCssOptions()
        Gets the css options associated to component. A css option is css class that can be set directly on the component or on <body> element as global state.

        Used generally in association with javascript to adapt specific javascript action to current state of component.

        Returns:
        Returns a String representing the css options associated to component.
      • addChildren

        protected void addChildren​(Component... components)
        Add components to this component.
        Parameters:
        components - list of component
      • addCssOptions

        protected final void addCssOptions​(@Nonnull
                                           String... cssOptions)
        Add cssOption to this component.
        Parameters:
        cssOptions - a css option.
      • onPreRender

        protected String onPreRender​(@Nonnull
                                     String bodyContent)
        generic pre-rendering method executed on all components of context.
        Parameters:
        bodyContent - the current body content.
        Returns:
        Returns a String representing the transformed body content on pre-rendering.