public class MultiParentDescriptor extends Object
MultiParentDescriptor
provides style information for multi-parent structures.
This class is used by TreeLayout
to determine the desired layout of nodes that constitute a multi-parent
structure. All nodes of such a structure are placed side by side and the incident edges are routed over common points
for incoming edges and for outgoing edges.
A tree graph containing multi-parent structures
TreeLayout.MULTI_PARENT_DESCRIPTOR_DPKEY
Constructor and Description |
---|
MultiParentDescriptor()
Creates a new
MultiParentDescriptor instance with default settings. |
Modifier and Type | Method and Description |
---|---|
MultiParentRoutingStyle |
getEdgeStyle()
Gets the routing style for edges that connect to nodes which constitute a multi-parent structure.
|
double |
getMinimumBusDistance()
Gets the minimum distance between the nodes of a multi-parent structure and the bus connecting these nodes.
|
double |
getMinimumNodeDistance()
Gets the minimum distance between two nodes belonging to the same multi-parent structure.
|
double |
getVerticalAlignment()
Gets the relative vertical alignment of nodes belonging to the same multi-parent structure.
|
void |
setEdgeStyle(MultiParentRoutingStyle value)
Sets the routing style for edges that connect to nodes which constitute a multi-parent structure.
|
void |
setMinimumBusDistance(double value)
Sets the minimum distance between the nodes of a multi-parent structure and the bus connecting these nodes.
|
void |
setMinimumNodeDistance(double value)
Sets the minimum distance between two nodes belonging to the same multi-parent structure.
|
void |
setVerticalAlignment(double value)
Sets the relative vertical alignment of nodes belonging to the same multi-parent structure.
|
public MultiParentDescriptor()
MultiParentDescriptor
instance with default settings.public MultiParentRoutingStyle getEdgeStyle()
IllegalArgumentException
- if the given routing style is unknownMultiParentRoutingStyle.ORTHOGONAL
setEdgeStyle(MultiParentRoutingStyle)
public double getMinimumBusDistance()
In case the edge style is not orthogonal, the bus only consists of a common point.
The minimum distance needs to be non-negative.
IllegalArgumentException
- if the given bus distance is negativesetMinimumBusDistance(double)
public double getMinimumNodeDistance()
The distance needs to be non-negative.
IllegalArgumentException
- if the given node distance is negativesetMinimumNodeDistance(double)
public double getVerticalAlignment()
A value of 0
means that nodes are top-aligned; a value of 1
means that nodes are bottom-aligned; a value
of 0.5
means that nodes are center-aligned.
Values outside the interval [0,1]
will result in a compact node placement with unaligned nodes, especially when
labels are considered.
setVerticalAlignment(double)
public void setEdgeStyle(MultiParentRoutingStyle value)
IllegalArgumentException
- if the given routing style is unknownMultiParentRoutingStyle.ORTHOGONAL
value
- one of the predefined routing stylesgetEdgeStyle()
public void setMinimumBusDistance(double value)
In case the edge style is not orthogonal, the bus only consists of a common point.
The minimum distance needs to be non-negative.
IllegalArgumentException
- if the given bus distance is negativevalue
- the minimum bus distancegetMinimumBusDistance()
public void setMinimumNodeDistance(double value)
The distance needs to be non-negative.
IllegalArgumentException
- if the given node distance is negativevalue
- the minimum distance between nodesgetMinimumNodeDistance()
public void setVerticalAlignment(double value)
A value of 0
means that nodes are top-aligned; a value of 1
means that nodes are bottom-aligned; a value
of 0.5
means that nodes are center-aligned.
Values outside the interval [0,1]
will result in a compact node placement with unaligned nodes, especially when
labels are considered.
value
- the relative vertical alignment of multi-parent nodesgetVerticalAlignment()