Search this API

y.layout
Interface GraphLayout

All Known Implementing Classes:
CopiedLayoutGraph, DefaultGraphLayout, DefaultLayoutGraph, Graph2D, LayoutGraph

public interface GraphLayout

The GraphLayout defines the layout information of a graph.

It provides layout information for nodes, edges and their associated labels as well as the graph as a whole.

 

Method Summary
 java.awt.Rectangle getBoundingBox()
          Returns the bounding box of this GraphLayout.
 EdgeLabelLayout[] getEdgeLabelLayout(java.lang.Object edge)
          Returns the layout information for all edge labels belonging to the given edge.
 EdgeLayout getEdgeLayout(java.lang.Object edge)
          Returns the layout information associated with the given edge.
 NodeLabelLayout[] getNodeLabelLayout(java.lang.Object node)
          Returns the layout information for all node labels belonging to the given node.
 NodeLayout getNodeLayout(java.lang.Object node)
          Returns the layout information associated with the given node.
 

Method Detail

getNodeLayout

NodeLayout getNodeLayout(java.lang.Object node)
Returns the layout information associated with the given node.

This information contains the location and size of the node.

Parameters:
node - the node
Returns:
the layout information for the node

getEdgeLayout

EdgeLayout getEdgeLayout(java.lang.Object edge)
Returns the layout information associated with the given edge.

This information contains the coordinates of the source and target points as well as the coordinates of all control points.

Parameters:
edge - the edge
Returns:
the layout information for the edge

getNodeLabelLayout

NodeLabelLayout[] getNodeLabelLayout(java.lang.Object node)
Returns the layout information for all node labels belonging to the given node.

This information contains the location and size of the labels.

Parameters:
node - the node that owns the labels
Returns:
the array of all labels that belong to the given node

getEdgeLabelLayout

EdgeLabelLayout[] getEdgeLabelLayout(java.lang.Object edge)
Returns the layout information for all edge labels belonging to the given edge.

This information contains the location and size of the labels.

Parameters:
edge - the edge that owns the labels
Returns:
the array of all labels that belong to the given edge

getBoundingBox

java.awt.Rectangle getBoundingBox()
Returns the bounding box of this GraphLayout.

This box is the smallest rectangular area that contains all layout elements in this GraphLayout.

 
If there are no elements in this GraphLayout, the resulting rectangle will have negative width and height.
Returns:
the surrounding box of all elements of the graph

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