public class HierarchicLayoutData extends LayoutData
HierarchicLayout
.Constructor and Description |
---|
HierarchicLayoutData() |
Modifier and Type | Method and Description |
---|---|
void |
apply(LayoutGraphAdapter adapter,
ILayoutAlgorithm layout,
CopiedLayoutGraph layoutGraph)
Applies this layout data to the specified
layoutGraphAdapter . |
AbortHandler |
getAbortHandler()
Gets the AbortHandler used during the layout.
|
ItemMapping<IEdge,YPointPath> |
getAlternativeEdgePath()
Gets a mapping from edges to alternative paths for edges connecting to groups, group content or folder nodes.
|
ItemMapping<INode,YRectangle> |
getAlternativeGroupBounds()
Gets a mapping from group/folder nodes to alternative bounds for these nodes.
|
ItemCollection<INode> |
getBfsLayererCoreNodes()
Gets the collection of core nodes used by the
BFSLayerer . |
ItemMapping<IEdge,Integer> |
getConstraintIncrementalLayererAdditionalEdgeWeights()
Gets the mapping from edges to an additional weight used by the
ConstraintIncrementalLayerer . |
ItemMapping<IEdge,Integer> |
getCriticalEdgePriorities()
Gets a mapping from edges to their priority to be a 'critical' edge.
|
ItemMapping<IEdge,Double> |
getEdgeDirectedness()
Gets the mapping from edges to their directedness.
|
ItemMapping<IEdge,EdgeLayoutDescriptor> |
getEdgeLayoutDescriptors()
Gets the mapping of edges to their
EdgeLayoutDescriptor . |
ItemMapping<IEdge,Double> |
getEdgeThickness()
Gets the mapping from edges to their thickness.
|
ItemCollection<INode> |
getFolderNodes()
Gets the collection of folder nodes used for recursive edge styles in incremental mode.
|
ItemMapping<INode,Integer> |
getGivenLayersLayererIds()
Gets the mapping from nodes to their layer index when using the
GivenLayersLayerer . |
IncrementalHintItemMapping |
getIncrementalHints()
Gets a mapping from nodes and edges to their incrementally hints.
|
ILayerConstraintFactory |
getLayerConstraintFactory()
Gets the factory to specify layer constraints.
|
IMapper<INode,Integer> |
getLayerIndices()
Gets a mapper from nodes to the index of their layer.
|
ItemMapping<INode,NodeHalo> |
getNodeHalos()
Gets the mapping from nodes to their
NodeHalo . |
ItemMapping<INode,NodeLayoutDescriptor> |
getNodeLayoutDescriptors()
Gets the mapping of nodes to their
NodeLayoutDescriptor . |
ItemMapping<INode,PortCandidateSet> |
getNodePortCandidateSets()
Gets a mapping from nodes to their
PortCandidateSet . |
PartitionGridData |
getPartitionGridData()
Gets the partition grid layout data.
|
SelfLoopCalculatorData |
getSelfLoopCalculatorData()
Gets the layout data for the
SelfLoopCalculator . |
ISequenceConstraintFactory |
getSequenceConstraintFactory()
Gets the factory to specify sequence constraints.
|
IMapper<INode,Integer> |
getSequenceIndices()
Gets a mapper from nodes to the sequence index in their layer.
|
ItemMapping<IEdge,Object> |
getSourceGroupIds()
Gets a mapping from edges to an object representing their source edge group.
|
ItemMapping<IEdge,Collection<PortCandidate>> |
getSourcePortCandidates()
Gets a mapping from edges to a collection of their source port
candidates . |
ItemMapping<IEdge,PortConstraint> |
getSourcePortConstraints()
Gets a mapping from edges to their source
PortConstraint . |
ItemMapping<IEdge,Object> |
getSourcePortGroupIds()
Gets a mapping from edges to an object representing their source port group.
|
ItemMapping<IEdge,Object> |
getTargetGroupIds()
Gets a mapping from edges to an object representing their target edge group.
|
ItemMapping<IEdge,Collection<PortCandidate>> |
getTargetPortCandidates()
Gets a mapping from edges to a collection of their target port
candidates . |
ItemMapping<IEdge,PortConstraint> |
getTargetPortConstraints()
Gets a mapping from edges to their target
PortConstraint . |
ItemMapping<IEdge,Object> |
getTargetPortGroupIds()
Gets a mapping from edges to an object representing their target port group.
|
void |
setAbortHandler(AbortHandler value)
Sets the AbortHandler used during the layout.
|
void |
setAlternativeEdgePath(ItemMapping<IEdge,YPointPath> value)
Sets a mapping from edges to alternative paths for edges connecting to groups, group content or folder nodes.
|
void |
setAlternativeGroupBounds(ItemMapping<INode,YRectangle> value)
Sets a mapping from group/folder nodes to alternative bounds for these nodes.
|
void |
setBfsLayererCoreNodes(ItemCollection<INode> value)
Sets the collection of core nodes used by the
BFSLayerer . |
void |
setConstraintIncrementalLayererAdditionalEdgeWeights(ItemMapping<IEdge,Integer> value)
Sets the mapping from edges to an additional weight used by the
ConstraintIncrementalLayerer . |
void |
setCriticalEdgePriorities(ItemMapping<IEdge,Integer> value)
Sets a mapping from edges to their priority to be a 'critical' edge.
|
void |
setEdgeDirectedness(ItemMapping<IEdge,Double> value)
Sets the mapping from edges to their directedness.
|
void |
setEdgeLayoutDescriptors(ItemMapping<IEdge,EdgeLayoutDescriptor> value)
Sets the mapping of edges to their
EdgeLayoutDescriptor . |
void |
setEdgeThickness(ItemMapping<IEdge,Double> value)
Sets the mapping from edges to their thickness.
|
void |
setFolderNodes(ItemCollection<INode> value)
Sets the collection of folder nodes used for recursive edge styles in incremental mode.
|
void |
setGivenLayersLayererIds(ItemMapping<INode,Integer> value)
Sets the mapping from nodes to their layer index when using the
GivenLayersLayerer . |
void |
setIncrementalHints(IncrementalHintItemMapping value)
Sets a mapping from nodes and edges to their incrementally hints.
|
void |
setLayerConstraintFactory(ILayerConstraintFactory value)
Sets the factory to specify layer constraints.
|
void |
setLayerIndices(IMapper<INode,Integer> value)
Sets a mapper from nodes to the index of their layer.
|
void |
setNodeHalos(ItemMapping<INode,NodeHalo> value)
Sets the mapping from nodes to their
NodeHalo . |
void |
setNodeLayoutDescriptors(ItemMapping<INode,NodeLayoutDescriptor> value)
Sets the mapping of nodes to their
NodeLayoutDescriptor . |
void |
setNodePortCandidateSets(ItemMapping<INode,PortCandidateSet> value)
Sets a mapping from nodes to their
PortCandidateSet . |
void |
setPartitionGridData(PartitionGridData value)
Sets the partition grid layout data.
|
void |
setSelfLoopCalculatorData(SelfLoopCalculatorData value)
Sets the layout data for the
SelfLoopCalculator . |
void |
setSequenceConstraintFactory(ISequenceConstraintFactory value)
Sets the factory to specify sequence constraints.
|
void |
setSequenceIndices(IMapper<INode,Integer> value)
Sets a mapper from nodes to the sequence index in their layer.
|
void |
setSourceGroupIds(ItemMapping<IEdge,Object> value)
Sets a mapping from edges to an object representing their source edge group.
|
void |
setSourcePortCandidates(ItemMapping<IEdge,Collection<PortCandidate>> value)
Sets a mapping from edges to a collection of their source port
candidates . |
void |
setSourcePortConstraints(ItemMapping<IEdge,PortConstraint> value)
Sets a mapping from edges to their source
PortConstraint . |
void |
setSourcePortGroupIds(ItemMapping<IEdge,Object> value)
Sets a mapping from edges to an object representing their source port group.
|
void |
setTargetGroupIds(ItemMapping<IEdge,Object> value)
Sets a mapping from edges to an object representing their target edge group.
|
void |
setTargetPortCandidates(ItemMapping<IEdge,Collection<PortCandidate>> value)
Sets a mapping from edges to a collection of their target port
candidates . |
void |
setTargetPortConstraints(ItemMapping<IEdge,PortConstraint> value)
Sets a mapping from edges to their target
PortConstraint . |
void |
setTargetPortGroupIds(ItemMapping<IEdge,Object> value)
Sets a mapping from edges to an object representing their target port group.
|
public void apply(LayoutGraphAdapter adapter, ILayoutAlgorithm layout, CopiedLayoutGraph layoutGraph)
LayoutData
layoutGraphAdapter
.apply
in class LayoutData
adapter
- The adapter to add the layout data to.layout
- The layout that shall use this layout data.layoutGraph
- The layout graph used for the layout calculation.public final AbortHandler getAbortHandler()
AbortHandler.ABORT_HANDLER_DPKEY
,
setAbortHandler(AbortHandler)
public final ItemMapping<IEdge,YPointPath> getAlternativeEdgePath()
HierarchicLayout.ALTERNATIVE_EDGE_PATH_DPKEY
,
setAlternativeEdgePath(ItemMapping)
public final ItemMapping<INode,YRectangle> getAlternativeGroupBounds()
HierarchicLayout.ALTERNATIVE_GROUP_BOUNDS_DPKEY
,
setAlternativeGroupBounds(ItemMapping)
public final ItemCollection<INode> getBfsLayererCoreNodes()
BFSLayerer
.
The BFSLayerer
is used when FromScratchLayeringStrategy
is set to LayeringStrategy.BFS
.
BFSLayerer.CORE_NODES_DPKEY
,
setBfsLayererCoreNodes(ItemCollection)
public final ItemMapping<IEdge,Integer> getConstraintIncrementalLayererAdditionalEdgeWeights()
ConstraintIncrementalLayerer
.
The Layerer tries to keep edges with higher weights short.
ConstraintIncrementalLayerer.ADDITIONAL_EDGE_WEIGHT_DPKEY
,
setConstraintIncrementalLayererAdditionalEdgeWeights(ItemMapping)
public final ItemMapping<IEdge,Integer> getCriticalEdgePriorities()
The layout tries to vertically align each node pair that is connected by a critical edge (integer value > 0).
HierarchicLayout.CRITICAL_EDGE_PRIORITY_DPKEY
,
setCriticalEdgePriorities(ItemMapping)
public final ItemMapping<IEdge,Double> getEdgeDirectedness()
Generally, the hierarchic layout algorithm assigns nodes to layers such that most of the edges point in the
main layout direction
.
The directedness of an edge specifies whether it should comply with this strategy. More precisely, a value of 1
means that the edge should fully comply, a value of -1
that it should comply inversely (the edge should point
against the main layout direction), and a value of 0
means that the direction doesn't matter at all and the
endpoints of the edges may be placed at the same layer. If there are conflicting preferences, edges with higher absolute
values are more likely to point in the desired direction.
HierarchicLayout.EDGE_DIRECTEDNESS_DPKEY
,
setEdgeDirectedness(ItemMapping)
public final ItemMapping<IEdge,EdgeLayoutDescriptor> getEdgeLayoutDescriptors()
EdgeLayoutDescriptor
.
If an edge is mapped to null
, the default descriptor
is
used.
HierarchicLayoutCore.EDGE_LAYOUT_DESCRIPTOR_DPKEY
,
setEdgeLayoutDescriptors(ItemMapping)
public final ItemMapping<IEdge,Double> getEdgeThickness()
The specified non-negative thickness is considered when calculating minimum distances so that there are no overlaps
between edges and other graph elements. By default, each edge has thickness 0
.
HierarchicLayout.EDGE_THICKNESS_DPKEY
,
setEdgeThickness(ItemMapping)
public final ItemCollection<INode> getFolderNodes()
HierarchicLayout.FOLDER_NODES_DPKEY
,
setFolderNodes(ItemCollection)
public final ItemMapping<INode,Integer> getGivenLayersLayererIds()
GivenLayersLayerer
.
The GivenLayersLayerer
is used when FromScratchLayeringStrategy
is set to LayeringStrategy.USER_DEFINED
.
GivenLayersLayerer.LAYER_ID_DPKEY
,
setGivenLayersLayererIds(ItemMapping)
public final IncrementalHintItemMapping getIncrementalHints()
HierarchicLayout.INCREMENTAL_HINTS_DPKEY
,
setIncrementalHints(IncrementalHintItemMapping)
public final ILayerConstraintFactory getLayerConstraintFactory()
HierarchicLayout.createLayerConstraintFactory(com.yworks.yfiles.algorithms.Graph)
,
ILayerConstraintFactory
,
setLayerConstraintFactory(ILayerConstraintFactory)
public final IMapper<INode,Integer> getLayerIndices()
If this property is set, the mapper is filled by the layout with the layer information.
HierarchicLayout.LAYER_INDEX_DPKEY
,
setLayerIndices(IMapper)
public final ItemMapping<INode,NodeHalo> getNodeHalos()
NodeHalo
.NodeHalo.NODE_HALO_DPKEY
,
setNodeHalos(ItemMapping)
public final ItemMapping<INode,NodeLayoutDescriptor> getNodeLayoutDescriptors()
NodeLayoutDescriptor
.
If a node is mapped to null
, the default descriptor
is used.
HierarchicLayoutCore.NODE_LAYOUT_DESCRIPTOR_DPKEY
,
setNodeLayoutDescriptors(ItemMapping)
public final ItemMapping<INode,PortCandidateSet> getNodePortCandidateSets()
PortCandidateSet
.PortCandidateSet.NODE_PORT_CANDIDATE_SET_DPKEY
,
setNodePortCandidateSets(ItemMapping)
public final PartitionGridData getPartitionGridData()
setPartitionGridData(PartitionGridData)
public final SelfLoopCalculatorData getSelfLoopCalculatorData()
SelfLoopCalculator
.setSelfLoopCalculatorData(SelfLoopCalculatorData)
public final ISequenceConstraintFactory getSequenceConstraintFactory()
HierarchicLayout.createSequenceConstraintFactory(com.yworks.yfiles.layout.LayoutGraph)
,
ISequenceConstraintFactory
,
setSequenceConstraintFactory(ISequenceConstraintFactory)
public final IMapper<INode,Integer> getSequenceIndices()
If this property is set, the mapper is filled by the layout with the sequence information.
HierarchicLayout.SEQUENCE_INDEX_DPKEY
,
setSequenceIndices(IMapper)
public final ItemMapping<IEdge,Object> getSourceGroupIds()
PortConstraintKeys.SOURCE_GROUP_ID_DPKEY
,
setSourceGroupIds(ItemMapping)
public final ItemMapping<IEdge,Collection<PortCandidate>> getSourcePortCandidates()
candidates
.PortCandidate.SOURCE_PORT_CANDIDATE_COLLECTION_DPKEY
,
setSourcePortCandidates(ItemMapping)
public final ItemMapping<IEdge,PortConstraint> getSourcePortConstraints()
PortConstraint
.PortConstraintKeys.SOURCE_PORT_CONSTRAINT_DPKEY
,
setSourcePortConstraints(ItemMapping)
public final ItemMapping<IEdge,Object> getSourcePortGroupIds()
PortConstraintKeys.SOURCE_PORT_GROUP_ID_DPKEY
,
setSourcePortGroupIds(ItemMapping)
public final ItemMapping<IEdge,Object> getTargetGroupIds()
PortConstraintKeys.TARGET_GROUP_ID_DPKEY
,
setTargetGroupIds(ItemMapping)
public final ItemMapping<IEdge,Collection<PortCandidate>> getTargetPortCandidates()
candidates
.PortCandidate.TARGET_PORT_CANDIDATE_COLLECTION_DPKEY
,
setTargetPortCandidates(ItemMapping)
public final ItemMapping<IEdge,PortConstraint> getTargetPortConstraints()
PortConstraint
.PortConstraintKeys.TARGET_PORT_CONSTRAINT_DPKEY
,
setTargetPortConstraints(ItemMapping)
public final ItemMapping<IEdge,Object> getTargetPortGroupIds()
PortConstraintKeys.TARGET_PORT_GROUP_ID_DPKEY
,
setTargetPortGroupIds(ItemMapping)
public final void setAbortHandler(AbortHandler value)
value
- The AbortHandler to set.AbortHandler.ABORT_HANDLER_DPKEY
,
getAbortHandler()
public final void setAlternativeEdgePath(ItemMapping<IEdge,YPointPath> value)
value
- The AlternativeEdgePath to set.HierarchicLayout.ALTERNATIVE_EDGE_PATH_DPKEY
,
getAlternativeEdgePath()
public final void setAlternativeGroupBounds(ItemMapping<INode,YRectangle> value)
value
- The AlternativeGroupBounds to set.HierarchicLayout.ALTERNATIVE_GROUP_BOUNDS_DPKEY
,
getAlternativeGroupBounds()
public final void setBfsLayererCoreNodes(ItemCollection<INode> value)
BFSLayerer
.
The BFSLayerer
is used when FromScratchLayeringStrategy
is set to LayeringStrategy.BFS
.
value
- The BfsLayererCoreNodes to set.BFSLayerer.CORE_NODES_DPKEY
,
getBfsLayererCoreNodes()
public final void setConstraintIncrementalLayererAdditionalEdgeWeights(ItemMapping<IEdge,Integer> value)
ConstraintIncrementalLayerer
.
The Layerer tries to keep edges with higher weights short.
value
- The ConstraintIncrementalLayererAdditionalEdgeWeights to set.ConstraintIncrementalLayerer.ADDITIONAL_EDGE_WEIGHT_DPKEY
,
getConstraintIncrementalLayererAdditionalEdgeWeights()
public final void setCriticalEdgePriorities(ItemMapping<IEdge,Integer> value)
The layout tries to vertically align each node pair that is connected by a critical edge (integer value > 0).
value
- The CriticalEdgePriorities to set.HierarchicLayout.CRITICAL_EDGE_PRIORITY_DPKEY
,
getCriticalEdgePriorities()
public final void setEdgeDirectedness(ItemMapping<IEdge,Double> value)
Generally, the hierarchic layout algorithm assigns nodes to layers such that most of the edges point in the
main layout direction
.
The directedness of an edge specifies whether it should comply with this strategy. More precisely, a value of 1
means that the edge should fully comply, a value of -1
that it should comply inversely (the edge should point
against the main layout direction), and a value of 0
means that the direction doesn't matter at all and the
endpoints of the edges may be placed at the same layer. If there are conflicting preferences, edges with higher absolute
values are more likely to point in the desired direction.
value
- The EdgeDirectedness to set.HierarchicLayout.EDGE_DIRECTEDNESS_DPKEY
,
getEdgeDirectedness()
public final void setEdgeLayoutDescriptors(ItemMapping<IEdge,EdgeLayoutDescriptor> value)
EdgeLayoutDescriptor
.
If an edge is mapped to null
, the default descriptor
is
used.
value
- The EdgeLayoutDescriptors to set.HierarchicLayoutCore.EDGE_LAYOUT_DESCRIPTOR_DPKEY
,
getEdgeLayoutDescriptors()
public final void setEdgeThickness(ItemMapping<IEdge,Double> value)
The specified non-negative thickness is considered when calculating minimum distances so that there are no overlaps
between edges and other graph elements. By default, each edge has thickness 0
.
value
- The EdgeThickness to set.HierarchicLayout.EDGE_THICKNESS_DPKEY
,
getEdgeThickness()
public final void setFolderNodes(ItemCollection<INode> value)
value
- The FolderNodes to set.HierarchicLayout.FOLDER_NODES_DPKEY
,
getFolderNodes()
public final void setGivenLayersLayererIds(ItemMapping<INode,Integer> value)
GivenLayersLayerer
.
The GivenLayersLayerer
is used when FromScratchLayeringStrategy
is set to LayeringStrategy.USER_DEFINED
.
value
- The GivenLayersLayererIds to set.GivenLayersLayerer.LAYER_ID_DPKEY
,
getGivenLayersLayererIds()
public final void setIncrementalHints(IncrementalHintItemMapping value)
value
- The IncrementalHints to set.HierarchicLayout.INCREMENTAL_HINTS_DPKEY
,
getIncrementalHints()
public final void setLayerConstraintFactory(ILayerConstraintFactory value)
value
- The LayerConstraintFactory to set.HierarchicLayout.createLayerConstraintFactory(com.yworks.yfiles.algorithms.Graph)
,
ILayerConstraintFactory
,
getLayerConstraintFactory()
public final void setLayerIndices(IMapper<INode,Integer> value)
If this property is set, the mapper is filled by the layout with the layer information.
value
- The LayerIndices to set.HierarchicLayout.LAYER_INDEX_DPKEY
,
getLayerIndices()
public final void setNodeHalos(ItemMapping<INode,NodeHalo> value)
NodeHalo
.value
- The NodeHalos to set.NodeHalo.NODE_HALO_DPKEY
,
getNodeHalos()
public final void setNodeLayoutDescriptors(ItemMapping<INode,NodeLayoutDescriptor> value)
NodeLayoutDescriptor
.
If a node is mapped to null
, the default descriptor
is used.
value
- The NodeLayoutDescriptors to set.HierarchicLayoutCore.NODE_LAYOUT_DESCRIPTOR_DPKEY
,
getNodeLayoutDescriptors()
public final void setNodePortCandidateSets(ItemMapping<INode,PortCandidateSet> value)
PortCandidateSet
.value
- The NodePortCandidateSets to set.PortCandidateSet.NODE_PORT_CANDIDATE_SET_DPKEY
,
getNodePortCandidateSets()
public final void setPartitionGridData(PartitionGridData value)
value
- The PartitionGridData to set.getPartitionGridData()
public final void setSelfLoopCalculatorData(SelfLoopCalculatorData value)
SelfLoopCalculator
.value
- The SelfLoopCalculatorData to set.getSelfLoopCalculatorData()
public final void setSequenceConstraintFactory(ISequenceConstraintFactory value)
value
- The SequenceConstraintFactory to set.HierarchicLayout.createSequenceConstraintFactory(com.yworks.yfiles.layout.LayoutGraph)
,
ISequenceConstraintFactory
,
getSequenceConstraintFactory()
public final void setSequenceIndices(IMapper<INode,Integer> value)
If this property is set, the mapper is filled by the layout with the sequence information.
value
- The SequenceIndices to set.HierarchicLayout.SEQUENCE_INDEX_DPKEY
,
getSequenceIndices()
public final void setSourceGroupIds(ItemMapping<IEdge,Object> value)
value
- The SourceGroupIds to set.PortConstraintKeys.SOURCE_GROUP_ID_DPKEY
,
getSourceGroupIds()
public final void setSourcePortCandidates(ItemMapping<IEdge,Collection<PortCandidate>> value)
candidates
.value
- The SourcePortCandidates to set.PortCandidate.SOURCE_PORT_CANDIDATE_COLLECTION_DPKEY
,
getSourcePortCandidates()
public final void setSourcePortConstraints(ItemMapping<IEdge,PortConstraint> value)
PortConstraint
.value
- The SourcePortConstraints to set.PortConstraintKeys.SOURCE_PORT_CONSTRAINT_DPKEY
,
getSourcePortConstraints()
public final void setSourcePortGroupIds(ItemMapping<IEdge,Object> value)
value
- The SourcePortGroupIds to set.PortConstraintKeys.SOURCE_PORT_GROUP_ID_DPKEY
,
getSourcePortGroupIds()
public final void setTargetGroupIds(ItemMapping<IEdge,Object> value)
value
- The TargetGroupIds to set.PortConstraintKeys.TARGET_GROUP_ID_DPKEY
,
getTargetGroupIds()
public final void setTargetPortCandidates(ItemMapping<IEdge,Collection<PortCandidate>> value)
candidates
.value
- The TargetPortCandidates to set.PortCandidate.TARGET_PORT_CANDIDATE_COLLECTION_DPKEY
,
getTargetPortCandidates()
public final void setTargetPortConstraints(ItemMapping<IEdge,PortConstraint> value)
PortConstraint
.value
- The TargetPortConstraints to set.PortConstraintKeys.TARGET_PORT_CONSTRAINT_DPKEY
,
getTargetPortConstraints()
public final void setTargetPortGroupIds(ItemMapping<IEdge,Object> value)
value
- The TargetPortGroupIds to set.PortConstraintKeys.TARGET_PORT_GROUP_ID_DPKEY
,
getTargetPortGroupIds()