Package | com.yworks.yfiles.layout |
Class | public class NodeHalo |
Inheritance | NodeHalo YObject Object |
NodeHalo
object specifies a rectangular area around a specific node.
A layouter that supports node halos, 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. minimal first segment length, will be extended by the halo size. This class defines a key used to associate a com.yworks.yfiles.base.DataProvider that provide node halos for all nodes of the input graph. Node halo aware layout algorithms like com.yworks.yfiles.layout.hierarchic.IncrementalHierarchicLayouter look for data providers named by this key to retrieve halo information.
The following layouters support NodeHalo
s with different restrictions:
See also
Property | Defined By | ||
---|---|---|---|
bottom : Number
The halo size at the bottom side of the node. | NodeHalo | ||
left : Number
The halo size at the left side of the node. | NodeHalo | ||
right : Number
The halo size at the right side of the node. | NodeHalo | ||
top : Number
The halo size at the top side of the node. | NodeHalo | ||
ZERO_HALO : NodeHalo [static] [read-only]
A constant holding a NodeHalo with zero size on each side. | NodeHalo |
Method | Defined By | ||
---|---|---|---|
NodeHalo(init:Boolean = true) | NodeHalo | ||
[static]
Creates a NodeHalo object with the specified value on each side of the node. | NodeHalo | ||
createFromTLBR(top:Number, left:Number, bottom:Number, right:Number):NodeHalo [static]
Creates a NodeHalo object with the specified values. | NodeHalo | ||
equals(o:Object):Boolean [override] | NodeHalo | ||
getClass():Class [override] | NodeHalo | ||
[static]
Returns the NodeHalo of the given node if available, otherwise a NodeHalo with zero size. | NodeHalo | ||
[static]
Returns a com.yworks.yfiles.geom.YRectangle instance with the bounds of the given node and if available its NodeHalo. | NodeHalo | ||
hasHalos(graph:LayoutGraph):Boolean [static]
Checks whether a com.yworks.yfiles.base.DataProvider has been registered at the given graph, that holds NodeHalo instances. | NodeHalo | ||
hashCode():int [override] | NodeHalo |
Constant | Defined By | ||
---|---|---|---|
NODE_HALO_DPKEY : Object = y.layout.NodeHalo.NODE_HALO_DPKEY [static]
com.yworks.yfiles.base.DataProvider key that can be used to store com.yworks.yfiles.layout.NodeHalo -instances for the nodes that specify the sizes of the nodes' halos. | NodeHalo |
bottom | property |
public var bottom:Number
The halo size at the bottom side of the node.
left | property |
public var left:Number
The halo size at the left side of the node.
right | property |
public var right:Number
The halo size at the right side of the node.
top | property |
public var top:Number
The halo size at the top side of the node.
ZERO_HALO | property |
ZERO_HALO:NodeHalo
[read-only]
A constant holding a NodeHalo
with zero size on each side.
public static function get ZERO_HALO():NodeHalo
NodeHalo | () | Constructor |
public function NodeHalo(init:Boolean = true)
init:Boolean (default = true )
|
create | () | method |
public static function create(value:Number):NodeHalo
Creates a NodeHalo
object with the specified value on each side of the node.
The value must not be negative, Number.NaN or Number.POSITIVE_INFINITY, otherwise the method will throw an IllegalArgumentException
.
Parameters
value:Number — The halo size at each side of the node.
|
NodeHalo |
IllegalArgumentException — if the value is negative, Number.NaN or Number.POSITIVE_INFINITY
|
See also
createFromTLBR | () | method |
public static function createFromTLBR(top:Number, left:Number, bottom:Number, right:Number):NodeHalo
Creates a NodeHalo
object with the specified values.
The values must not be negative, Number.NaN or Number.POSITIVE_INFINITY, otherwise the method will throw an IllegalArgumentException
.
Parameters
top:Number — The halo size at the top side of the node.
| |
left:Number — The halo size at the left side of the node.
| |
bottom:Number — The halo size at the bottom side of the node.
| |
right:Number — The halo size at the right side of the node.
|
NodeHalo |
IllegalArgumentException — if one of the values is negative, Number.NaN or Number.POSITIVE_INFINITY
|
See also
equals | () | method |
override public function equals(o:Object):Boolean
Parameters
o:Object |
Boolean |
getClass | () | method |
override public function getClass():Class
ReturnsClass |
getHalo | () | method |
public static function getHalo(graph:LayoutGraph, node:Node):NodeHalo
Returns the NodeHalo
of the given node if available, otherwise a NodeHalo
with zero size.
Parameters
graph:LayoutGraph — The graph containing the given node.
| |
node:Node — The node whose NodeHalo will be determined.
|
NodeHalo — the NodeHalo of the given node if available, otherwise a NodeHalo with zero size.
|
getHaloBox | () | method |
public static function getHaloBox(graph:LayoutGraph, node:Node):YRectangle
Returns a com.yworks.yfiles.geom.YRectangle instance with the bounds of the given node and if available its NodeHalo
.
Parameters
graph:LayoutGraph — The graph containing the given node.
| |
node:Node — The node whose NodeHalo will be determined.
|
YRectangle — a com.yworks.yfiles.geom.YRectangle instance with the bounds of the given node and if available its NodeHalo
|
See also
hasHalos | () | method |
public static function hasHalos(graph:LayoutGraph):Boolean
Checks whether a com.yworks.yfiles.base.DataProvider has been registered at the given graph, that holds NodeHalo
instances.
Parameters
graph:LayoutGraph — The graph to check.
|
Boolean — true if a com.yworks.yfiles.base.DataProvider has been registered at the given graph, that holds NodeHalo instances, false otherwise.
|
See also
hashCode | () | method |
override public function hashCode():int
Returnsint |
NODE_HALO_DPKEY | Constant |
public static const NODE_HALO_DPKEY:Object = y.layout.NodeHalo.NODE_HALO_DPKEY
com.yworks.yfiles.base.DataProvider key that can be used to store com.yworks.yfiles.layout.NodeHalo -instances for the nodes that specify the sizes of the nodes' halos.
See also