public interface ILayoutAlgorithm
ILayoutAlgorithm
describes the general interface for algorithms that perform a layout process on a
LayoutGraph
.
The main method for invoking the layout calculation is
applyLayout(LayoutGraph)
. Implementing classes will arrange the graph there.
This class also provides keys to register IDataProvider
s with the graph that
contain information about the nodes and edges in the graph. IDataProvider
s
registered with LayoutKeys.NODE_ID_DPKEY
and LayoutKeys.EDGE_ID_DPKEY
contain unique identifiers for
both nodes and edges. These identifiers allow for ensuring consistent results even if the order of nodes and edges was
changed between two layout runs.
The selection state of nodes and edges is stored in IDataProvider
s registered with
the keys LayoutKeys.AFFECTED_NODES_DPKEY
and
LayoutKeys.AFFECTED_EDGES_DPKEY
. Based on this information, the layout algorithm may reduce its calculations
to the selected subset of nodes or edges.
Modifier and Type | Method and Description |
---|---|
void |
applyLayout(LayoutGraph graph)
Main layout routine that assigns new layout information to the given graph.
|
void applyLayout(LayoutGraph graph)
The call to this routine will only succeed if the layout algorithm can handle the input graph.
graph
- the input graph