jdsl.extension.LEDA.Layout
Interface GraphLayout

All Known Implementing Classes:
DefaultGraphLayout, XYGraphLayout, CircleGraphLayout, RandomGraphLayout

public abstract interface GraphLayout
extends Layout

The GraphLayout interface provides common methods for a class which is used to layout graphs.


Method Summary
 void calculation(java.util.Enumeration vertices)
          Calculate a layout based on a Vertex enumeration.
 void calculation(jdsl.graph.api.InspectableGraph graph)
          Calculate a layout based on given graph graph.
 Point[] getPosition(jdsl.graph.api.Edge which)
          Returns current position of edge which.
 Point getPosition(jdsl.graph.api.Vertex which)
          Returns current position of vertex which.
 void merge(java.util.Enumeration objs, GraphLayout other)
          Merges current and given GraphLayout together (prefers given new layout!)
 void merge(java.util.Enumeration objs, GraphLayout other, boolean override)
          Merges current and given GraphLayout together.
 void setPosition(jdsl.graph.api.Edge which, Point[] where)
          Changes the position of edge which to where.
 void setPosition(jdsl.graph.api.Vertex which, Point where)
          Changes the position of vertex which to where.
 void setX(jdsl.graph.api.Vertex which, double where)
          Changes X-coordinate of vertex which to where.
 void setY(jdsl.graph.api.Vertex which, double where)
          Changes Y-coordinate of vertex which to where.
 void update(InspectableEdgeAttribute_PointArray data, jdsl.graph.api.EdgeIterator edges)
          Changes positions for all edges in edges using data.
 void update(InspectableVertexAttribute_Point data, jdsl.graph.api.VertexIterator vertices)
          Changes positions for all vertices in vertices using data.
 
Methods inherited from interface jdsl.extension.LEDA.Layout.Layout
calculation, clearLayout
 

Method Detail

setPosition

public void setPosition(jdsl.graph.api.Vertex which,
                        Point where)
Changes the position of vertex which to where.
Parameters:
which - the vertex which position will be changed
where - new position

setX

public void setX(jdsl.graph.api.Vertex which,
                 double where)
Changes X-coordinate of vertex which to where.
Parameters:
which - the vertex which position will be changed
where - new position

setY

public void setY(jdsl.graph.api.Vertex which,
                 double where)
Changes Y-coordinate of vertex which to where.
Parameters:
which - the vertex which position will be changed
where - new position

setPosition

public void setPosition(jdsl.graph.api.Edge which,
                        Point[] where)
Changes the position of edge which to where. where is an array of Points (Interpretation is different!).
Parameters:
which - the edge which position will be changed
where - new positions.

getPosition

public Point getPosition(jdsl.graph.api.Vertex which)
Returns current position of vertex which.
Parameters:
which - the vertex which position will be returned
Returns:
current position

getPosition

public Point[] getPosition(jdsl.graph.api.Edge which)
Returns current position of edge which.
Parameters:
which - the edge which position will be returned
Returns:
current position (an array of Points

update

public void update(InspectableVertexAttribute_Point data,
                   jdsl.graph.api.VertexIterator vertices)
Changes positions for all vertices in vertices using data.

update

public void update(InspectableEdgeAttribute_PointArray data,
                   jdsl.graph.api.EdgeIterator edges)
Changes positions for all edges in edges using data.

calculation

public void calculation(jdsl.graph.api.InspectableGraph graph)
Calculate a layout based on given graph graph.
Parameters:
graph - given graph

calculation

public void calculation(java.util.Enumeration vertices)
Calculate a layout based on a Vertex enumeration.
Parameters:
vertices - given vertex enumeration

merge

public void merge(java.util.Enumeration objs,
                  GraphLayout other,
                  boolean override)
Merges current and given GraphLayout together.
Parameters:
objs - is an enumeration of all elements (Vertices and Edges) to be insert
other - given other GraphLayout
override - if true old positions are overridden by new position (in other).

merge

public void merge(java.util.Enumeration objs,
                  GraphLayout other)
Merges current and given GraphLayout together (prefers given new layout!)
Parameters:
objs - is an enumeration of all elements (Vertices and Edges) to be inserted
other - given other GraphLayout