public class EdgeBundleDescriptor extends Object
EdgeBundleDescriptor
defines the bundling
settings of an edge.
The defined settings will be considered by layout algorithms
which support edge bundling.
Each EdgeBundleDescriptor
can either be specified for a single edge or shared by several edges. It is assigned
to an edge by registering a IDataProvider
with key EdgeBundling.EDGE_BUNDLE_DESCRIPTOR_DPKEY
to the input graph.
Constructor and Description |
---|
EdgeBundleDescriptor()
Creates a new
EdgeBundleDescriptor with default settings. |
EdgeBundleDescriptor(EdgeBundleDescriptor descriptor)
Creates a new
EdgeBundleDescriptor representing a copy of the given other descriptor instance. |
Modifier and Type | Method and Description |
---|---|
boolean |
isBezierFittingEnabled()
Gets whether or not a bezier curve should be fit to an edge associated to this descriptor.
|
boolean |
isBundled()
Gets whether or not an edge associated to this descriptor should be bundled.
|
boolean |
isDirectionConsiderationEnabled()
Gets whether or not the direction of the edge associated to this descriptor should be considered.
|
void |
setBezierFittingEnabled(boolean value)
Sets whether or not a bezier curve should be fit to an edge associated to this descriptor.
|
void |
setBundled(boolean value)
Sets whether or not an edge associated to this descriptor should be bundled.
|
void |
setDirectionConsiderationEnabled(boolean value)
Sets whether or not the direction of the edge associated to this descriptor should be considered.
|
public EdgeBundleDescriptor()
EdgeBundleDescriptor
with default settings.public EdgeBundleDescriptor(EdgeBundleDescriptor descriptor)
EdgeBundleDescriptor
representing a copy of the given other descriptor instance.descriptor
- the descriptor to copypublic boolean isBezierFittingEnabled()
If disabled, the edges resemble B-splines where points of the path are actually curve points. Therefore, this representation requires a high number of bends to model curves.
If this feature is enabled, a bezier curve is fitted to the start and end point as well as the intermediate control points of the edge. After the fitting, the points of the edge can be interpreted as cubic bezier control points. Each four consecutive points form a bezier curve, where the first and last of the four points represent the start and end of the curve and the second and third point are the control points defining how the curve looks. The second and third point do not necessarily lie on the actual curve.
false
. Edges resemble B-splinestrue
if a bezier curve is fitted to an edge associated with this descriptor, false
otherwisesetBezierFittingEnabled(boolean)
public boolean isBundled()
false
. Bundling is disabled.true
if an edge associated to this descriptor is bundled, false
otherwisesetBundled(boolean)
public boolean isDirectionConsiderationEnabled()
During the bundling procedure, the edges are bundled based on their direction such that the incoming edges of a node are bundled separately from its outgoing edges. If the direction of edges adjacent to a node is not considered, then they are not bundled separately.
If the direction of some edges is taken into consideration while the direction of some others (adjacent to the same node) is ignored, the undirected edges are also bundled separately. This is done to distinguished them from the incoming and outgoing edges of the particular node.
true
. The direction of the edge is considered.true
if the direction of the edge is considered, false
otherwisesetDirectionConsiderationEnabled(boolean)
public void setBezierFittingEnabled(boolean value)
If disabled, the edges resemble B-splines where points of the path are actually curve points. Therefore, this representation requires a high number of bends to model curves.
If this feature is enabled, a bezier curve is fitted to the start and end point as well as the intermediate control points of the edge. After the fitting, the points of the edge can be interpreted as cubic bezier control points. Each four consecutive points form a bezier curve, where the first and last of the four points represent the start and end of the curve and the second and third point are the control points defining how the curve looks. The second and third point do not necessarily lie on the actual curve.
false
. Edges resemble B-splinesvalue
- true
if a bezier curve is fitted to an edge associated with this descriptor, false
otherwiseisBezierFittingEnabled()
public void setBundled(boolean value)
false
. Bundling is disabled.value
- true
if an edge associated to this descriptor is bundled, false
otherwiseisBundled()
public void setDirectionConsiderationEnabled(boolean value)
During the bundling procedure, the edges are bundled based on their direction such that the incoming edges of a node are bundled separately from its outgoing edges. If the direction of edges adjacent to a node is not considered, then they are not bundled separately.
If the direction of some edges is taken into consideration while the direction of some others (adjacent to the same node) is ignored, the undirected edges are also bundled separately. This is done to distinguished them from the incoming and outgoing edges of the particular node.
true
. The direction of the edge is considered.value
- true
if the direction of the edge is considered, false
otherwiseisDirectionConsiderationEnabled()