Class CssWebResourceBuilder
java.lang.Object
com.foreach.across.modules.web.ui.ViewElementBuilderSupport<T,SELF>
com.foreach.across.modules.web.ui.elements.builder.ContainerViewElementBuilderSupport<T,SELF>
com.foreach.across.modules.web.ui.elements.builder.AbstractNodeViewElementBuilder<NodeViewElement,CssWebResourceBuilder>
com.foreach.across.modules.web.resource.elements.CssWebResourceBuilder
- All Implemented Interfaces:
WebResourceKeyProvider
,HtmlViewElementBuilder<NodeViewElement,
,CssWebResourceBuilder> ViewElementBuilder<NodeViewElement>
public class CssWebResourceBuilder
extends AbstractNodeViewElementBuilder<NodeViewElement,CssWebResourceBuilder>
implements WebResourceKeyProvider
Builder class for CSS elements that can be represented either as a
<link>
tag or an inline <style>
.
If an inline(String)
value is specified, a <style>
tag will be rendered and certain other
properties like rel(String)
and url(String)
will be ignored.
In all other cases a link
tag will be rendered.- Since:
- 3.2.0
- Author:
- Marc Vanbrabant
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.foreach.across.modules.web.ui.ViewElementBuilderSupport
ViewElementBuilderSupport.ElementOrBuilder
Nested classes/interfaces inherited from interface com.foreach.across.modules.web.ui.ViewElementBuilder
ViewElementBuilder.Wither<T extends ViewElementBuilder>
-
Field Summary
Fields inherited from class com.foreach.across.modules.web.ui.ViewElementBuilderSupport
customTemplate, name
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected NodeViewElement
createElement
(@NonNull ViewElementBuilderContext builderContext) Style data that should be inlined, will result in astyle
tag being rendered.type
(@NonNull org.springframework.http.MediaType mediaType) Methods inherited from class com.foreach.across.modules.web.ui.elements.builder.AbstractNodeViewElementBuilder
apply, attribute, attributes, clearAttributes, css, htmlId, removeAttribute, removeCss
Methods inherited from class com.foreach.across.modules.web.ui.elements.builder.ContainerViewElementBuilderSupport
add, add, addAll, addFirst, addFirst, sort
Methods inherited from class com.foreach.across.modules.web.ui.ViewElementBuilderSupport
build, configure, customTemplate, elementSupplier, elementSupplier, name, postProcess, postProcessor, registerWebResources, with
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.foreach.across.modules.web.ui.elements.builder.HtmlViewElementBuilder
data, removeData
Methods inherited from interface com.foreach.across.modules.web.ui.ViewElementBuilder
andThen, build, doWith, map, map, postProcess, postProcess
-
Constructor Details
-
CssWebResourceBuilder
public CssWebResourceBuilder()
-
-
Method Details
-
media
-
type
-
type
-
getWebResourceKey
- Specified by:
getWebResourceKey
in interfaceWebResourceKeyProvider
- Returns:
- a default web resource key for this css element, either the value of
url(String)
orinline(String)
-
createElement
- Specified by:
createElement
in classViewElementBuilderSupport<NodeViewElement,
CssWebResourceBuilder>
-
url
- Returns:
this
.
-
rel
- Returns:
this
.
-
inline
Style data that should be inlined, will result in astyle
tag being rendered.- Returns:
this
.
-