Packagecom.yworks.yfiles.layout
Classpublic class NodeLabelCandidate
InheritanceNodeLabelCandidate Inheritance LabelCandidate Inheritance YObject Inheritance Object
Subclasses ExtendedNodeLabelCandidate

This class represents a candidate position for label associated to a node in a graph.



Public Properties
 PropertyDefined By
 InheritedboundingBox : YRectangle
[read-only] Returns the bounding box of this label candidate.
LabelCandidate
 Inheritedbox : YOrientedRectangle
[read-only] Returns the real bounds of this label candidate.
LabelCandidate
 InheritedcustomProfit : Number
Specifies the custom profit for this label candidate.
LabelCandidate
 InheritededgeOverlapPenalty : Number
Specifies the penalty value for a candidate position that overlaps the path of an edge.
LabelCandidate
 Inheritedheight : Number
[read-only] Returns the height of the label candidate bounds.
LabelCandidate
 Inheritedinternal2 : Boolean
[read-only] Returns whether this candidate is an internal node label, i.e.
LabelCandidate
 Inheritedlocation : YPoint
[read-only] Returns the upper left corner of the label candidate bounds.
LabelCandidate
 InheritedmodelParameter : Object
[read-only] Returns the model parameter that was used by the underlying model to generate this label candidate.
LabelCandidate
 InheritednodeOverlapPenalty : Number
Specifies the penalty for a candidate position that overlaps the bounds of a node.
LabelCandidate
 InheritedoverlapPenalty : Number
[read-only] Returns the sum of node overlap penalty and edge overlap penalty.
LabelCandidate
 Inheritedowner : LabelLayout
[read-only] Returns the LabelLayout to which this candidate box belongs.
LabelCandidate
 Inheritedparameter : Object
[read-only] Returns the model parameter that was used by the underlying model to generate this label candidate.
LabelCandidate
 Inheritedpropagated : Boolean
[read-only] Returns if this box had been chosen by the labeling algorithm.
LabelCandidate
 Inheritedsize : YDimension
[read-only] Returns the width and height of the label candidate bounds.
LabelCandidate
 Inheritedwidth : Number
[read-only] Returns the width of the label candidate bounds.
LabelCandidate
 Inheritedx : Number
[read-only] Returns the minimal x-coordinate of the label candidate bounds.
LabelCandidate
 Inheritedy : Number
[read-only] Returns the minimal y-coordinate of the label candidate bounds.
LabelCandidate
Public Methods
 MethodDefined By
  
NodeLabelCandidate(orientedBox:YOrientedRectangle, param:Object, owner:NodeLabelLayout, _internal:Boolean, init:Boolean = true)
Returns a new instance of NodeLabelCandidate.
NodeLabelCandidate
 Inherited
equals(o:Object):Boolean
YObject
  
getClass():Class
[override]
NodeLabelCandidate
 Inherited
hashCode():int
YObject
 Inherited
[static] Returns a new instance of LabelCandidate.
LabelCandidate
 Inherited
newLabelCandidate2(labelBox:YOrientedRectangle, param:Object, owner:LabelLayout, _internal:Boolean):LabelCandidate
[static] Returns a new instance of LabelCandidate.
LabelCandidate
 Inherited
[static] Returns a new instance of LabelCandidate.
LabelCandidate
 Inherited
newLabelCandidate4(pos:YPoint, size:YDimension, param:Object, owner:LabelLayout, _internal:Boolean):LabelCandidate
[static] Returns a new instance of LabelCandidate.
LabelCandidate
  
newNodeLabelCandidate1(orientedBox:YOrientedRectangle, param:Object, owner:NodeLabelLayout, _internal:Boolean):NodeLabelCandidate
[static] Returns a new instance of NodeLabelCandidate.
NodeLabelCandidate
  
[static] Returns a new instance of NodeLabelCandidate.
NodeLabelCandidate
  
newNodeLabelCandidate3(pos:YPoint, size:YDimension, param:Object, owner:NodeLabelLayout, _internal:Boolean):NodeLabelCandidate
[static] Returns a new instance of NodeLabelCandidate.
NodeLabelCandidate
 Inherited
propagate():void
Sets the model parameters of the owner of this label candidate to the model parameters of this candidate box.
LabelCandidate
 Inherited
toString():String
LabelCandidate
Protected Methods
 MethodDefined By
 Inherited
initLabelCandidate1(labelBox:YOrientedRectangle, param:Object, owner:LabelLayout):void
Initializes this object.
LabelCandidate
 Inherited
initLabelCandidate2(labelBox:YOrientedRectangle, param:Object, owner:LabelLayout, _internal:Boolean):void
Initializes this object.
LabelCandidate
 Inherited
initLabelCandidate3(pos:YPoint, size:YDimension, param:Object, owner:LabelLayout):void
Initializes this object.
LabelCandidate
 Inherited
initLabelCandidate4(pos:YPoint, size:YDimension, param:Object, owner:LabelLayout, _internal:Boolean):void
Initializes this object.
LabelCandidate
  
initNodeLabelCandidate1(orientedBox:YOrientedRectangle, param:Object, owner:NodeLabelLayout, _internal:Boolean):void
Initializes this object.
NodeLabelCandidate
  
initNodeLabelCandidate2(pos:YPoint, size:YDimension, param:Object, owner:NodeLabelLayout):void
Initializes this object.
NodeLabelCandidate
  
initNodeLabelCandidate3(pos:YPoint, size:YDimension, param:Object, owner:NodeLabelLayout, _internal:Boolean):void
Initializes this object.
NodeLabelCandidate
Constructor Detail
NodeLabelCandidate()Constructor
public function NodeLabelCandidate(orientedBox:YOrientedRectangle, param:Object, owner:NodeLabelLayout, _internal:Boolean, init:Boolean = true)

Returns a new instance of NodeLabelCandidate.

Parameters
orientedBox:YOrientedRectangle — the box that specifies the candidate's size and position.
 
param:Object — the parameters of the labeling model associated with this candidate.
 
owner:NodeLabelLayout — the label associated to the candidate.
 
_internal:Boolean — flag whether the candidate is inside the node, or outside.
 
init:Boolean (default = true) — An internally used switch to help handle proper instance initialization in inheritance chains where classes can have multiple constructor-like factory methods. This parameter can safely be ignored/omitted when calling the constructor.
Method Detail
getClass()method
override public function getClass():Class

Returns
Class
initNodeLabelCandidate1()method 
protected final function initNodeLabelCandidate1(orientedBox:YOrientedRectangle, param:Object, owner:NodeLabelLayout, _internal:Boolean):void

Initializes this object. See the documentation of the corresponding factory method newNodeLabelCandidate1() for details.

Parameters

orientedBox:YOrientedRectangle
 
param:Object
 
owner:NodeLabelLayout
 
_internal:Boolean

See also

initNodeLabelCandidate2()method 
protected final function initNodeLabelCandidate2(pos:YPoint, size:YDimension, param:Object, owner:NodeLabelLayout):void

Initializes this object. See the documentation of the corresponding factory method newNodeLabelCandidate2() for details.

Parameters

pos:YPoint
 
size:YDimension
 
param:Object
 
owner:NodeLabelLayout

See also

initNodeLabelCandidate3()method 
protected final function initNodeLabelCandidate3(pos:YPoint, size:YDimension, param:Object, owner:NodeLabelLayout, _internal:Boolean):void

Initializes this object. See the documentation of the corresponding factory method newNodeLabelCandidate3() for details.

Parameters

pos:YPoint
 
size:YDimension
 
param:Object
 
owner:NodeLabelLayout
 
_internal:Boolean

See also

newNodeLabelCandidate1()method 
public static function newNodeLabelCandidate1(orientedBox:YOrientedRectangle, param:Object, owner:NodeLabelLayout, _internal:Boolean):NodeLabelCandidate

Returns a new instance of NodeLabelCandidate.

Parameters

orientedBox:YOrientedRectangle — the box that specifies the candidate's size and position.
 
param:Object — the parameters of the labeling model associated with this candidate.
 
owner:NodeLabelLayout — the label associated to the candidate.
 
_internal:Boolean — flag whether the candidate is inside the node, or outside.

Returns
NodeLabelCandidate
newNodeLabelCandidate2()method 
public static function newNodeLabelCandidate2(pos:YPoint, size:YDimension, param:Object, owner:NodeLabelLayout):NodeLabelCandidate

Returns a new instance of NodeLabelCandidate.

Parameters

pos:YPoint — the location of the upper left corner of the candidate.
 
size:YDimension — the size of the candidate.
 
param:Object — the parameters of the labeling model associated with this candidate.
 
owner:NodeLabelLayout — the label associated to the candidate.

Returns
NodeLabelCandidate
newNodeLabelCandidate3()method 
public static function newNodeLabelCandidate3(pos:YPoint, size:YDimension, param:Object, owner:NodeLabelLayout, _internal:Boolean):NodeLabelCandidate

Returns a new instance of NodeLabelCandidate.

Parameters

pos:YPoint — the location of the upper left corner of the candidate.
 
size:YDimension — the size of the candidate.
 
param:Object — the parameters of the labeling model associated with this candidate.
 
owner:NodeLabelLayout — the label associated to the candidate.
 
_internal:Boolean — flag whether the candidate is inside the node, or outside.

Returns
NodeLabelCandidate