ccvisu
Class WriterDataGraphicsSVG
java.lang.Object
ccvisu.WriterData
ccvisu.WriterDataGraphics
ccvisu.WriterDataGraphicsSVG
public class WriterDataGraphicsSVG
- extends WriterDataGraphics
Writer for layouts in SVG format (Scalable Vector Graphs, XML, W3C).
- Version:
- $Revision: 1.8 $; $Date: 2006/11/25 10:41:08 $
- Author:
- Dirk Beyer
Field Summary |
private int |
edgeNumber
used to build uniq id for the edges |
private java.lang.String |
inputName
|
private java.io.PrintWriter |
out
|
private float |
scalePos
|
Constructor Summary |
WriterDataGraphicsSVG(GraphData graph,
java.io.PrintWriter out,
float minVert,
int fontSize,
java.awt.Color backColor,
boolean blackCircle,
boolean showEdges,
boolean openURL,
float scalePos,
java.lang.String inputName)
Constructor. |
Method Summary |
void |
write()
Writes the layout in graphics format SVG. |
void |
writeEdge(int index,
int xPos1,
int yPos1,
int zPos1,
int xPos2,
int yPos2,
int zPos2)
Writes an edge. |
void |
writeVertex(GraphVertex curVertex,
int xPos,
int yPos,
int zPos,
int radius)
Writes a vertex in SVG format. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
out
private java.io.PrintWriter out
scalePos
private float scalePos
inputName
private java.lang.String inputName
edgeNumber
private int edgeNumber
- used to build uniq id for the edges
WriterDataGraphicsSVG
public WriterDataGraphicsSVG(GraphData graph,
java.io.PrintWriter out,
float minVert,
int fontSize,
java.awt.Color backColor,
boolean blackCircle,
boolean showEdges,
boolean openURL,
float scalePos,
java.lang.String inputName)
- Constructor.
- Parameters:
graph
- Graph representation, contains the positions of the vertices.out
- Output stream writer.minVert
- Diameter of the smallest vertex.fontSize
- Font size of vertex annotations.backColor
- Background color.blackCircle
- If true, draw black circle around each vertex.showEdges
- If true, draw the edges between the vertices (if possible).scalePos
- Scaling factor for the layout to adjust to drawing area.
write
public void write()
- Writes the layout in graphics format SVG.
- Specified by:
write
in class WriterDataGraphics
writeVertex
public void writeVertex(GraphVertex curVertex,
int xPos,
int yPos,
int zPos,
int radius)
- Writes a vertex in SVG format.
- Specified by:
writeVertex
in class WriterDataGraphics
- Parameters:
curVertex
- The vertex object, to access vertex attributes.xPos
- x coordinate of the vertex.yPos
- y coordinate of the vertex.zPos
- z coordinate of the vertex.radius
- Radius of the vertex.
writeEdge
public void writeEdge(int index,
int xPos1,
int yPos1,
int zPos1,
int xPos2,
int yPos2,
int zPos2)
- Writes an edge.
- Specified by:
writeEdge
in class WriterDataGraphics
- Parameters:
index
- index of the edge in graph.edgesxPos1
- x coordinate of the first point.yPos1
- y coordinate of the first point.zPos1
- z coordinate of the first point.xPos2
- x coordinate of the second point.yPos2
- y coordinate of the second point.zPos2
- z coordinate of the second point.