Class Component
- java.lang.Object
-
- org.devacfr.maven.skins.reflow.model.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
-
-
Field Summary
Fields Modifier and Type Field Description protected ISkinConfigconfig
-
Constructor Summary
Constructors Modifier Constructor Description protectedComponent(ISkinConfig config)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddChildren(Component... components)Add components to this component.protected voidaddCssOptions(String... cssOptions)Add cssOption to this component.StringgetCssClass()StringgetCssOptions()Gets the css options associated to component.protected StringonPreRender(String bodyContent)generic pre-rendering method executed on all components of context.protected voidsetCssClass(String cssClass)
-
-
-
Field Detail
-
config
protected final ISkinConfig config
-
-
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
Stringrepresenting 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
Stringrepresenting 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.
-
-