|
Search this API | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objecty.layout.NodeHalo
public final class NodeHalo
A NodeHalo specifies a rectangular area around a specific node. A layout algorithm that
supports NodeHalos, keeps this area clear of graph elements, except the node labels of this specific node and the adjacent
segments of its edges. All minimum distances to this node, which are used in the
layout calculation, e.g., minimum first segment length, will be extended by the halo size.
This class defines a key used for registering a DataProvider that provides NodeHalos for all nodes of the
input graph. NodeHalo-aware layout algorithms like IncrementalHierarchicLayouter
look for DataProviders registered with this key to retrieve NodeHalo information.
The following layouters support NodeHalos with different restrictions:
IncrementalHierarchicLayouterOrthogonalLayouterCompactOrthogonalLayouterOrthogonalGroupLayouterDirectedOrthogonalLayouterGenericTreeLayouterTreeLayouterTabularLayouterSmartOrganicLayouter
SmartOrganicLayouter.SCOPE_SUBSET,
SmartOrganicLayouter.SCOPE_MAINLY_SUBSET or
SmartOrganicLayouter.SCOPE_MAINLY_SUBSET_GEOMETRIC, there might be some
overlapping nodes and NodeHalosNodeHalos may also overlapNodeHalosMISLabelingAlgorithm
NodeHalosEdgeRouter
PortConstraints) with higher costs may cause edges to cross NodeHalosCircularLayouter
NodeHalo overlaps may occur if the internal BalloonLayouter
allows overlapsNodeHalosBalloonLayouter
NodeHalo overlaps may occur, if
BalloonLayouter.setAllowOverlaps(boolean) is enabledNodeHalosSelfLoopLayouter
NodeHalosRadialLayouter
NodeHalosRecursiveGroupLayouterComponentLayouter
![]() |
![]() |
| Field Summary | |
|---|---|
double |
bottom
The NodeHalo size at the bottom side of the node. |
double |
left
The NodeHalo size at the left side of the node. |
static java.lang.Object |
NODE_HALO_DPKEY
A DataProvider key for assigning halos for the nodes
|
double |
right
The NodeHalo size at the right side of the node. |
double |
top
The NodeHalo size at the top side of the node. |
static NodeHalo |
ZERO_HALO
A constant holding a NodeHalo with zero size on each side. |
| Method Summary | |
|---|---|
static NodeHalo |
create(double value)
Creates a NodeHalo object with the specified value on each side of the node. |
static NodeHalo |
create(double top,
double left,
double bottom,
double right)
Creates a NodeHalo with the specified values. |
boolean |
equals(java.lang.Object o)
|
static NodeHalo |
getHalo(LayoutGraph graph,
Node node)
Returns the NodeHalo associated with the given node. |
static YRectangle |
getHaloBox(LayoutGraph graph,
Node node)
Returns a YRectangle instance with the bounds of the given node including its NodeHalo. |
static boolean |
hasHalos(LayoutGraph graph)
Checks whether or not the given graph contains NodeHalo information. |
int |
hashCode()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.Object NODE_HALO_DPKEY
DataProvider key for assigning halos for the nodes
public static final NodeHalo ZERO_HALO
NodeHalo with zero size on each side.
public final double top
NodeHalo size at the top side of the node.
public final double left
NodeHalo size at the left side of the node.
public final double bottom
NodeHalo size at the bottom side of the node.
public final double right
NodeHalo size at the right side of the node.
| Method Detail |
|---|
public static NodeHalo create(double top,
double left,
double bottom,
double right)
NodeHalo with the specified values.
The values must not be negative, Double.NaN or Double.POSITIVE_INFINITY.
top - the NodeHalo size at the top side of the nodeleft - the NodeHalo size at the left side of the nodebottom - the NodeHalo size at the bottom side of the noderight - the NodeHalo size at the right side of the node
NodeHalo
java.lang.IllegalArgumentException - if one of the values is negative, Double.NaN or Double.POSITIVE_INFINITYpublic static NodeHalo create(double value)
NodeHalo object with the specified value on each side of the node.
The value must not be negative, Double.NaN or Double.POSITIVE_INFINITY.
value - the halo size at each side of the node
NodeHalo
java.lang.IllegalArgumentException - if the value is negative, Double.NaN or Double.POSITIVE_INFINITYpublic static boolean hasHalos(LayoutGraph graph)
NodeHalo information.
This method looks for a DataProvider that has been registered with the given graph using
NODE_HALO_DPKEY.
graph - the input graph
true if a DataProvider has been registered with the according key,
false otherwise
public static NodeHalo getHalo(LayoutGraph graph,
Node node)
NodeHalo associated with the given node.
If no such NodeHalo is available, this method returns a ZERO_HALO.
graph - the graph containing the given nodenode - the node whose NodeHalo will be determined
NodeHalo of the given node if available, otherwise a ZERO_HALO
public static YRectangle getHaloBox(LayoutGraph graph,
Node node)
YRectangle instance with the bounds of the given node including its NodeHalo.
This YRectangle is located at the position of the node.
If the node does not have a NodeHalo assigned, this box has the same size as the node.
graph - the graph containing the given nodenode - the node whose NodeHalo will be determined
YRectangle instance with the bounds of the given node including its NodeHalopublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Object
|
© Copyright 2000-2025, yWorks GmbH. All rights reserved. |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||