de.bsd.x2svg
Class Runner

java.lang.Object
  extended by de.bsd.x2svg.Runner

public class Runner
extends java.lang.Object


Field Summary
private static boolean debug
           
private static java.lang.String DOTS
           
private  RuntimeProperties rProps
           
private static org.apache.batik.svggen.SVGGraphics2D svgGenerator
           
 
Constructor Summary
Runner()
           
 
Method Summary
private  void computeTreeSize(Container rootCont)
          Fill in the sizes of each element
private  int drawContainer(Container rootCont, int startX, int startY)
          Draw the passed container into a SVG Canvas by invoking the containers paint() method
private  void printContainer(Container rootCont, java.lang.String indent)
          Print the passed container with its children to stdout.
 void run(RuntimeParameters params)
          Main code block, runs the whole show.
private  void setupSvg()
          Set up the SVG routines
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DOTS

private static final java.lang.String DOTS
See Also:
Constant Field Values

svgGenerator

private static org.apache.batik.svggen.SVGGraphics2D svgGenerator

debug

private static boolean debug

rProps

private RuntimeProperties rProps
Constructor Detail

Runner

public Runner()
Method Detail

run

public void run(RuntimeParameters params)
         throws java.lang.Exception
Main code block, runs the whole show.

Parameters:
params - RuntimeParameters that have e.g. been on the command line.
Throws:
java.lang.Exception - if anything goes wrong internally

setupSvg

private void setupSvg()
Set up the SVG routines


printContainer

private void printContainer(Container rootCont,
                            java.lang.String indent)
Print the passed container with its children to stdout. Mostly a debugging help

Parameters:
rootCont - The root element of the Container tree
indent - how much spaces should this be indended?

drawContainer

private int drawContainer(Container rootCont,
                          int startX,
                          int startY)
Draw the passed container into a SVG Canvas by invoking the containers paint() method

Parameters:
rootCont - The root of the container tree to show
startX - The top left corner of the drawing area
startY - The top left corner of the drawing area
Returns:
the y coordinate of the little tail on the left side of the

computeTreeSize

private void computeTreeSize(Container rootCont)
Fill in the sizes of each element

Parameters:
rootCont - Container in the tree to start with


x2svg version 1.2.1