public class GivenSequenceSequencer extends Object implements ISequencer
ISequencer implementation that determines the sequence of nodes of the same layer
based on a given comparator constraint.| Constructor and Description |
|---|
GivenSequenceSequencer()
Creates a new instance of
GivenSequenceSequencer using a given Comparator for the sequencing. |
GivenSequenceSequencer(Comparator<Object> c)
Creates a new instance of
GivenSequenceSequencer using a given Comparator for the sequencing. |
| Modifier and Type | Method and Description |
|---|---|
Comparator<Object> |
getSequenceComparator()
Gets the
Comparator used by this GivenSequenceSequencer to determine the sequence of the nodes. |
void |
sequenceNodeLayers(LayoutGraph graph,
ILayers layers,
ILayoutDataProvider ldp,
IItemFactory itemFactory)
Calculates the sequence of the nodes within a
ILayers instance based on the given Comparator instance. |
void |
setSequenceComparator(Comparator<Object> value)
Sets the
Comparator used by this GivenSequenceSequencer to determine the sequence of the nodes. |
public GivenSequenceSequencer()
GivenSequenceSequencer using a given Comparator for the sequencing.public GivenSequenceSequencer(Comparator<Object> c)
GivenSequenceSequencer using a given Comparator for the sequencing.public Comparator<Object> getSequenceComparator()
Comparator used by this GivenSequenceSequencer to determine the sequence of the nodes.null. No Comparator is specified.Comparator instancesetSequenceComparator(Comparator)public void sequenceNodeLayers(LayoutGraph graph, ILayers layers, ILayoutDataProvider ldp, IItemFactory itemFactory)
ILayers instance based on the given Comparator instance.
This method is called by HierarchicLayoutCore during the sequencing phase
and finally writes back the calculated sequence using the ILayer.setNodeOrder(YList)
method.
sequenceNodeLayers in interface ISequencergraph - the input graphlayers - the given ILayers instance containing the elements of the layersldp - the ILayoutDataProvider containing information about the nodes and edges of the graphitemFactory - the IItemFactory used for creating and destroying helper structurespublic void setSequenceComparator(Comparator<Object> value)
Comparator used by this GivenSequenceSequencer to determine the sequence of the nodes.null. No Comparator is specified.value - a Comparator instancegetSequenceComparator()