|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.uci.eecs.doc.cascade.tree.AbstractTreeWriter edu.uci.eecs.doc.cascade.tree.SVGTreeWriter
public class SVGTreeWriter
Exports a control flow tree to Scalable Vector Graphics (SVG) format.
Nested Class Summary | |
---|---|
protected static class |
SVGTreeWriter.Color
|
Fields inherited from class edu.uci.eecs.doc.cascade.tree.AbstractTreeWriter |
---|
showInstructions, trees |
Constructor Summary | |
---|---|
SVGTreeWriter(List<Tree> trees)
Creates a new SVGTreeWriter object for the given control flow trees. |
|
SVGTreeWriter(List<Tree> trees,
boolean colorized)
Creates a new SVGTreeWriter object for the given control flow trees. |
|
SVGTreeWriter(Tree tree)
Creates a new SVGTreeWriter object for the given control flow tree. |
|
SVGTreeWriter(Tree tree,
boolean colorized)
Creates a new SVGTreeWriter object for the given control flow tree. |
Method Summary | |
---|---|
org.w3c.dom.svg.SVGDocument |
getDocument()
Returns an XML document interface representing the entire SVG tree. |
void |
write(Writer out)
Exports the control flow tree to the specified output stream. |
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.AbstractTreeWriter |
---|
setShowInstructions, write, write |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final int LEFT_MARGIN
protected static final int TOP_MARGIN
protected static final int RECTANGLE_WIDTH
protected static final int INDENT_SIZE
protected static final int RECTANGLE_VERTICAL_SPACING
protected static final int RECTANGLE_CORNER_RADIUS
protected static final String RECTANGLE_STYLE
protected static final SVGTreeWriter.Color STATEMENT_START_COLOR
protected static final SVGTreeWriter.Color STATEMENT_END_COLOR
protected static final SVGTreeWriter.Color RETURN_START_COLOR
protected static final SVGTreeWriter.Color RETURN_END_COLOR
protected static final SVGTreeWriter.Color PSEUDONODE_START_COLOR
protected static final SVGTreeWriter.Color PSEUDONODE_END_COLOR
protected static final SVGTreeWriter.Color LOOP_START_COLOR
protected static final SVGTreeWriter.Color LOOP_END_COLOR
protected static final SVGTreeWriter.Color IFTHENELSE_START_COLOR
protected static final SVGTreeWriter.Color IFTHENELSE_END_COLOR
protected static final SVGTreeWriter.Color TEXT_COLOR
protected static final String TEXT_STYLE
protected static final int LEFT_TEXT_MARGIN
protected static final int TOP_TEXT_MARGIN
protected static final int TEXT_HEIGHT
protected static final int TEXT_NEXT_LINE_INDENT
protected static final String TEXT_NEXT_LINE_STYLE
protected static final SVGTreeWriter.Color TEXT_NEXT_LINE_COLOR
protected static final SVGTreeWriter.Color BLACK_COLOR
protected final boolean colorized
Constructor Detail |
---|
public SVGTreeWriter(Tree tree)
tree
- the control flow tree to be exportedpublic SVGTreeWriter(Tree tree, boolean colorized)
tree
- the control flow tree to be exportedcolorized
- if true, the control nodes are adorned with color coding and
drop shadows; black and white otherwisepublic SVGTreeWriter(List<Tree> trees)
trees
- the control flow trees to be exportedpublic SVGTreeWriter(List<Tree> trees, boolean colorized)
trees
- the control flow trees to be exportedcolorized
- if true, the control nodes are adorned with color coding and
drop shadows; black and white otherwiseMethod Detail |
---|
public void write(Writer out) throws IOException
write
in interface TreeWriter
write
in class AbstractTreeWriter
out
- an output stream in which to save the tree
IOException
- if the tree cannot be written to the streampublic org.w3c.dom.svg.SVGDocument getDocument()
protected int writeRect(Node node, int scope, int y, SVGTreeWriter.Color startColor, SVGTreeWriter.Color endColor, org.w3c.dom.svg.SVGDocument doc, Element root)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |