Class DefaultStyleHandler

java.lang.Object
org.apache.batik.svggen.DefaultStyleHandler
All Implemented Interfaces:
XMLConstants, StyleHandler, CSSConstants, SVGConstants

public class DefaultStyleHandler extends Object implements StyleHandler, SVGConstants
The DefaultStyleHandler class provides the default way to style an SVG Element.
Version:
$Id: DefaultStyleHandler.java 1804130 2017-08-04 14:41:11Z ssteiner $
  • Field Details

    • ignoreAttributes

      static Map ignoreAttributes
      Static initializer for which attributes should be ignored on some elements. Map-key is a string like 'SVG_RECT_TAG' , map-entry is a set of strings, which denote font-attributes to ignore. The set is shared by all map-entries.
  • Constructor Details

    • DefaultStyleHandler

      public DefaultStyleHandler()
  • Method Details

    • setStyle

      public void setStyle(Element element, Map styleMap, SVGGeneratorContext generatorContext)
      Sets the style described by styleMap on the given element. That is sets the xml attributes with their styled value.
      Specified by:
      setStyle in interface StyleHandler
      Parameters:
      element - the SVG Element to be styled.
      styleMap - the Map containing pairs of style property names, style values.
    • appliesTo

      protected boolean appliesTo(String styleName, String tagName)
      Controls whether or not a given attribute applies to a particular element.