|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecty25.base.LayeredGraph
y25.layout.LayeredLayoutGraph
Extends LayeredGraph
with layout information.
"Layout information" means all the information that is neccessary to arrange
elements of a LayeredLayoutGraph
in three-dimensional space
(with an X,Y,Z coordinate system). There are some rules for the arrangement
of those entities in the three-dimensional space:
0
.)LayeredLayoutGraph
resides in.LayeredLayoutGraph
, therefore, their endpoints are determined
by the layout information of those nodes. Other than that, there are no
constraints for the layout of layer edges.y.layout
package.
For every entity (layer, layer edge, node, edge) inside this
LayeredLayoutGraph
, layout information is stored inside
objects that have the interfaces LayerLayout25D
,
LayerEdgeLayout25D
, NodeLayout25D
and
EdgeLayout25D
respectively. Wehereas layer and layer edge
information is stored directly inside this LayeredLayoutGraph
,
node and edge layout information is stored inside each layer (graph).
Note that this is an abstract class and all subclasses need to implement at
least the following methods form LayeredGraph
LayeredLayoutGraph
directly, layout information for nodes and
edges are stored inside each layer (graph). As a result of this convention,
there is a natural relationship between the LayeredGraph-Hierarchy in the y25
package and the Graph-Hierarchy inside the y package: LayeredGraph stores
Graphs for each layer, LayeredLayoutGraph stores LayoutGraphs for each layer
and Graph25D stores Graph2Ds for each layer.
Nested Class Summary |
Nested classes inherited from class y25.base.LayeredGraph |
LayeredGraph.EdgeMapImpl, LayeredGraph.GraphMapImpl, LayeredGraph.IDAssigner, LayeredGraph.IDCreator, LayeredGraph.LayerEdgeMapImpl, LayeredGraph.NodeMapImpl |
Field Summary | |
protected BoundingBox |
boundingBox
Stores the last computed bounding box for this LayeredLayoutGraph . |
protected LayerEdgeMap |
layerEdgeLayouts
Stores the layout information for each layer edge. |
protected GraphMap |
layerLayouts
Stores the layout information for each layer (graph). |
Fields inherited from class y25.base.LayeredGraph |
AFTER, BEFORE, EDGE_ID_DPKEY, edgeIDCreator, graphList, graphType, idAssigner, inLayerEdges, layerEdgeList, NODE_ID_DPKEY, nodeIDCreator, outLayerEdges, PARENT_ID_DPKEY |
Constructor Summary | |
LayeredLayoutGraph()
Creates an empty LayeredLayoutGraph . |
Method Summary | |
void |
clear()
Resets the LayeredLayoutGraph to its initial state. |
void |
clearLayerEdges()
Removes all layer edges present in this LayeredLayoutGraph . |
BoundingBox |
getBoundingBox()
Returns a bounding box that encompasses all layers, layer edges, nodes and edges from this LayeredLayoutGraph . |
LayerLayout25D |
getLayout(Graph graph)
Returns the layout associated with the given graph. |
LayerEdgeLayout25D |
getLayout(LayerEdge layerEdge)
Returns the layout associated with the given layer edge. |
Point3D |
getPoint3D(Node n)
Returns the position of the given node in three-dimensional space. |
double |
getZ(Graph graph)
Returns the z-corrdinate of the geiven layer (graph). |
void |
recalculateBoundingBox()
Erases the previously computed bounding box or this graph and recomputes it. |
void |
removeGraph(Graph graph)
Removes the passed LayoutGraph from this
LayeredLayoutGraph . |
void |
removeLayerEdge(LayerEdge layerEdge)
Removes the passed layer edge from this LayeredLayoutGraph. |
void |
setZ(Graph graph,
double z)
Sets the z-coordinate for the given layer (graph). |
void |
sortGraphsByZ()
Sorts the layers (graphs) inside this LayeredLayoutGraph
with respect to their z-position. |
Methods inherited from class y25.base.LayeredGraph |
copyCreateStructureData, createEdgeMap, createGraph, createGraph, createGraphMap, createLayerEdge, createLayerEdgeMap, createNodeMap, duplicateGraph, E, edgeCount, G, getEdgeID, getGraphArray, getGraphCursorAfter, getGraphCursorBefore, getLayerEdgeArray, getNodeID, getParentID, graphCount, graphs, importGraph, inLayerEdges, layerEdgeCount, layerEdges, LE, moveBackward, moveForward, moveToBack, moveToFront, N, nodeCount, outLayerEdges, setEdgeID, setNodeID, setParentID, sortGraphs, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected GraphMap layerLayouts
protected LayerEdgeMap layerEdgeLayouts
protected BoundingBox boundingBox
LayeredLayoutGraph
.
Constructor Detail |
public LayeredLayoutGraph()
LayeredLayoutGraph
.
Method Detail |
public void clear()
LayeredLayoutGraph
to its initial state.
clear
in class LayeredGraph
public void clearLayerEdges()
LayeredLayoutGraph
.
clearLayerEdges
in class LayeredGraph
public void removeGraph(Graph graph)
LayoutGraph
from this
LayeredLayoutGraph
.
Additionally to the actions described in
LayeredGraph.removeGraph
this method also removes the layer layout associated with the removed
graph.
removeGraph
in class LayeredGraph
graph
- The graph that will be removed.public void removeLayerEdge(LayerEdge layerEdge)
Additionally to the actions described in
LayeredGraph.removeLayerEdge
this method also removes the layer edge layout associated with the
removed layer edge.
removeLayerEdge
in class LayeredGraph
layerEdge
- The layer edge that will be removed.public void sortGraphsByZ()
LayeredLayoutGraph
with respect to their z-position. Layers with low z-values will go before
layers with higher z-values.
public BoundingBox getBoundingBox()
LayeredLayoutGraph
.
public void recalculateBoundingBox()
public LayerLayout25D getLayout(Graph graph)
LayeredLayoutGraph
.
public LayerEdgeLayout25D getLayout(LayerEdge layerEdge)
LayeredLayoutGraph
.
public Point3D getPoint3D(Node n)
NodeLayout25D
of the
node, the z-coordinate is extracted from the LayerLayout25D of the layer
the node belongs to.
public void setZ(Graph graph, double z)
public double getZ(Graph graph)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |