Package | com.yworks.yfiles.layout |
Class | public class LabelCandidate |
Inheritance | LabelCandidate YObject Object |
Implements | PlaneObject |
Subclasses | EdgeLabelCandidate, NodeLabelCandidate |
Property | Defined By | ||
---|---|---|---|
boundingBox : YRectangle [read-only]
Returns the bounding box of this label candidate. | LabelCandidate | ||
box : YOrientedRectangle [read-only]
Returns the real bounds of this label candidate. | LabelCandidate | ||
customProfit : Number
Specifies the custom profit for this label candidate. | LabelCandidate | ||
edgeOverlapPenalty : Number
Specifies the penalty value for a candidate position that overlaps the path of an edge. | LabelCandidate | ||
height : Number [read-only]
Returns the height of the label candidate bounds. | LabelCandidate | ||
internal2 : Boolean [read-only]
Returns whether this candidate is an internal node label, i.e. | LabelCandidate | ||
location : YPoint [read-only]
Returns the upper left corner of the label candidate bounds. | LabelCandidate | ||
modelParameter : Object [read-only]
Returns the model parameter that was used by the underlying model to generate this label candidate. | LabelCandidate | ||
nodeOverlapPenalty : Number
Specifies the penalty for a candidate position that overlaps the bounds of a node. | LabelCandidate | ||
overlapPenalty : Number [read-only]
Returns the sum of node overlap penalty and edge overlap penalty. | LabelCandidate | ||
owner : LabelLayout [read-only]
Returns the LabelLayout to which this candidate box belongs. | LabelCandidate | ||
parameter : Object [read-only]
Returns the model parameter that was used by the underlying model to generate this label candidate. | LabelCandidate | ||
propagated : Boolean [read-only]
Returns if this box had been chosen by the labeling algorithm. | LabelCandidate | ||
size : YDimension [read-only]
Returns the width and height of the label candidate bounds. | LabelCandidate | ||
width : Number [read-only]
Returns the width of the label candidate bounds. | LabelCandidate | ||
x : Number [read-only]
Returns the minimal x-coordinate of the label candidate bounds. | LabelCandidate | ||
y : Number [read-only]
Returns the minimal y-coordinate of the label candidate bounds. | LabelCandidate |
Method | Defined By | ||
---|---|---|---|
Returns a new instance of LabelCandidate. | LabelCandidate | ||
equals(o:Object):Boolean | YObject | ||
getClass():Class [override] | LabelCandidate | ||
hashCode():int | YObject | ||
[static]
Returns a new instance of LabelCandidate. | LabelCandidate | ||
newLabelCandidate2(labelBox:YOrientedRectangle, param:Object, owner:LabelLayout, _internal:Boolean):LabelCandidate [static]
Returns a new instance of LabelCandidate. | LabelCandidate | ||
[static]
Returns a new instance of LabelCandidate. | LabelCandidate | ||
newLabelCandidate4(pos:YPoint, size:YDimension, param:Object, owner:LabelLayout, _internal:Boolean):LabelCandidate [static]
Returns a new instance of LabelCandidate. | LabelCandidate | ||
propagate():void
Sets the model parameters of the owner of this label candidate to the model parameters of this candidate box. | LabelCandidate | ||
toString():String | LabelCandidate |
Method | Defined By | ||
---|---|---|---|
Initializes this object. | LabelCandidate | ||
initLabelCandidate2(labelBox:YOrientedRectangle, param:Object, owner:LabelLayout, _internal:Boolean):void
Initializes this object. | LabelCandidate | ||
Initializes this object. | LabelCandidate | ||
initLabelCandidate4(pos:YPoint, size:YDimension, param:Object, owner:LabelLayout, _internal:Boolean):void
Initializes this object. | LabelCandidate |
boundingBox | property |
boundingBox:YRectangle
[read-only] Returns the bounding box of this label candidate.
public function get boundingBox():YRectangle
box | property |
box:YOrientedRectangle
[read-only] Returns the real bounds of this label candidate.
public function get box():YOrientedRectangle
customProfit | property |
customProfit:Number
Specifies the custom profit for this label candidate. The value is restricted to the interval [0,1] where 1 specifies the highest possible profit (default is 0). Note: the value is only considered if the labeling algorithm uses an optimization strategy (see com.yworks.yfiles.layout.labeling.MISLabelingAlgorithm.optimizationStrategy).
public function get customProfit():Number
public function set customProfit(value:Number):void
IllegalArgumentException — if the value lies not in the interval [0,1].
|
See also
edgeOverlapPenalty | property |
edgeOverlapPenalty:Number
Specifies the penalty value for a candidate position that overlaps the path of an edge.
The penalty should be a factor between 0 and 1, where 0 means that an overlap is considered unimportant and 1 means that an overlap is considered severe.
By default edge overlap penalty is set to 1.
public function get edgeOverlapPenalty():Number
public function set edgeOverlapPenalty(value:Number):void
height | property |
height:Number
[read-only] Returns the height of the label candidate bounds.
public function get height():Number
internal2 | property |
internal2:Boolean
[read-only] Returns whether this candidate is an internal node label, i.e. an label which resides inside the boundaries of a node.
public function get internal2():Boolean
location | property |
location:YPoint
[read-only] Returns the upper left corner of the label candidate bounds.
public function get location():YPoint
modelParameter | property |
modelParameter:Object
[read-only] Returns the model parameter that was used by the underlying model to generate this label candidate.
public function get modelParameter():Object
nodeOverlapPenalty | property |
nodeOverlapPenalty:Number
Specifies the penalty for a candidate position that overlaps the bounds of a node.
The penalty should be a factor between 0 and 1, where 0 means that an overlap is considered unimportant and 1 means that an overlap is considered severe.
By default node overlap penalty is set to 1.
public function get nodeOverlapPenalty():Number
public function set nodeOverlapPenalty(value:Number):void
overlapPenalty | property |
overlapPenalty:Number
[read-only] Returns the sum of node overlap penalty and edge overlap penalty.
public function get overlapPenalty():Number
See also
owner | property |
owner:LabelLayout
[read-only] Returns the LabelLayout to which this candidate box belongs.
public function get owner():LabelLayout
parameter | property |
parameter:Object
[read-only] Returns the model parameter that was used by the underlying model to generate this label candidate.
public function get parameter():Object
propagated | property |
propagated:Boolean
[read-only] Returns if this box had been chosen by the labeling algorithm.
public function get propagated():Boolean
size | property |
size:YDimension
[read-only] Returns the width and height of the label candidate bounds.
public function get size():YDimension
width | property |
width:Number
[read-only] Returns the width of the label candidate bounds.
public function get width():Number
x | property |
x:Number
[read-only] Returns the minimal x-coordinate of the label candidate bounds.
public function get x():Number
y | property |
y:Number
[read-only] Returns the minimal y-coordinate of the label candidate bounds.
public function get y():Number
LabelCandidate | () | Constructor |
public function LabelCandidate(labelBox:YOrientedRectangle, param:Object, owner:LabelLayout, init:Boolean = true)
Returns a new instance of LabelCandidate.
ParameterslabelBox:YOrientedRectangle — the box that specifies the candidate's size and position.
| |
param:Object — the parameters of the labeling model with this candidate.
| |
owner:LabelLayout — the label associated to the candidate.
| |
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.
|
getClass | () | method |
override public function getClass():Class
ReturnsClass |
initLabelCandidate1 | () | method |
protected final function initLabelCandidate1(labelBox:YOrientedRectangle, param:Object, owner:LabelLayout):void
Initializes this object. See the documentation of the corresponding factory method newLabelCandidate1()
for details.
Parameters
labelBox:YOrientedRectangle | |
param:Object | |
owner:LabelLayout |
See also
initLabelCandidate2 | () | method |
protected final function initLabelCandidate2(labelBox:YOrientedRectangle, param:Object, owner:LabelLayout, _internal:Boolean):void
Initializes this object. See the documentation of the corresponding factory method newLabelCandidate2()
for details.
Parameters
labelBox:YOrientedRectangle | |
param:Object | |
owner:LabelLayout | |
_internal:Boolean |
See also
initLabelCandidate3 | () | method |
protected final function initLabelCandidate3(pos:YPoint, size:YDimension, param:Object, owner:LabelLayout):void
Initializes this object. See the documentation of the corresponding factory method newLabelCandidate3()
for details.
Parameters
pos:YPoint | |
size:YDimension | |
param:Object | |
owner:LabelLayout |
See also
initLabelCandidate4 | () | method |
protected final function initLabelCandidate4(pos:YPoint, size:YDimension, param:Object, owner:LabelLayout, _internal:Boolean):void
Initializes this object. See the documentation of the corresponding factory method newLabelCandidate4()
for details.
Parameters
pos:YPoint | |
size:YDimension | |
param:Object | |
owner:LabelLayout | |
_internal:Boolean |
See also
newLabelCandidate1 | () | method |
public static function newLabelCandidate1(labelBox:YOrientedRectangle, param:Object, owner:LabelLayout):LabelCandidate
Returns a new instance of LabelCandidate.
Parameters
labelBox:YOrientedRectangle — the box that specifies the candidate's size and position.
| |
param:Object — the parameters of the labeling model with this candidate.
| |
owner:LabelLayout — the label associated to the candidate.
|
LabelCandidate |
newLabelCandidate2 | () | method |
public static function newLabelCandidate2(labelBox:YOrientedRectangle, param:Object, owner:LabelLayout, _internal:Boolean):LabelCandidate
Returns a new instance of LabelCandidate.
Parameters
labelBox:YOrientedRectangle — the box that specifies the candidate's size and position.
| |
param:Object — the parameters of the labeling model with this candidate.
| |
owner:LabelLayout — the label associated to the candidate.
| |
_internal:Boolean — flag whether the candidate is allowed to overlap its own feature.
|
LabelCandidate |
newLabelCandidate3 | () | method |
public static function newLabelCandidate3(pos:YPoint, size:YDimension, param:Object, owner:LabelLayout):LabelCandidate
Returns a new instance of LabelCandidate.
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:LabelLayout — the label associated to the candidate.
|
LabelCandidate |
newLabelCandidate4 | () | method |
public static function newLabelCandidate4(pos:YPoint, size:YDimension, param:Object, owner:LabelLayout, _internal:Boolean):LabelCandidate
Returns a new instance of LabelCandidate.
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 with this candidate.
| |
owner:LabelLayout — the label associated to the candidate.
| |
_internal:Boolean — flag whether the candidate is allowed to overlap its own feature.
|
LabelCandidate |
propagate | () | method |
public function propagate():void
Sets the model parameters of the owner of this label candidate to the model parameters of this candidate box.
toString | () | method |
public function toString():String
ReturnsString |