Class CSSSerializer

java.lang.Object
org.eclipse.e4.ui.css.core.serializers.CSSSerializer

public class CSSSerializer extends Object
CSS Serializer to retrieve default CSSStyleDeclaration of the SWT Widgets.
  • 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 the element Object by using CSSEngine engine configuration. The serialization result is stored into the writer. If serializeChildNodes is true, the method will serialize too the child nodes of the element.
      Throws:
      IOException
    • serialize

      public void serialize(Writer writer, CSSEngine engine, Object element, boolean serializeChildNodes, CSSSerializerConfiguration configuration) throws IOException
      Build CSS Style Sheet content of the element Object by using CSSEngine engine configuration. The serialization result is stored into the writer. If serializeChildNodes is true, the method will serialize too the child nodes of the element. The CSSSerializerConfiguration 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 IOException
      Build CSS Style Sheet content of the element Object by using CSSEngine engine configuration. The serialization result is stored into the writer. If serializeChildNodes is true, the method will serialize too the child nodes of the element. The CSSSerializerConfiguration configuration is used to generate selector with condition like Text[style='SWT.MULTI']. Map of selectors 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

      protected void endSelector(Writer writer, String selectorName) throws IOException
      Generate end selector.
      Throws:
      IOException