Packagecom.yworks.yfiles.layout
Classpublic class FreeNodeLabelLayoutModel
InheritanceFreeNodeLabelLayoutModel Inheritance YObject Inheritance Object
Implements NodeLabelModel

A node label model that allows placement of labels at a fixed offset relative to the node's upper-left corner.



Public Properties
 PropertyDefined By
  defaultParameter : Object
[read-only] Returns a model parameter that encodes the default position of this model's allowed node label positions.
FreeNodeLabelLayoutModel
Public Methods
 MethodDefined By
  
FreeNodeLabelLayoutModel(init:Boolean = true)
Returns a new instance of FreeNodeLabelModel.
FreeNodeLabelLayoutModel
  
createModelParameter(labelBounds:YOrientedRectangle, nodeLayout:NodeLayout):Object
FreeNodeLabelLayoutModel
 Inherited
equals(o:Object):Boolean
YObject
  
getClass():Class
[override]
FreeNodeLabelLayoutModel
  
Returns a list of candidate positions for the given node label.
FreeNodeLabelLayoutModel
  
getLabelPlacement(labelSize:YDimension, nodeLayout:NodeLayout, param:Object):YOrientedRectangle
FreeNodeLabelLayoutModel
 Inherited
hashCode():int
YObject
  
[static] Returns a new instance of FreeNodeLabelModel.
FreeNodeLabelLayoutModel
Protected Methods
 MethodDefined By
  
Initializes this object.
FreeNodeLabelLayoutModel
Property Detail
defaultParameterproperty
defaultParameter:Object  [read-only]

Returns a model parameter that encodes the default position of this model's allowed node label positions.

The offset is set to a default value of -20 pixel for both directions, i.e., the node label's upper-left corner is placed 20 pixel to the left and 20 pixel above the node.


Implementation
    public function get defaultParameter():Object
Constructor Detail
FreeNodeLabelLayoutModel()Constructor
public function FreeNodeLabelLayoutModel(init:Boolean = true)

Returns a new instance of FreeNodeLabelModel.

Parameters
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
createModelParameter()method
public function createModelParameter(labelBounds:YOrientedRectangle, nodeLayout:NodeLayout):Object

Parameters

labelBounds:YOrientedRectangle
 
nodeLayout:NodeLayout

Returns
Object
getClass()method 
override public function getClass():Class

Returns
Class
getLabelCandidates()method 
public function getLabelCandidates(nl:NodeLabelLayout, nodeLayout:NodeLayout):YList

Returns a list of candidate positions for the given node label. The list consists of exactly one position.

Parameters

nl:NodeLabelLayout
 
nodeLayout:NodeLayout

Returns
YList
getLabelPlacement()method 
public function getLabelPlacement(labelSize:YDimension, nodeLayout:NodeLayout, param:Object):YOrientedRectangle

Parameters

labelSize:YDimension
 
nodeLayout:NodeLayout
 
param:Object

Returns
YOrientedRectangle
initFreeNodeLabelLayoutModel()method 
protected final function initFreeNodeLabelLayoutModel():void

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

See also

newFreeNodeLabelLayoutModel()method 
public static function newFreeNodeLabelLayoutModel():FreeNodeLabelLayoutModel

Returns a new instance of FreeNodeLabelModel.

Returns
FreeNodeLabelLayoutModel