Class SVGPatternElementBridge

All Implemented Interfaces:
SVGAnimationTargetContext, Bridge, BridgeUpdateHandler, ErrorConstants, GenericBridge, PaintBridge, XMLConstants, SVGContext, CSSConstants, SVGConstants

public class SVGPatternElementBridge extends AnimatableGenericSVGBridge implements PaintBridge, ErrorConstants
Bridge class for the <pattern> element.
Version:
$Id: SVGPatternElementBridge.java 1805408 2017-08-18 12:21:52Z ssteiner $
  • Constructor Details

    • SVGPatternElementBridge

      public SVGPatternElementBridge()
      Constructs a new SVGPatternElementBridge.
  • Method Details

    • getLocalName

      public String getLocalName()
      Returns 'pattern'.
      Specified by:
      getLocalName in interface Bridge
    • createPaint

      public Paint createPaint(BridgeContext ctx, Element patternElement, Element paintedElement, GraphicsNode paintedNode, float opacity)
      Creates a Paint according to the specified parameters.
      Specified by:
      createPaint in interface PaintBridge
      Parameters:
      ctx - the bridge context to use
      patternElement - the pattern element that defines a Paint
      paintedElement - the element referencing the paint
      paintedNode - the graphics node on which the Paint will be applied
      opacity - the opacity of the Paint to create
    • extractPatternContent

      protected static RootGraphicsNode extractPatternContent(Element patternElement, BridgeContext ctx)
      Returns the content of the specified pattern element. The content of the pattern can be specified as children of the patternElement or children of one of its 'ancestor' (linked with the xlink:href attribute).
      Parameters:
      patternElement - the gradient element
      ctx - the bridge context to use
    • extractLocalPatternContent

      protected static RootGraphicsNode extractLocalPatternContent(Element e, BridgeContext ctx)
      Returns the content of the specified pattern element or null if any.
      Parameters:
      e - the pattern element
      ctx - the bridge context
    • contains

      private static boolean contains(List urls, ParsedURL key)
      Returns true if the specified list of ParsedURLs contains the specified url.
      Parameters:
      urls - the list of ParsedURLs
      key - the url to search for