edu.uci.eecs.doc.clepsydra.tree
Class SVGTreeWriter

java.lang.Object
  extended by edu.uci.eecs.doc.cascade.tree.AbstractTreeWriter
      extended by edu.uci.eecs.doc.cascade.tree.SVGTreeWriter
          extended by edu.uci.eecs.doc.clepsydra.tree.SVGTreeWriter
All Implemented Interfaces:
TreeWriter

public class SVGTreeWriter
extends SVGTreeWriter

Exports a control flow tree to Scalable Vector Graphics (SVG) format. Each node in the tree contains a "badge" showing its WCET value.

Author:
Trevor Harmon

Nested Class Summary
 
Nested classes/interfaces inherited from class edu.uci.eecs.doc.cascade.tree.SVGTreeWriter
SVGTreeWriter.Color
 
Field Summary
 
Fields inherited from class edu.uci.eecs.doc.cascade.tree.SVGTreeWriter
BLACK_COLOR, colorized, IFTHENELSE_END_COLOR, IFTHENELSE_START_COLOR, INDENT_SIZE, LEFT_MARGIN, LEFT_TEXT_MARGIN, LOOP_END_COLOR, LOOP_START_COLOR, PSEUDONODE_END_COLOR, PSEUDONODE_START_COLOR, RECTANGLE_CORNER_RADIUS, RECTANGLE_STYLE, RECTANGLE_VERTICAL_SPACING, RECTANGLE_WIDTH, RETURN_END_COLOR, RETURN_START_COLOR, STATEMENT_END_COLOR, STATEMENT_START_COLOR, TEXT_COLOR, TEXT_HEIGHT, TEXT_NEXT_LINE_COLOR, TEXT_NEXT_LINE_INDENT, TEXT_NEXT_LINE_STYLE, TEXT_STYLE, TOP_MARGIN, TOP_TEXT_MARGIN
 
Fields inherited from class edu.uci.eecs.doc.cascade.tree.AbstractTreeWriter
showInstructions, trees
 
Constructor Summary
SVGTreeWriter(Tree tree, TreeAnalysisStrategy analysisStrategy)
          Creates a new SVGTreeWriter object for the given control flow tree.
SVGTreeWriter(Tree tree, TreeAnalysisStrategy analysisStrategy, boolean colorized)
          Creates a new SVGTreeWriter object for the given control flow tree.
 
Method Summary
protected  int writeRect(Node node, int scope, int y, SVGTreeWriter.Color startColor, SVGTreeWriter.Color endColor, org.w3c.dom.svg.SVGDocument doc, Element root)
           
 
Methods inherited from class edu.uci.eecs.doc.cascade.tree.SVGTreeWriter
getDocument, write
 
Methods inherited from class edu.uci.eecs.doc.cascade.tree.AbstractTreeWriter
setShowInstructions, write, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SVGTreeWriter

public SVGTreeWriter(Tree tree,
                     TreeAnalysisStrategy analysisStrategy)
Creates a new SVGTreeWriter object for the given control flow tree.

Parameters:
tree - the control flow tree to be exported
analysisStrategy - a strategy for computing the WCET of each node in the tree

SVGTreeWriter

public SVGTreeWriter(Tree tree,
                     TreeAnalysisStrategy analysisStrategy,
                     boolean colorized)
Creates a new SVGTreeWriter object for the given control flow tree.

Parameters:
tree - the control flow tree to be exported
analysisStrategy - a strategy for computing the WCET of each node in the tree
colorized - if true, the control nodes are adorned with color coding and drop shadows; black and white otherwise
Method Detail

writeRect

protected int writeRect(Node node,
                        int scope,
                        int y,
                        SVGTreeWriter.Color startColor,
                        SVGTreeWriter.Color endColor,
                        org.w3c.dom.svg.SVGDocument doc,
                        Element root)
Overrides:
writeRect in class SVGTreeWriter