org.graphstream.ui.layout
Interface LayoutListener

All Known Implementing Classes:
FileSinkImages

public interface LayoutListener

Listener for layout algorithms.

This listener allows to be notified of each position change in the graph.


Method Summary
 void edgeChanged(String id, double[] points)
          The break points of an edge changed.
 void edgesChanged(Map<String,double[]> edges)
          Several edges changed at once.
 void nodeInfos(String id, double dx, double dy, double dz)
          Only if requested in the layout algorithm, this reports various information on the node.
 void nodeMoved(String id, double x, double y, double z)
          A node moved to (x,y,z).
 void nodesMoved(Map<String,double[]> nodes)
          Several nodes moved at once.
 void stepCompletion(double percent)
          The current step is completed at the given percent.
 

Method Detail

nodeMoved

void nodeMoved(String id,
               double x,
               double y,
               double z)
A node moved to (x,y,z).

Parameters:
id - Identifier of the node that moved.
x - new abscissa of the node.
y - new ordinate of the node.
z - new depth of the node.

nodeInfos

void nodeInfos(String id,
               double dx,
               double dy,
               double dz)
Only if requested in the layout algorithm, this reports various information on the node.

Parameters:
id - The node identifier.
dx - The node displacement vector.
dy - The node displacement vector.
dz - The node displacement vector.

edgeChanged

void edgeChanged(String id,
                 double[] points)
The break points of an edge changed.

Parameters:
id - The edge that changed.
points - The points description. This description is specific to the layout algorithm.

nodesMoved

void nodesMoved(Map<String,double[]> nodes)
Several nodes moved at once.

Parameters:
nodes - The new node positions.

edgesChanged

void edgesChanged(Map<String,double[]> edges)
Several edges changed at once.

Parameters:
edges - The new edges description.

stepCompletion

void stepCompletion(double percent)
The current step is completed at the given percent. This allows to implement a progress bar if the operation takes a too long time.

Parameters:
percent - a number between 0 and 1, 1 means the steps is completed.


Copyright © 2011. All Rights Reserved.