Class SwingSVGPrettyPrint

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

public abstract class SwingSVGPrettyPrint extends Object implements SVGSyntax
This class offers a way to create an SVG document with grouping that reflects the Swing composite structure (container/components).
Version:
$Id: SwingSVGPrettyPrint.java 1831630 2018-05-15 12:56:55Z ssteiner $
  • Constructor Details

    • SwingSVGPrettyPrint

      public SwingSVGPrettyPrint()
  • Method Details

    • print

      public static void print(JComponent cmp, SVGGraphics2D svgGen)
      Parameters:
      cmp - Swing component to be converted to SVG
      svgGen - SVGraphics2D to use to paint Swing components
    • printHack

      private static void printHack(JComponent cmp, SVGGraphics2D svgGen)
      Parameters:
      cmp - Swing component to be converted to SVG
      svgGen - SVGraphics2D to use to paint Swing components
    • paintComponent

      private static void paintComponent(JComponent cmp, SVGGraphics2D svgGen)
    • paintBorder

      private static void paintBorder(JComponent cmp, SVGGraphics2D svgGen)
      WARNING: The following code does some special case processing depending on the class of the input JComponent. This is needed because there is no generic way I could find to determine whether a component should be painted or not.
    • paintChildren

      private static void paintChildren(JComponent cmp, SVGGraphics2D svgGen)