Class CSSSerializer
java.lang.Object
org.eclipse.e4.ui.css.core.serializers.CSSSerializer
CSS Serializer to retrieve default CSSStyleDeclaration of the SWT Widgets.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
endSelector
(Writer writer, String selectorName) Generate end selector.void
Build CSS Style Sheet content of theelement
Object by usingCSSEngine
engine configuration.protected void
serialize
(Writer writer, CSSEngine engine, Object element, boolean serializeChildNodes, Map<String, CSSStyleDeclaration> selectors, CSSSerializerConfiguration configuration) Build CSS Style Sheet content of theelement
Object by usingCSSEngine
engine configuration.void
serialize
(Writer writer, CSSEngine engine, Object element, boolean serializeChildNodes, CSSSerializerConfiguration configuration) Build CSS Style Sheet content of theelement
Object by usingCSSEngine
engine configuration.protected void
startSelector
(Writer writer, String selectorName, boolean firstSelector) Generate start selector.
-
Constructor Details
-
CSSSerializer
public CSSSerializer()
-
-
Method Details
-
serialize
public void serialize(Writer writer, CSSEngine engine, Object element, boolean serializeChildNodes) throws IOException Build CSS Style Sheet content of theelement
Object by usingCSSEngine
engine configuration. The serialization result is stored into thewriter
. IfserializeChildNodes
is true, the method will serialize too the child nodes of theelement
.- Throws:
IOException
-
serialize
public void serialize(Writer writer, CSSEngine engine, Object element, boolean serializeChildNodes, CSSSerializerConfiguration configuration) throws IOException Build CSS Style Sheet content of theelement
Object by usingCSSEngine
engine configuration. The serialization result is stored into thewriter
. IfserializeChildNodes
is true, the method will serialize too the child nodes of theelement
. TheCSSSerializerConfiguration
configuration
is used to generate selector with condition like Text[style='SWT.MULTI'].- Throws:
IOException
-
serialize
protected void serialize(Writer writer, CSSEngine engine, Object element, boolean serializeChildNodes, Map<String, CSSStyleDeclaration> selectors, CSSSerializerConfiguration configuration) throws IOExceptionBuild CSS Style Sheet content of theelement
Object by usingCSSEngine
engine configuration. The serialization result is stored into thewriter
. IfserializeChildNodes
is true, the method will serialize too the child nodes of theelement
. TheCSSSerializerConfiguration
configuration
is used to generate selector with condition like Text[style='SWT.MULTI']. Map ofselectors
contains the selector already built.- Throws:
IOException
-
startSelector
protected void startSelector(Writer writer, String selectorName, boolean firstSelector) throws IOException Generate start selector.- Throws:
IOException
-
endSelector
Generate end selector.- Throws:
IOException
-