y.layout
Class DefaultLayoutGraph

java.lang.Object
  |
  +--y.base.Graph
        |
        +--y.layout.LayoutGraph
              |
              +--y.layout.DefaultLayoutGraph
All Implemented Interfaces:
GraphInterface, GraphLayout

public class DefaultLayoutGraph
extends LayoutGraph

This class is an default implementation of the abstract class LayoutGraph.


Field Summary
protected  Hashtable edgeLabelFeatureMap
           
protected  EdgeMap edgeLabelMap
           
protected  Hashtable nodeLabelFeatureMap
           
protected  NodeMap nodeLabelMap
           
 
Fields inherited from class y.base.Graph
AFTER, BEFORE, listeners
 
Constructor Summary
DefaultLayoutGraph()
          Creates a new Layout Graph
DefaultLayoutGraph(DefaultLayoutGraph graph, YCursor nodeSubset)
          Creates a copy of the given subgraph.
DefaultLayoutGraph(LayoutGraph graph, YCursor nodeSubset)
          Creates a copy of the given subgraph.
 
Method Summary
protected  EdgeLayout createEdgeLayout()
          Override this to create your own EdgeLayouts.
protected  NodeLayout createNodeLayout()
          Override this to create your own NodeLayouts.
 Edge getFeature(EdgeLabelLayout labelLayout)
          Returns the edge which is described by a given label layout.
 Node getFeature(NodeLabelLayout labelLayout)
          Returns the node which is described by a given label layout.
 EdgeLabelLayout[] getLabelLayout(Edge edge)
          Returns EdgeLabelLayout objects which describe the layouts of the labels that belong to the given edge.
 NodeLabelLayout[] getLabelLayout(Node node)
          Returns NodeLabelLayout objects that describe the layouts of the labels belonging to the given node.
 EdgeLayout getLayout(Edge e)
          Returns the layout information for an edge in the drawing.
 NodeLayout getLayout(Node v)
          Returns the layout information for a node in the drawing.
 void setLabelLayout(Edge edge, EdgeLabelLayout[] layout)
          Sets the EdgeLabelLayout objects which describe the layouts of the labels that belong to the given edge.
 void setLabelLayout(Node node, NodeLabelLayout layout)
          Sets the NodeLabelLayout object which describes the layout of the label that belongs to the given node.
 void setLayout(Edge e, EdgeLayout layout)
          Sets the layout information for an edge in the drawing.
 void setLayout(Node v, NodeLayout layout)
          Sets the layout information for a node in the drawing.
 
Methods inherited from class y.layout.LayoutGraph
getBoundingBox, getCenter, getCenterX, getCenterY, getEdgeLabelLayout, getEdgeLayout, getEdgeList, getHeight, getLocation, getNodeLabelLayout, getNodeLayout, getPath, getPathList, getPointList, getPoints, getRectangle, getSize, getSourcePointAbs, getSourcePointRel, getTargetPointAbs, getTargetPointRel, getWidth, getX, getY, moveBy, setCenter, setCenter, setEndPointsAbs, setLocation, setLocation, setPath, setPath, setPoints, setPoints, setSize, setSize, setSourcePointAbs, setSourcePointRel, setTargetPointAbs, setTargetPointRel
 
Methods inherited from class y.base.Graph
addDataProvider, addGraphListener, changeEdge, changeEdge, changeEdge, clear, contains, contains, containsEdge, createCopy, createEdge, createEdge, createEdgeMap, createGraph, createNode, createNodeMap, disposeEdgeMap, disposeNodeMap, E, edgeCount, edgeObjects, edges, fireGraphEvent, firePostEvent, firePostEvent, firePreEvent, firePreEvent, firstEdge, firstNode, firstOutEdge, getDataProvider, getDataProviderKeys, getEdgeArray, getGraphListeners, getNodeArray, getRegisteredEdgeMaps, getRegisteredNodeMaps, getSource, getTarget, hide, hide, isEmpty, lastEdge, lastNode, moveSubGraph, moveToFirst, moveToFirst, moveToLast, moveToLast, N, nodeCount, nodeObjects, nodes, printNodeSlotSize, reInsertEdge, reInsertNode, removeDataProvider, removeEdge, removeGraphListener, removeNode, reverseEdge, sortEdges, toString, unhide, unhide
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

nodeLabelMap

protected NodeMap nodeLabelMap

edgeLabelMap

protected EdgeMap edgeLabelMap

nodeLabelFeatureMap

protected Hashtable nodeLabelFeatureMap

edgeLabelFeatureMap

protected Hashtable edgeLabelFeatureMap
Constructor Detail

DefaultLayoutGraph

public DefaultLayoutGraph()
Creates a new Layout Graph


DefaultLayoutGraph

public DefaultLayoutGraph(LayoutGraph graph,
                          YCursor nodeSubset)
Creates a copy of the given subgraph.


DefaultLayoutGraph

public DefaultLayoutGraph(DefaultLayoutGraph graph,
                          YCursor nodeSubset)
Creates a copy of the given subgraph.

Method Detail

getLayout

public NodeLayout getLayout(Node v)
Returns the layout information for a node in the drawing.

Specified by:
getLayout in class LayoutGraph
Parameters:
v - a node in the drawing.
Returns:
the layout information for node.

setLayout

public void setLayout(Node v,
                      NodeLayout layout)
Sets the layout information for a node in the drawing.


setLayout

public void setLayout(Edge e,
                      EdgeLayout layout)
Sets the layout information for an edge in the drawing.


getLayout

public EdgeLayout getLayout(Edge e)
Returns the layout information for an edge in the drawing.

Specified by:
getLayout in class LayoutGraph
Parameters:
e - a edge in the drawing.
Returns:
the layout information for the given edge.

getLabelLayout

public NodeLabelLayout[] getLabelLayout(Node node)
Returns NodeLabelLayout objects that describe the layouts of the labels belonging to the given node.

Specified by:
getLabelLayout in class LayoutGraph
Parameters:
node - a node in the drawing.
Returns:
the node label layout information for the given node.

setLabelLayout

public void setLabelLayout(Node node,
                           NodeLabelLayout layout)
Sets the NodeLabelLayout object which describes the layout of the label that belongs to the given node.

Parameters:
node - a node in the drawing.
layout - a layout object for the nodelabel

setLabelLayout

public void setLabelLayout(Edge edge,
                           EdgeLabelLayout[] layout)
Sets the EdgeLabelLayout objects which describe the layouts of the labels that belong to the given edge.

Parameters:
edge - an edge in the drawing.
layout - an array of edge label layout objects

getLabelLayout

public EdgeLabelLayout[] getLabelLayout(Edge edge)
Returns EdgeLabelLayout objects which describe the layouts of the labels that belong to the given edge.

Specified by:
getLabelLayout in class LayoutGraph
Parameters:
edge - an edge in the drawing.
Returns:
the edge label layout information for the given edge.

getFeature

public Node getFeature(NodeLabelLayout labelLayout)
Returns the node which is described by a given label layout.

Specified by:
getFeature in class LayoutGraph

getFeature

public Edge getFeature(EdgeLabelLayout labelLayout)
Returns the edge which is described by a given label layout.

Specified by:
getFeature in class LayoutGraph

createEdgeLayout

protected EdgeLayout createEdgeLayout()
Override this to create your own EdgeLayouts.


createNodeLayout

protected NodeLayout createNodeLayout()
Override this to create your own NodeLayouts.


© Copyright 2000-2003,
yWorks GmbH.
All rights reserved.

2003