|
Search this API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object y.layout.AbstractLayoutStage y.layout.KeepStrongPortConstraintsStage
public class KeepStrongPortConstraintsStage
KeepStrongPortConstraintsStage
ensures that layout algorithms that cannot handle port constraints keep the
ports of edges with strong PortConstraint
s. Without this stage, the port locations get lost.
For each edge with strong PortConstraint
s, this stage simply stores the original port and restores it
after applying the core layout algorithm
.
Therefore, it either replaces the source/target port
by the original port or adds the original port to the
edge path calculated by the core layout algorithm
(see method setKeepCalculatedPortsEnabled(boolean)
).
Field Summary |
---|
Fields inherited from interface y.layout.Layouter |
---|
EDGE_ID_DPKEY, NODE_ID_DPKEY, NODE_TYPE_DPKEY, SELECTED_EDGES, SELECTED_NODES |
Constructor Summary | |
---|---|
KeepStrongPortConstraintsStage()
Creates a new KeepStrongPortConstraintsStage instance with default settings. |
|
KeepStrongPortConstraintsStage(Layouter coreLayouter)
Creates a new KeepStrongPortConstraintsStage instance using the given
core layout algorithm . |
Method Summary | |
---|---|
boolean |
canLayout(LayoutGraph graph)
Accepts all graphs that can be handled by the core layout algorithm . |
void |
doLayout(LayoutGraph graph)
Restores the locations of strong PortConstraint s after invoking the
core layout algorithm . |
boolean |
isKeepCalculatedPortsEnabled()
Returns whether or not the final edge routes should contain the ports calculated by the core layout algorithm . |
void |
setKeepCalculatedPortsEnabled(boolean keepPorts)
Specifies whether or not the final edge routes should contain the ports calculated by the core layout algorithm . |
Methods inherited from class y.layout.AbstractLayoutStage |
---|
canLayoutCore, doLayoutCore, getCoreLayouter, setCoreLayouter |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public KeepStrongPortConstraintsStage()
KeepStrongPortConstraintsStage
instance with default settings.
public KeepStrongPortConstraintsStage(Layouter coreLayouter)
KeepStrongPortConstraintsStage
instance using the given
core layout algorithm
.
coreLayouter
- the core layout routineMethod Detail |
---|
public boolean isKeepCalculatedPortsEnabled()
core layout algorithm
.
If this option is disabled, this stage
simply replaces the current source/target ports (calculated by the core layout algorithm)
by the original ports (for strong ports only). Otherwise, the calculated ports are still contained in the
edge paths.
true
if the final edge route should contain the ports calculated by the core layout algorithm,
false
otherwisepublic void setKeepCalculatedPortsEnabled(boolean keepPorts)
core layout algorithm
.
If this option is disabled, this stage
simply replaces the current source/target ports (calculated by the core layout algorithm)
by the original ports (for strong ports only). Otherwise, the calculated ports are still contained in the
edge paths.
keepPorts
- true
if the final edge route should contain the ports calculated by the core
layout algorithm, false
otherwisefalse | true |
public boolean canLayout(LayoutGraph graph)
core layout algorithm
.
If there is no core layout algorithm
, all graphs are accepted.
graph
- the input graph
true
if there is no core layout algorithm or the core layout algorithm accepts the graph,
false
otherwiseLayouter.doLayout(LayoutGraph)
public void doLayout(LayoutGraph graph)
PortConstraint
s after invoking the
core layout algorithm
.
graph
- the input graphLayouter.canLayout(LayoutGraph)
|
© Copyright 2000-2022, yWorks GmbH. All rights reserved. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |