Search this API

y.layout
Class DefaultGraphLayout

java.lang.Object
  extended by y.layout.DefaultGraphLayout
All Implemented Interfaces:
GraphLayout

public class DefaultGraphLayout
extends Object
implements GraphLayout

This class is a default implementation of the simple GraphLayout interface.


Constructor Summary
DefaultGraphLayout()
           
 
Method Summary
 Rectangle getBoundingBox()
          Returns the bounding box of this graph layout This is the smallest rectangle containing the entire layout.
 EdgeLabelLayout[] getEdgeLabelLayout(Object edge)
          Returns the edge label layouts associated with the given edge.
 EdgeLayout getEdgeLayout(Object edge)
          Returns the layout information associated with the given edge object.
 NodeLabelLayout[] getNodeLabelLayout(Object node)
          Returns the node label layouts associated with the given node.
 NodeLayout getNodeLayout(Object node)
          Returns the layout information associated with the given node object.
 void setEdgeLabelLayout(Object edge, EdgeLabelLayout[] layout)
          Sets the edge label layouts associated with the given edge.
 void setEdgeLayout(Object edge, EdgeLayout layout)
          Sets the layout information associated with the given edge object.
 void setNodeLabelLayout(Object node, NodeLabelLayout[] layout)
          Sets the node label layouts associated with the given node.
 void setNodeLayout(Object node, NodeLayout layout)
          Sets the layout information associated with the given node object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultGraphLayout

public DefaultGraphLayout()
Method Detail

setNodeLayout

public void setNodeLayout(Object node,
                          NodeLayout layout)
Sets the layout information associated with the given node object.


setEdgeLayout

public void setEdgeLayout(Object edge,
                          EdgeLayout layout)
Sets the layout information associated with the given edge object.


getEdgeLayout

public EdgeLayout getEdgeLayout(Object edge)
Returns the layout information associated with the given edge object.

Specified by:
getEdgeLayout in interface GraphLayout

getNodeLayout

public NodeLayout getNodeLayout(Object node)
Returns the layout information associated with the given node object.

Specified by:
getNodeLayout in interface GraphLayout

setNodeLabelLayout

public void setNodeLabelLayout(Object node,
                               NodeLabelLayout[] layout)
Sets the node label layouts associated with the given node.


getNodeLabelLayout

public NodeLabelLayout[] getNodeLabelLayout(Object node)
Returns the node label layouts associated with the given node.

Specified by:
getNodeLabelLayout in interface GraphLayout

setEdgeLabelLayout

public void setEdgeLabelLayout(Object edge,
                               EdgeLabelLayout[] layout)
Sets the edge label layouts associated with the given edge.


getEdgeLabelLayout

public EdgeLabelLayout[] getEdgeLabelLayout(Object edge)
Returns the edge label layouts associated with the given edge.

Specified by:
getEdgeLabelLayout in interface GraphLayout

getBoundingBox

public Rectangle getBoundingBox()
Returns the bounding box of this graph layout This is the smallest rectangle containing the entire layout. If the layout does not contain any node layout information (and therefore no edge layout information either), the bounding box will have negative width and/or height.

Specified by:
getBoundingBox in interface GraphLayout

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