|
Search this API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object y.layout.hierarchic.incremental.DefaultLayeredComponentsMerger
public class DefaultLayeredComponentsMerger
A default implementation of a LayeredComponentsMerger
that provides simple default behaviors.
Instances of this class are used internally by HierarchicLayouter
and MultiComponentLayerer
when e.g.
the graph is grouped or it consists of more than one connected component.
Field Summary | |
---|---|
static byte |
POLICY_ADD_ABOVE
A constant that adds the new layers of the source layering above the layers of
the target layering . |
static byte |
POLICY_ADD_BELOW
A constant that adds the new layers of the source layering below the layers of
the target layering . |
static byte |
POLICY_ADD_LEFT_BOTTOM_ALIGNED
A constant that adds the new layers of the source layering to the left of
the layers of the target layering . |
static byte |
POLICY_ADD_LEFT_CENTER_ALIGNED
A constant that adds the new layers of the source layering to the left of
the layers of the target layering . |
static byte |
POLICY_ADD_LEFT_TOP_ALIGNED
A constant that adds the new layers of the source layering to the left of
the layers of the target layering . |
static byte |
POLICY_ADD_RIGHT_BOTTOM_ALIGNED
A constant that adds the new layers of the source layering to the right of
the layers of the target layering . |
static byte |
POLICY_ADD_RIGHT_CENTER_ALIGNED
A constant that adds the new layers of the source layering to the right of
the layers of the target layering . |
static byte |
POLICY_ADD_RIGHT_TOP_ALIGNED
A constant that adds the new layers of the source layering to the right of
the layers of the target layering. |
Constructor Summary | |
---|---|
DefaultLayeredComponentsMerger()
Creates a new instance of DefaultLayeredComponentsMerger
with default settings. |
|
DefaultLayeredComponentsMerger(byte policy)
Creates a new instance of DefaultLayeredComponentsMerger
using the given merging policy. |
Method Summary | |
---|---|
byte |
getPolicy()
Returns the merging policy constant as defined in DefaultLayeredComponentsMerger . |
void |
merge(LayoutGraph graph,
LayoutDataProvider ldp,
Layers srcLayers,
Layers targetLayers)
Merges two Layers instances. |
void |
setPolicy(byte policy)
Specifies the merging policy constant as defined in DefaultLayeredComponentsMerger . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final byte POLICY_ADD_BELOW
layering
below the layers of
the target layering
.
public static final byte POLICY_ADD_ABOVE
layering
above the layers of
the target layering
.
public static final byte POLICY_ADD_RIGHT_TOP_ALIGNED
layering
to the right of
the layers of the target layering.
Both layering
s will become top-aligned before the merge.
public static final byte POLICY_ADD_RIGHT_BOTTOM_ALIGNED
layering
to the right of
the layers of the target layering
.
Both layering
s will become bottom-aligned before the merge.
public static final byte POLICY_ADD_RIGHT_CENTER_ALIGNED
layering
to the right of
the layers of the target layering
.
Both layering
s will become center-aligned before the merge.
public static final byte POLICY_ADD_LEFT_TOP_ALIGNED
layering
to the left of
the layers of the target layering
.
Both layering
s will become top-aligned before the merge.
public static final byte POLICY_ADD_LEFT_BOTTOM_ALIGNED
layering
to the left of
the layers of the target layering
.
Both layering
s will become bottom-aligned before the merge.
public static final byte POLICY_ADD_LEFT_CENTER_ALIGNED
layering
to the left of
the layers of the target layering
.
Both layering
s will become center-aligned before the merge.
Constructor Detail |
---|
public DefaultLayeredComponentsMerger()
DefaultLayeredComponentsMerger
with default settings.
public DefaultLayeredComponentsMerger(byte policy)
DefaultLayeredComponentsMerger
using the given merging policy.
policy
- one of the predefined merging constants
java.lang.IllegalArgumentException
- if an unknown policy is givenMethod Detail |
---|
public byte getPolicy()
DefaultLayeredComponentsMerger
.
setPolicy(byte)
public void setPolicy(byte policy)
DefaultLayeredComponentsMerger
.
POLICY_ADD_RIGHT_TOP_ALIGNED
. Nodes of the source layering
are to the right of
the target layering
and all nodes are top-aligned.policy
- one of the predefined merging policy constants
java.lang.IllegalArgumentException
- if an unknown policy is givenpublic void merge(LayoutGraph graph, LayoutDataProvider ldp, Layers srcLayers, Layers targetLayers)
LayeredComponentsMerger
Layers
instances.
All nodes that belong to the source and target Layers
are part of the graph at the moment of
invocation.
The state of the source Layers
instance is discarded after this call and does not need to
be updated to reflect the changes. The target Layers
instance must be updated accordingly.
merge
in interface LayeredComponentsMerger
graph
- the graph containing the nodes of source and target Layers
instancesldp
- the LayoutDataProvider
used for querying the layer indicessrcLayers
- the source Layers
instance that will be merged into the target Layers
instancetargetLayers
- the Layers
instance that will be modified to contain the resulting
layering
|
© Copyright 2000-2022, yWorks GmbH. All rights reserved. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |