|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectnet.claribole.zgrviewer.dot.Graph
Root of a GraphViz graph. This class contains global variables used for many purpose: layout, order...
| Field Summary | |
static double |
AUTO
Find the best size for the graph to be drawn on multiple pages (if it can't be on one) |
Rectangle |
bb
Drawing bounding box |
java.awt.Color |
bgcolor
Color used as the background for entire canvas |
static int |
BL
Bottom to Top, Left to Right |
static int |
BOTTOM
Place graph or clusters label at bottom |
static int |
BR
Bottom to Top, Right to Left |
static int |
BREADTHFIRST
Draw nodes and edges when they come, may lead to edges over nodes and nodes over edges |
static int |
BT
Bottom to Top |
boolean |
center
Center the drawing on the canvas |
static int |
CENTER
Center clusters label |
int |
charset
Specifies the character encoding used. |
static int |
CIRCUIT
Circuit model |
static int |
CLUST
Keep top-level clusters intact |
int |
clusterrank
Mode used for handling clusters. |
boolean |
compound
Allow edges betwenn clusters |
static int |
COMPOUND
Draw the edges to avoid clusters |
static int |
COMPRESS
Scale down the layout without creating overlaps |
static double |
COMPRESS_RATIO
Compress the layout to fit in the size given with the size attribute |
boolean |
concentrate
Use edges concentrators |
double |
damping
Factor damping force motions. |
double |
defaultdist
Distance between nodes |
int |
dim
Number of dimensions for the layout |
boolean |
directed
Directed or undirected graph |
double |
dpi
Specifies the expected number of pixels per inch on a display device |
static int |
EDGESFIRST
Draw edges first, get only nodes over edges (eye-candy) |
double |
epsilon
Terminating condition |
static double |
EXPAND
Expand node positions for width or height reach the size attribute's value |
static double |
FILL
Scale node positions for the graph to be drawn filling the size given with the size attribute |
java.awt.Color |
fontcolor
Text's color |
java.lang.String |
fontname
Name of the font used to write graph's label |
java.lang.String[] |
fontpath
Tells to GD where to find fonts |
double |
fontsize
Text's size in point |
static int |
GLOBAL
|
static int |
GRAPH
Use the element's bounding box to pack them |
Node |
graphRoot
Node to use as the center of the graph's layout |
java.lang.String |
id
Identification string of a graph |
static int |
IN
Ordering exiting nodes in the order they appear |
static int |
ISO_8859_1
Latin1 charset |
double |
k
Spring constant used in virtual physical model |
static int |
KK
KK optimization mode |
java.lang.String |
label
Label of the graph |
int |
labeljust
Label justification (CENTER, LEFT or RIGHT) |
int |
labelloc
Label localisation (TOP or BOTTOM) |
java.lang.String[] |
layers
List of layer names for output |
java.lang.String |
layersep
Layers separators |
static int |
LB
Left to Right, Bottom to Top |
static int |
LEFT
Left justify clusters label |
static int |
LOCAL
SubGraphs can have Cluster properties |
Point |
lp
Label position (in points) |
static int |
LR
Left to Right |
static int |
LT
Left to Right, Top to Bottom |
static int |
MAJOR
Major optimization mode |
java.awt.geom.Point2D.Double |
margin
Margins around the graph (in inches) |
int |
maxiter
Set the number of iteration used |
double |
mclimit
Multiplicative scale factor used to alter the parameters used during crossing minimization |
double |
mindist
Specifies the minimum separation between all nodes |
int |
mode
Use the MAJOR mode, else use the KK one |
int |
model
How the distance matrix is computed. |
static int |
NO_ORDERING
No node's ordering in the graph |
static double |
NO_RATIO
No ratio |
static int |
NO_SEED
Use the default random seed |
static int |
NO_SPLINES
Don't draw edges as splines |
static int |
NODE
Pack only around the node, letting other nodes interleave into the graph |
double |
nodesep
Minamum space between two adjacent nodes in the same rank (in inches) |
static int |
NODESFIRST
Draw nodes first, get only edges over nodes (no misunderstandings) |
boolean |
nojustify
Don't justify multilines labels |
static int |
NONE
No special cluster processing |
boolean |
normalize
Use the first point as origin and make the first edge horizontal |
int |
ordering
Define in which order nodes have to appear. |
static int |
ORTHOXY
Optimize x and y axis, starting with the x one, to remove overlaps |
static int |
ORTHOYX
Optimize x and y axis, starting with the y one, to remove overlaps |
static int |
OUT
Ordering entering nodes in the order they appear |
int |
outputorder
Specify drawing order of nodes and edges. |
int |
overlap
How node overlaps are removed. |
boolean |
pack
Used to activate or deactivate packing. |
int |
packmode
Packing method to use. |
int |
packValue
Value of pack margin when pack is true |
java.awt.geom.Point2D.Double |
page
Width and height of output pages (in inches) |
int |
pagedir
Specifies the order in which the pages are emitted. |
double |
quantum
Round label dimensions to integral multiples of the quantum |
static int |
RANDOM
Start with randomly placed nodes |
int |
rankdir
Direction of graph layout. |
double |
ranksep
Gives desired rank separation (in inches) |
double |
ratio
Desired aspect ratio. |
static java.lang.String[] |
ratioAttributeNames
|
static int |
RB
Right to Left, Bottom to Top |
static int |
REGULAR
Start with the nodes regularly placed around a circle |
boolean |
remincross
Run cross minimization on multiple clusters |
static int |
RETAIN
Retain node overlaps |
static int |
RIGHT
Right justify clusters label |
static int |
RL
Right to Left |
int |
rotate
Set graph orientation |
static int |
RT
Right to Left, Top to Bottom |
int |
samplepoints
Number of points used to represent circles and ellipses |
static int |
SCALE
Uniformly scale x and y to remove overlaps |
static int |
SCALEXY
Scale x and y separately to remove overlaps |
int |
searchsize
Maximum number of negative cut edges to search for minimum cut value |
static int |
SELF
Start with neato placed nodes |
double |
sep
Fraction to increase polygons in order to determine overlapping |
static int |
SHORTPATH
Shortpath model |
int |
showboxes
Show PostScript guide boxes for debugging |
java.awt.geom.Point2D.Double |
size
Maximum width and height of drawing (in inches) |
int |
splines
Method of drawing edges. |
static int |
SPLINES
Draw edges as splines (non overlapping nodes required) |
int |
startSeed
Specifies a seed for the random number generator (NO_SEED is for unspecified seed) |
int |
startStyle
Control node placement at start. |
java.lang.String |
stylesheet
XML stylesheet for SVG output |
static int |
SUBSET
Subset model |
java.lang.String |
target
Target of the URL |
static int |
TB
Top to Bottom |
static int |
TL
Top to Bottom, Left to Right |
static int |
TOP
Place graph or clusters label at top |
static int |
TR
Top to Bottom, Right to Left |
java.lang.Boolean |
truecolor
Use a truecolor color model for bitmap rendering |
java.lang.String |
URL
Hyperlink associated to a graph. |
static int |
UTF_8
UTF-8 charset |
double |
voro_margin
Factor to scale up drawing to allow margin for expansion in Voronoi technique |
static int |
VORONOI
Use a Voronoi-based technique to remove overlaps |
| Constructor Summary | |
Graph()
Create a new empty graph |
|
Graph(java.lang.String id)
Create a new empty graph |
|
| Method Summary | |
void |
addEdge(Edge edge)
Add an edge to the edges list |
void |
addFontPath(java.lang.String path)
Add a new path to the system's list of font path |
void |
addGenericNode(Node node)
|
void |
addLayer(java.lang.String layer)
Add a new Layer name in the graph's list |
void |
addNode(Node node)
Add a node to the nodes list |
static void |
addNode(java.lang.Object root,
Node element)
Add a given node either to a Graph or a SubGraph, depending on the node root's type |
void |
changeOption(java.lang.String name,
java.lang.String value)
|
Edge[] |
getEdges()
|
Node[] |
getNodes()
|
static void |
main(java.lang.String[] args)
Calling method in order to test |
void |
removeEdge(Edge edge)
Remove an edge to the edges list |
void |
removeFontPath(java.lang.String path)
Remove a path to the system's list of font paths |
void |
removeLayer(java.lang.String layer)
Remove a layer to the layer's list |
void |
removeNode(Node node)
Remove a node to the nodes list |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final int TB
public static final int LR
public static final int BT
public static final int RL
public static final int BL
public static final int BR
public static final int TL
public static final int TR
public static final int RB
public static final int RT
public static final int LB
public static final int LT
public static final int CENTER
public static final int LEFT
public static final int RIGHT
public static final int TOP
public static final int BOTTOM
public static final int BREADTHFIRST
public static final int NODESFIRST
public static final int EDGESFIRST
public static final int NODE
public static final int CLUST
public static final int GRAPH
public static final double NO_RATIO
public static final double FILL
public static final double COMPRESS_RATIO
public static final double EXPAND
public static final double AUTO
public static final java.lang.String[] ratioAttributeNames
public static final int NONE
public static final int GLOBAL
NONE,
Constant Field Valuespublic static final int LOCAL
public static final int SHORTPATH
public static final int CIRCUIT
public static final int SUBSET
public static final int REGULAR
public static final int SELF
public static final int RANDOM
public static final int NO_SPLINES
public static final int SPLINES
public static final int COMPOUND
public static final int RETAIN
public static final int SCALE
public static final int VORONOI
public static final int SCALEXY
public static final int ORTHOXY
public static final int ORTHOYX
public static final int COMPRESS
public static final int NO_ORDERING
public static final int IN
public static final int OUT
public static final int MAJOR
public static final int KK
public static final int UTF_8
public static final int ISO_8859_1
public static final int NO_SEED
public java.lang.String id
public java.lang.String URL
public java.lang.String fontname
public java.lang.String label
public java.lang.String target
public java.lang.String stylesheet
public int charset
public java.lang.String[] fontpath
public java.lang.String[] layers
public java.lang.String layersep
public boolean directed
public boolean center
public boolean compound
public boolean concentrate
public boolean nojustify
public boolean normalize
public boolean remincross
public java.lang.Boolean truecolor
public int rankdir
public int dim
public int labeljust
public int labelloc
public int outputorder
public boolean pack
public int packValue
public int packmode
public int pagedir
public int rotate
public int samplepoints
public int searchsize
public int showboxes
public int clusterrank
public int model
public int startStyle
public int startSeed
public int splines
public int overlap
public int ordering
public int maxiter
public int mode
public double damping
public double k
public double fontsize
public double mclimit
public double mindist
public double nodesep
public double quantum
public double ranksep
public double ratio
public double sep
public double voro_margin
public double dpi
public double defaultdist
public double epsilon
public java.awt.Color bgcolor
public java.awt.Color fontcolor
public Node graphRoot
public Rectangle bb
public Point lp
public java.awt.geom.Point2D.Double page
public java.awt.geom.Point2D.Double size
public java.awt.geom.Point2D.Double margin
| Constructor Detail |
public Graph()
throws java.lang.Exception
java.lang.Exception
public Graph(java.lang.String id)
throws java.lang.Exception
id - a unique ID for this graph
java.lang.Exception| Method Detail |
public void addNode(Node node)
node - New node to addpublic void addGenericNode(Node node)
public void addEdge(Edge edge)
edge - New edge to add
public static void addNode(java.lang.Object root,
Node element)
root - Root element to add the nodeelement - Node to addpublic void addLayer(java.lang.String layer)
layer - name of a new layerpublic void addFontPath(java.lang.String path)
path - new path to addpublic void removeNode(Node node)
node - Node to remove (if it's in the list)public void removeEdge(Edge edge)
edge - Edge to remove (if it's in the list)public void removeLayer(java.lang.String layer)
layer - layer to removepublic void removeFontPath(java.lang.String path)
path - a path to remove
public void changeOption(java.lang.String name,
java.lang.String value)
public java.lang.String toString()
Object.toString()public Edge[] getEdges()
public Node[] getNodes()
public static void main(java.lang.String[] args)
args -
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||