Class BatikRegularPolygonElementBridge

All Implemented Interfaces:
SVGAnimationTargetContext, Bridge, BridgeUpdateHandler, ErrorConstants, GraphicsNodeBridge, XMLConstants, SVGContext, BatikExtConstants, CSSConstants, SVGConstants

public class BatikRegularPolygonElementBridge extends SVGDecoratedShapeElementBridge implements BatikExtConstants
Bridge class for a regular polygon element.
  • Constructor Details

    • BatikRegularPolygonElementBridge

      public BatikRegularPolygonElementBridge()
      Constructs a new bridge for the <rect> element.
  • Method Details

    • getNamespaceURI

      public String getNamespaceURI()
      Returns the SVG namespace URI.
      Specified by:
      getNamespaceURI in interface Bridge
      Overrides:
      getNamespaceURI in class AbstractSVGBridge
    • getLocalName

      public String getLocalName()
      Returns 'rect'.
      Specified by:
      getLocalName in interface Bridge
    • getInstance

      public Bridge getInstance()
      Returns a new instance of this bridge.
      Specified by:
      getInstance in interface Bridge
      Specified by:
      getInstance in interface GraphicsNodeBridge
      Overrides:
      getInstance in class AbstractSVGBridge
    • buildShape

      protected void buildShape(BridgeContext ctx, Element e, ShapeNode shapeNode)
      Constructs a regular polygone according to the specified parameters.
      Specified by:
      buildShape in class SVGShapeElementBridge
      Parameters:
      ctx - the bridge context to use
      e - the element that describes a rect element
      shapeNode - the shape node to initialize
    • convertSides

      protected static int convertSides(Element filterElement, String attrName, int defaultValue, BridgeContext ctx)
      Stolen from AbstractSVGFilterPrimitiveElementBridge. Converts on the specified filter primitive element, the specified attribute that represents an integer and with the specified default value.
      Parameters:
      filterElement - the filter primitive element
      attrName - the name of the attribute
      defaultValue - the default value of the attribute
      ctx - the BridgeContext to use for error information