|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object y.view.DefaultGraph2DRenderer yext.svg.io.SVGGraph2DRenderer
public class SVGGraph2DRenderer
A special Graph2DRenderer that can be subclassed to enhance the SVG output
of SVGIOHandler
.
SVGIOHandler.setSVGGraph2DRenderer(SVGGraph2DRenderer)
Constructor Summary | |
---|---|
SVGGraph2DRenderer()
Creates a new instance of SVGGraph2DRenderer |
Method Summary | |
---|---|
protected void |
addToSVGDefinition(Element element)
Adds a DOM element to to the definition block of the SVG document. |
protected CDATASection |
createCDATASection(String content)
Creates a character data section that can be added to the SVG document. |
protected Element |
createElement(String tag)
Creates a DOM element with the given name that can be added to the SVG document. |
protected Document |
getSVGDocument()
Returns the document that is used as factory for the nodes in the DOM tree of the SVG that is generated by the renderer's associated SVGIOHandler . |
protected SVGIOHandler |
getSVGIOHandler()
Returns the SVGIOHandler this renderer is working with. |
protected Element |
getTopLevelGroup()
Returns the top level group element of the SVG document to which graphical representation of nodes and edges will be added. |
protected void |
insertNodeAbove(Node toBeInsertedNode,
Node refNode)
Adds a DOM node to the SVG document. |
protected void |
insertNodeBelow(Node toBeInsertedNode,
Node refNode)
Adds a DOM node to the SVG document. |
void |
paint(Graphics2D gfx,
EdgeRealizer r)
|
void |
paint(Graphics2D gfx,
NodeRealizer r)
|
void |
paintSloppy(Graphics2D gfx,
EdgeRealizer r)
|
void |
paintSloppy(Graphics2D gfx,
NodeRealizer r)
|
void |
setSVGIOHandler(SVGIOHandler ioh)
Sets the SVGIOHandler this renderer is working with. |
protected void |
setTopLevelGroup(Element element)
Sets the top level group element of the SVG document to which graphical representation of nodes and edges will be added. |
protected void |
writeDocument(Node svgDocument,
Writer writer)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SVGGraph2DRenderer()
Method Detail |
---|
public void setSVGIOHandler(SVGIOHandler ioh)
protected SVGIOHandler getSVGIOHandler()
protected Document getSVGDocument()
SVGIOHandler
.
Note: Adding nodes to this document will have no effect regarding
the SVG that is generated by the renderer's associated
SVGIOHandler
.
protected Element getTopLevelGroup()
protected void setTopLevelGroup(Element element)
protected Element createElement(String tag)
To create a hyperlink element <a> one would use as argument the string "a".
protected CDATASection createCDATASection(String content)
protected void insertNodeAbove(Node toBeInsertedNode, Node refNode)
refNode
,
i.e. the node becomes the parent of refNode
and the former parent
of refNode
will become the parent of the to-be-inserted node.
protected void insertNodeBelow(Node toBeInsertedNode, Node refNode)
refNode
,
i.e. refNode will become the parent of the inserted node and all children of
refNode
will become children of the to-be-inserted node.
protected void addToSVGDefinition(Element element)
protected void writeDocument(Node svgDocument, Writer writer) throws IOException
IOException
public void paint(Graphics2D gfx, NodeRealizer r)
paint
in class DefaultGraph2DRenderer
public void paintSloppy(Graphics2D gfx, NodeRealizer r)
paintSloppy
in class DefaultGraph2DRenderer
public void paint(Graphics2D gfx, EdgeRealizer r)
paint
in class DefaultGraph2DRenderer
public void paintSloppy(Graphics2D gfx, EdgeRealizer r)
paintSloppy
in class DefaultGraph2DRenderer
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |