|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objecty.layout.hierarchic.incremental.PCListOptimizer
public class PCListOptimizer
This class is an implementation of the PortConstraintOptimizer interface which can be registered
with the HierarchicLayouter instance using it's
HierarchicLayouter.setPortConstraintOptimizer(PortConstraintOptimizer) method.
It will query the graph's DataProvider repository for
the PortCandidate.SOURCE_PCLIST_DPKEY and PortCandidate.TARGET_PCLIST_DPKEY
keys and expects them to hold Collection instances of PortCandidates for each edge.
Additionally it will query the DataProvider associated with PortCandidateSet.NODE_DP_KEY and expects
PortCandidateSet instances associated with each node in the input graph.
This implementation will then try to assign each edge one of the PortCandidates without creating too many crossings
or violating the cost constraints for each PortCandidate.
![]() |
![]() |
| Constructor Summary | |
|---|---|
PCListOptimizer()
|
|
| Method Summary | |
|---|---|
double |
getCrossingPenalty()
Returns the penalty cost that is associated with each generated crossing that would be generated if a given combination of PortCandidates would be chosen. |
byte |
getLayoutOrientation()
Returns the currently set layout orientation for this instance. |
double |
getOverUsagePenalty()
Returns the penalty cost that is associated with each edge being assigned to a port which has no capacity left. |
protected DataProvider |
getPortCandidateSetDataProvider(LayoutGraph graph)
Returns the data provider that provides the port candidate sets for nodes. |
boolean |
isDeterministic()
Determines whether this implementation should use a deterministic algorithm to assign the PortCandidates. |
void |
optimizeAfterLayering(LayoutGraph graph,
Layers layers,
LayoutDataProvider ldp,
ItemFactory itemFactory)
Called after the layering information has been determined. |
void |
optimizeAfterSequencing(LayoutGraph graph,
Layers layers,
LayoutDataProvider ldp,
ItemFactory itemFactory)
Called after the sequence of the nodes has been determined after the layering. |
void |
setCrossingPenalty(double crossingPenalty)
Sets the penalty cost that is associated with each generated crossing that would be generated if a given combination of PortCandidates would be chosen. |
void |
setDeterministic(boolean deterministic)
Sets whether this implementation should use a deterministic algorithm to assign the PortCandidates. |
void |
setLayoutOrientation(byte layoutOrientation)
Sets the layout orientation that should be assumed by this instance. |
void |
setOverUsagePenalty(double overUsagePenalty)
Sets the penalty cost that is associated with each edge being assigned to a port which has no capacity left. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PCListOptimizer()
| Method Detail |
|---|
public boolean isDeterministic()
public void setDeterministic(boolean deterministic)
deterministic - whether to use a deterministic algorithmpublic double getCrossingPenalty()
10.0d.
public void setCrossingPenalty(double crossingPenalty)
10.0d.
crossingPenalty - the penalty for two edges crossingpublic double getOverUsagePenalty()
100.0d.
PortCandidateSet.Entry.getConnections()public void setOverUsagePenalty(double overUsagePenalty)
100.0d.
overUsagePenalty - the penalty for over usage of PortCandidates
public void optimizeAfterLayering(LayoutGraph graph,
Layers layers,
LayoutDataProvider ldp,
ItemFactory itemFactory)
PortConstraintOptimizer
optimizeAfterLayering in interface PortConstraintOptimizergraph - the graph to work onlayers - the layering informationldp - the implementation which provides access to the NodeData and EdgeData instancesitemFactory - the factory to set the temporary port constraints withItemFactory.setTemporaryPortConstraint(y.base.Edge, boolean, y.layout.PortConstraint)protected DataProvider getPortCandidateSetDataProvider(LayoutGraph graph)
graph - The graph that stores the data provider
public void optimizeAfterSequencing(LayoutGraph graph,
Layers layers,
LayoutDataProvider ldp,
ItemFactory itemFactory)
PortConstraintOptimizer
optimizeAfterSequencing in interface PortConstraintOptimizergraph - the graph to work onlayers - the layering informationldp - the implementation which provides access to the NodeData and EdgeData instancesitemFactory - the factory to set the temporary port constraints withItemFactory.setTemporaryPortConstraint(y.base.Edge, boolean, y.layout.PortConstraint)public void setLayoutOrientation(byte layoutOrientation)
PortCandidate instances
since the OrientationLayouter cannot automatically adjust these values.
layoutOrientation - The orientation constant as defined in OrientationLayouter.CanonicMultiStageLayouter.getLayoutOrientation()public byte getLayoutOrientation()
currently set layout orientation for this instance.
|
© Copyright 2000-2008, yWorks GmbH. All rights reserved. |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||