|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.cau.cs.kieler.core.properties.MapPropertyHolder
de.cau.cs.kieler.klay.layered.graph.LGraphElement
de.cau.cs.kieler.klay.layered.graph.LayeredGraph
public class LayeredGraph
A layered graph has a set of layers that contain the nodes, as well as a list of nodes that are not yet assigned to a layer. Layout algorithms are required to layout the graph from left to right. If another layout direction is desired, it can be obtained by pre-processing and post-processing the graph.
Field Summary | |
---|---|
static Map<NodeType,String> |
NODE_TYPE_COLORS
Map mapping node types to the colors used to represent those types when writing debug output graphs. |
Fields inherited from class de.cau.cs.kieler.klay.layered.graph.LGraphElement |
---|
id |
Constructor Summary | |
---|---|
LayeredGraph()
|
Method Summary | |
---|---|
KVector |
getActualSize()
Returns the graph's size including any borders. |
LInsets.Double |
getInsets()
Returns the insets of the graph. |
List<LNode> |
getLayerlessNodes()
Returns the list of nodes that are not currently assigned to a layer. |
List<Layer> |
getLayers()
Returns the list of layers of the graph. |
KVector |
getOffset()
Returns the offset for the graph, that is a coordinate vector that has to be added to all position values of nodes and edges. |
KVector |
getSize()
Returns the size of the graph, that is the bounding box that covers the whole drawing. |
Iterator<Layer> |
iterator()
Returns an iterator over the layers. |
String |
toString()
|
void |
writeDotGraph(Writer writer)
Outputs a representation of this graph in dot format to the given writer. |
Methods inherited from class de.cau.cs.kieler.klay.layered.graph.LGraphElement |
---|
compareTo |
Methods inherited from class de.cau.cs.kieler.core.properties.MapPropertyHolder |
---|
checkProperties, copyProperties, getAllProperties, getProperty, getProperty, setProperty |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final Map<NodeType,String> NODE_TYPE_COLORS
Constructor Detail |
---|
public LayeredGraph()
Method Detail |
---|
public String toString()
toString
in class Object
public KVector getSize()
public KVector getActualSize()
public LInsets.Double getInsets()
public KVector getOffset()
public List<LNode> getLayerlessNodes()
public List<Layer> getLayers()
public Iterator<Layer> iterator()
iterator
in interface Iterable<Layer>
public void writeDotGraph(Writer writer) throws IOException
LONG_EDGE
, turquoise for ODD_PORT_SIDE
,
dark blue for NORTH_SOUTH_PORT
)
writer
- the writer to output the graph to. An attempt is made to close the
writer when finished.
IOException
- if anything goes wrong with the writer.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |