Class SVGStyleImpl

java.lang.Object
org.tquadrat.foundation.svg.internal.SVGElementImpl
org.tquadrat.foundation.svg.internal.SVGStyleImpl
All Implemented Interfaces:
SVGElement, SVGStyle, XMLElement

@ClassVersion(sourceVersion="$Id: SVGStyleImpl.java 1151 2025-10-01 21:32:15Z tquadrat $") @API(status=INTERNAL, since="0.0.5") public final class SVGStyleImpl extends SVGElementImpl implements SVGStyle
The implementation of the interface SVGStyle for the SVG <style> element.
Author:
Thomas Thrien (thomas.thrien@tquadrat.org)
Version:
$Id: SVGStyleImpl.java 1151 2025-10-01 21:32:15Z tquadrat $
Since:
0.0.5
UML Diagram
UML Diagram for "org.tquadrat.foundation.svg.internal.SVGStyleImpl"

UML Diagram for "org.tquadrat.foundation.svg.internal.SVGStyleImpl"

UML Diagram for "org.tquadrat.foundation.svg.internal.SVGStyleImpl"
  • Field Details

  • Constructor Details

    • SVGStyleImpl

      public SVGStyleImpl()
      Creates a new SVGStyleImpl instance.
    • SVGStyleImpl

      public SVGStyleImpl(CharSequence... styles)
      Creates a new SVGStyleImpl instance.
      Parameters:
      styles - The style definitions to add.
  • Method Details

    • addStyle

      public final void addStyle(CharSequence... styles)
      Adds a CSS style definition to this style.
      Specified by:
      addStyle in interface SVGStyle
      Parameters:
      styles - The style definitions to add.
    • getChildren

      public final Collection<? extends Element> getChildren()
    • getStyleSheet

      public final String getStyleSheet()
      Returns the style sheet.
      Specified by:
      getStyleSheet in interface SVGStyle
      Returns:
      The style definitions.
    • hasChildren

      public final boolean hasChildren()
    • merge

      public final void merge(SVGStyle other)
      Merges the given SVG <style> element into this one.

      Only the CSS style definitions are taken from the other element, no attributes or comments.
      Specified by:
      merge in interface SVGStyle
      Parameters:
      other - The other <style> element.
    • toString

      public final String toString(int indentationLevel, boolean prettyPrint)
      Returns a String representation for this element instance.
      Specified by:
      toString in interface SVGStyle
      Parameters:
      indentationLevel - The indentation level.
      prettyPrint - The pretty print flag.
      Returns:
      The String representation.