y.layout
Interface Layouter

All Known Subinterfaces:
LayoutStage
All Known Implementing Classes:
AbstractLayoutStage, BendConverter, CanonicMultiStageLayouter, CompositeLayouter, GraphTransformer, GraphZoomer, LabelLayoutTranslator, OrganicEdgeRouter, RemoveOverlapsLayoutStage, ShuffleLayouter, SplitEdgeLayoutStage, TreeComponentLayouter

public interface Layouter

This is a general interface for algorithms that perform a layout process on a given layout graph.


Field Summary
static Object EDGE_ID_DPKEY
          The data provider key used to look up a unique Object identifier (consistend with hashCode() and equals() ) for each edge in a graph.
static Object NODE_ID_DPKEY
          The data provider key used to look up a unique Object identifier (consistend with hashCode() and equals() ) for each node in a graph.
static Object SELECTED_EDGES
          The data provider key used to look up the selected state of the edges of the graph to be layed out.
static Object SELECTED_NODES
          The data provider key used to look up the selected state of the nodes of the graph to be layed out.
 
Method Summary
 boolean canLayout(LayoutGraph graph)
          Returns true iff the given graph can be layed out by this algorithm.
 void doLayout(LayoutGraph graph)
          Assigns a new graph layout to the given layout graph.
 

Field Detail

NODE_ID_DPKEY

public static final Object NODE_ID_DPKEY
The data provider key used to look up a unique Object identifier (consistend with hashCode() and equals() ) for each node in a graph. Layout algorithms may use this information to provide consistent layouts for multiple runs. The looked up data provider should provide Object values for the nodes of that graph. These should be consistend with the Object.hashCode() and Object.equals() methods.


EDGE_ID_DPKEY

public static final Object EDGE_ID_DPKEY
The data provider key used to look up a unique Object identifier (consistend with hashCode() and equals() ) for each edge in a graph. Layout algorithms may use this information to provide consistent layouts for multiple runs. The looked up data provider should provide Object values for the edges of that graph. These should be consistend with the Object.hashCode() and Object.equals() methods.


SELECTED_NODES

public static final Object SELECTED_NODES
The data provider key used to look up the selected state of the nodes of the graph to be layed out. A layout algorithm will try to retrieve a data provider from the graph to be layed out with this key. The looked up data provider should provide boolean values for the nodes of that graph. The boolean value should signal wheater a node is to be considered as selected or not.


SELECTED_EDGES

public static final Object SELECTED_EDGES
The data provider key used to look up the selected state of the edges of the graph to be layed out. A layout algorithm will try to retrieve a data provider from the graph to be layed out with this key. The looked up data provider should provide boolean values for the edges of that graph. The boolean value should signal wheater an edge is to be considered as selected or not.

Method Detail

canLayout

public boolean canLayout(LayoutGraph graph)
Returns true iff the given graph can be layed out by this algorithm. Calling doLayout with the given graph as it's argument will only success if this method returns true.


doLayout

public void doLayout(LayoutGraph graph)
Assigns a new graph layout to the given layout graph.


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

2003