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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidendSelector(Writer writer, String selectorName) Generate end selector.voidBuild CSS Style Sheet content of theelementObject by usingCSSEngineengine configuration.protected voidserialize(Writer writer, CSSEngine engine, Object element, boolean serializeChildNodes, Map<String, CSSStyleDeclaration> selectors, CSSSerializerConfiguration configuration) Build CSS Style Sheet content of theelementObject by usingCSSEngineengine configuration.voidserialize(Writer writer, CSSEngine engine, Object element, boolean serializeChildNodes, CSSSerializerConfiguration configuration) Build CSS Style Sheet content of theelementObject by usingCSSEngineengine configuration.protected voidstartSelector(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 theelementObject by usingCSSEngineengine configuration. The serialization result is stored into thewriter. IfserializeChildNodesis 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 theelementObject by usingCSSEngineengine configuration. The serialization result is stored into thewriter. IfserializeChildNodesis true, the method will serialize too the child nodes of theelement. TheCSSSerializerConfigurationconfigurationis 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 theelementObject by usingCSSEngineengine configuration. The serialization result is stored into thewriter. IfserializeChildNodesis true, the method will serialize too the child nodes of theelement. TheCSSSerializerConfigurationconfigurationis used to generate selector with condition like Text[style='SWT.MULTI']. Map ofselectorscontains 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
-