|
Search this API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object y.layout.NodeHalo
public final class NodeHalo
A NodeHalo
specifies a rectangular area around a specific node. A layout algorithm
that
supports NodeHalo
s, 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 NodeHalo
s for all nodes of the
input graph. NodeHalo
-aware layout algorithms like IncrementalHierarchicLayouter
look for DataProvider
s registered with this key to retrieve NodeHalo
information.
The following layouters support NodeHalo
s with different restrictions:
IncrementalHierarchicLayouter
OrthogonalLayouter
CompactOrthogonalLayouter
OrthogonalGroupLayouter
DirectedOrthogonalLayouter
GenericTreeLayouter
TreeLayouter
TabularLayouter
SmartOrganicLayouter
SmartOrganicLayouter.SCOPE_SUBSET
,
SmartOrganicLayouter.SCOPE_MAINLY_SUBSET
or
SmartOrganicLayouter.SCOPE_MAINLY_SUBSET_GEOMETRIC
, there might be some
overlapping nodes and NodeHalo
sNodeHalo
s may also overlapNodeHalo
sMISLabelingAlgorithm
NodeHalo
sEdgeRouter
PortConstraint
s) with higher costs may cause edges to cross NodeHalo
sCircularLayouter
NodeHalo
overlaps may occur if the internal BalloonLayouter
allows overlaps
NodeHalo
sBalloonLayouter
NodeHalo
overlaps may occur, if
BalloonLayouter.setAllowOverlaps(boolean)
is enabledNodeHalo
sSelfLoopLayouter
NodeHalo
sRadialLayouter
NodeHalo
sRecursiveGroupLayouter
ComponentLayouter
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_INFINITY
public 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_INFINITY
public 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
otherwisepublic 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 NodeHalo
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
|
© Copyright 2000-2022, yWorks GmbH. All rights reserved. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |