public class DirectedGraph
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
EdgeList |
edges
All of the edges in the graph.
|
NodeList |
nodes
All of the nodes in the graph.
|
RankList |
ranks
Deprecated.
|
Constructor and Description |
---|
DirectedGraph() |
Modifier and Type | Method and Description |
---|---|
Insets |
getDefaultPadding()
Returns the default padding for nodes.
|
int |
getDirection()
Returns the direction in which the graph will be layed out.
|
Dimension |
getLayoutSize() |
Insets |
getMargin()
Sets the outer margin for the entire graph.
|
Node |
getNode(int rank,
int index) |
Insets |
getPadding(Node node)
Returns the effective padding for the given node.
|
void |
removeEdge(Edge edge)
Removes the given edge from the graph.
|
void |
removeNode(Node node)
Removes the given node from the graph.
|
void |
setDefaultPadding(Insets insets)
Sets the default padding for all nodes in the graph.
|
void |
setDirection(int direction)
Sets the layout direction for the graph.
|
void |
setMargin(Insets insets)
Sets the graphs margin.
|
public EdgeList edges
public NodeList nodes
public RankList ranks
public Insets getDefaultPadding()
public int getDirection()
public Insets getMargin()
public Insets getPadding(Node node)
node
- the nodepublic Node getNode(int rank, int index)
public void removeEdge(Edge edge)
edge
- the edge to be removedpublic void removeNode(Node node)
node
- the node to removepublic void setDefaultPadding(Insets insets)
null
).insets
- the paddingpublic void setDirection(int direction)
The default direction is south.
direction
- the layout directionpublic void setMargin(Insets insets)
insets
- the graph's marginpublic Dimension getLayoutSize()
Copyright (c) IBM Corp. and others 2000, 2011. All Rights Reserved.