Packagecom.yworks.yfiles.layout
Classpublic class LabelLayoutDataRefinement
InheritanceLabelLayoutDataRefinement Inheritance AbstractLayoutStage Inheritance YObject Inheritance Object

A layout stage that improves the placement of edge labels. This layout stage expects that its core layouter calculates initial edge label layout data bound to the data provider key com.yworks.yfiles.layout.LabelLayoutKeys.EDGE_LABEL_LAYOUT_KEY . Next, this stage tries to improve the position of the labels with respect to the preferred placement specifier of the labels. Most commonly, this layout stage is used in conjunction with the integrated edge labeling functionality of class com.yworks.yfiles.layout.hierarchic.HierarchicLayouter . The following code snippet shows how this layout stage can be set up:
 // 'hierarchic' is of type y.layout.hierarchic.HierarchicLayouter. // String together a label layout process. CompositeLayoutStage ll = new CompositeLayoutStage(); ll.appendStage(new LabelLayoutTranslator()); ll.appendStage(new LabelLayoutDataRefinement()); // Set the compound label layout process as the label layouter for // HierarchicLayouter. hierarchic.setLabelLayouter(ll); hierarchic.setLabelLayouterEnabled(true); 

See also

com.yworks.yfiles.layout.LabelLayoutKeys.EDGE_LABEL_LAYOUT_KEY
com.yworks.yfiles.layout.hierarchic.HierarchicLayouter


Public Properties
 PropertyDefined By
 InheritedcoreLayouter : Layouter
Specifies the core layouter.
AbstractLayoutStage
  internalLabelingAlgorithm : AbstractLabelingAlgorithm
Specifies the internal labeling algorithm used to improve the label positions.
LabelLayoutDataRefinement
Public Methods
 MethodDefined By
  
LabelLayoutDataRefinement(init:Boolean = true)
Creates a new instance of LabelLayoutDataImprovement
LabelLayoutDataRefinement
  
canLayout(graph:LayoutGraph):Boolean
[override] Returns true.
LabelLayoutDataRefinement
  
doLayout(graph:LayoutGraph):void
[override] Assigns a new graph layout to the given layout graph.
LabelLayoutDataRefinement
 Inherited
equals(o:Object):Boolean
YObject
  
getClass():Class
[override]
LabelLayoutDataRefinement
 Inherited
hashCode():int
YObject
  
[static] Creates a new instance of LabelLayoutDataImprovement
LabelLayoutDataRefinement
Protected Methods
 MethodDefined By
 Inherited
canLayoutCore(graph:LayoutGraph):Boolean
Queries the core layouter whether or not the given graph can be laid out.
AbstractLayoutStage
 Inherited
Invokes the layout routine of the core layouter.
AbstractLayoutStage
 Inherited
AbstractLayoutStage
 Inherited
AbstractLayoutStage
  
Initializes this object.
LabelLayoutDataRefinement
Property Detail
internalLabelingAlgorithmproperty
internalLabelingAlgorithm:AbstractLabelingAlgorithm

Specifies the internal labeling algorithm used to improve the label positions.


Implementation
    public function get internalLabelingAlgorithm():AbstractLabelingAlgorithm
    public function set internalLabelingAlgorithm(value:AbstractLabelingAlgorithm):void
Constructor Detail
LabelLayoutDataRefinement()Constructor
public function LabelLayoutDataRefinement(init:Boolean = true)

Creates a new instance of LabelLayoutDataImprovement

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
canLayout()method
override public function canLayout(graph:LayoutGraph):Boolean

Returns true.

Parameters

graph:LayoutGraph

Returns
Boolean
doLayout()method 
override public function doLayout(graph:LayoutGraph):void

Assigns a new graph layout to the given layout graph.

Parameters

graph:LayoutGraph

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

Returns
Class
initLabelLayoutDataRefinement()method 
protected final function initLabelLayoutDataRefinement():void

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

See also

newLabelLayoutDataRefinement()method 
public static function newLabelLayoutDataRefinement():LabelLayoutDataRefinement

Creates a new instance of LabelLayoutDataImprovement

Returns
LabelLayoutDataRefinement