y.layout
Class PortConstraintEnforcementStage
java.lang.Object
y.layout.AbstractLayoutStage
y.layout.PortConstraintEnforcementStage
- All Implemented Interfaces:
- Layouter, LayoutStage
public class PortConstraintEnforcementStage
- extends AbstractLayoutStage
This layout stage can be used to enforce that a layout algorithm will not change
the relative coordinates of ports that are associated with a strong/fixed port constraint.
Usage:
//prepare port constraints
graph.addDataProvider(PortConstraintKeys.SOURCE_PORT_CONSTRAINT_KEY, createSPCs(graph));
graph.addDataProvider(PortConstraintKeys.TARGET_PORT_CONSTRAINT_KEY, createTPCs(graph));
//create layout pipeline
OrganicLayouter layouter = new OrganicLayouter();
PortConstraintEnforcementStage stage = new PortConstraintEnforcementStage();
stage.setCoreLayouter(organic);
//launch algorithms
new BufferedLayouter(stage).doLayout(graph);
-
-

|
Method Summary |
boolean |
canLayout(LayoutGraph graph)
Returns true iff the given graph can be layed
out by this algorithm. |
void |
doLayout(LayoutGraph graph)
Main layout routine that assigns new layout information to the given graph. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PortConstraintEnforcementStage
public PortConstraintEnforcementStage()
canLayout
public boolean canLayout(LayoutGraph graph)
- Description copied from interface:
Layouter
- 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)
- Description copied from interface:
Layouter
- Main layout routine that assigns new layout information to the given graph.