ViewElements
Html 5 nodes
The HtmlViewElements
class is introduced to create ViewElement
and ViewElementBuilders
for HTML5 nodes.
NodeViewElement paragraph = HtmlViewElements.html.p();
NodeViewElementBuilder paragraph = HtmlViewElements.html.builders.p();
Bootstrap based ViewElements
The following classes where removed in favor of using the new bootstrap 4 factory BootstrapViewElements
.
-
BootstrapUiFactory & BootstrapUiFactoryImpl
-
BootstrapUiComponentFactory & BootstrapUiComponentFactoryImpl
-
BootstrapUiBuilders
The BootstrapViewElements
class has become the main entry point for creating ViewElement
and ViewElementBuilders
.
ViewElements can be created using: BootstrapViewElements.bootstrap
ViewElementBuilders can be created using: BootstrapViewElements.bootstrap.builders
Customizing ViewElement and ViewElementBuilders
All methods for creating a ViewElement
or ViewElementBuilder
using HtmlViewElements
can take in a ViewElement.WitherSetter
.
A WitherSetter
can be used to modify the viewElement by setting or adding values.
These ViewElement
modifiers come in 3 forms:
-
ViewElement.WitherSetter
-
ViewElement.WitherRemover
-
ViewElement.WitherGetter
NodeViewElement divWithBoldClass = HtmlViewElements.html.div( HtmlViewElement.Functions.css( "bold" ) );