Packagecom.yworks.yfiles.layout
Classpublic class RotatedSliderEdgeLabelLayoutModel
InheritanceRotatedSliderEdgeLabelLayoutModel Inheritance YObject Inheritance Object
Implements EdgeLabelModel

An edge label model that allows placement of labels at a set of continuous positions along both sides of an edge or directly on the edge path.

The set of positions can be influenced by specifying the density value that controls the spacing between adjacent label positions. Furthermore, it's possible to specify distance values that control the distance between label and edge and between label and nodes.



Public Properties
 PropertyDefined By
  angle : Number
Specifies the angle (measured in radians) of the label model.
RotatedSliderEdgeLabelLayoutModel
  autoFlippingEnabled : Boolean
Determines whether or not edge labels get flipped if they would be upside down in their current position.
RotatedSliderEdgeLabelLayoutModel
  autoRotationEnabled : Boolean
Specifies whether or not edge labels have to be automatically rotated according to the angle of the corresponding reference edge segment.
RotatedSliderEdgeLabelLayoutModel
  defaultParameter : Object
[read-only] Returns a model parameter that encodes the default position of this model's allowed edge label positions.
RotatedSliderEdgeLabelLayoutModel
  distance : Number
Specifies the distance between the label's box and the edge's path.
RotatedSliderEdgeLabelLayoutModel
  distanceRelativeToEdge : Boolean
Specifies a value indicating whether the distance to the edge is interpreted relatively to the edge's path.
RotatedSliderEdgeLabelLayoutModel
  mode : int
[read-only] Returns the model's slider mode.
RotatedSliderEdgeLabelLayoutModel
Public Methods
 MethodDefined By
  
RotatedSliderEdgeLabelLayoutModel(mode:int, init:Boolean = true)
Returns a new instance of RotatedSliderEdgeLabelModel.
RotatedSliderEdgeLabelLayoutModel
  
createModelParameter(labelBounds:YOrientedRectangle, edgeLayout:EdgeLayout, sourceNode:NodeLayout, targetNode:NodeLayout):Object
RotatedSliderEdgeLabelLayoutModel
 Inherited
equals(o:Object):Boolean
YObject
  
getClass():Class
[override]
RotatedSliderEdgeLabelLayoutModel
  
getLabelCandidates(label:EdgeLabelLayout, edgeLayout:EdgeLayout, sourceNode:NodeLayout, targetNode:NodeLayout):YList
Returns a list of candidate positions for the given edge label.
RotatedSliderEdgeLabelLayoutModel
  
getLabelPlacement(labelSize:YDimension, edgeLayout:EdgeLayout, sourceNode:NodeLayout, targetNode:NodeLayout, para:Object):YOrientedRectangle
RotatedSliderEdgeLabelLayoutModel
 Inherited
hashCode():int
YObject
  
[static] Returns a new instance of RotatedSliderEdgeLabelModel.
RotatedSliderEdgeLabelLayoutModel
Protected Methods
 MethodDefined By
  
Initializes this object.
RotatedSliderEdgeLabelLayoutModel
Public Constants
 ConstantDefined By
  CENTER_SLIDER : int = 0
[static] Symbolic slider mode specifier.
RotatedSliderEdgeLabelLayoutModel
  SIDE_SLIDER : int = 1
[static] Symbolic slider mode specifier.
RotatedSliderEdgeLabelLayoutModel
  SINGLE_SIDE_SLIDER : int = 2
[static] Symbolic slider mode specifier.
RotatedSliderEdgeLabelLayoutModel
Property Detail
angleproperty
angle:Number

Specifies the angle (measured in radians) of the label model. The angle is applied in clockwise direction.


Implementation
    public function get angle():Number
    public function set angle(value:Number):void
autoFlippingEnabledproperty 
autoFlippingEnabled:Boolean

Determines whether or not edge labels get flipped if they would be upside down in their current position.

By default, this feature is disabled.


Implementation
    public function get autoFlippingEnabled():Boolean
    public function set autoFlippingEnabled(value:Boolean):void
autoRotationEnabledproperty 
autoRotationEnabled:Boolean

Specifies whether or not edge labels have to be automatically rotated according to the angle of the corresponding reference edge segment.

By default, this feature is enabled.


Implementation
    public function get autoRotationEnabled():Boolean
    public function set autoRotationEnabled(value:Boolean):void
defaultParameterproperty 
defaultParameter:Object  [read-only]

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


Implementation
    public function get defaultParameter():Object
distanceproperty 
distance:Number

Specifies the distance between the label's box and the edge's path. The interpretation of positive/negative values depends on property distanceRelativeToEdge (distanceRelativeToEdge).


Implementation
    public function get distance():Number
    public function set distance(value:Number):void

See also

distanceRelativeToEdgeproperty 
distanceRelativeToEdge:Boolean

Specifies a value indicating whether the distance to the edge is interpreted relatively to the edge's path. If this value is set, the label is placed to the left of the edge segment (relative to the segment direction) if distance is less than 0 and to the right of the edge segment if distance is greater than 0. If this value is not set, the label is placed below the edge segment (in geometric sense) if distance ls less than 0 and above the edge segment if distance is greater than 0.

The default value is true.


Implementation
    public function get distanceRelativeToEdge():Boolean
    public function set distanceRelativeToEdge(value:Boolean):void

See also

modeproperty 
mode:int  [read-only]

Returns the model's slider mode.


Implementation
    public function get mode():int
Constructor Detail
RotatedSliderEdgeLabelLayoutModel()Constructor
public function RotatedSliderEdgeLabelLayoutModel(mode:int, init:Boolean = true)

Returns a new instance of RotatedSliderEdgeLabelModel.

Parameters
mode:int — Determines which slider mode to use. Possible values are CENTER_SLIDER, SINGLE_SIDE_SLIDER or SIDE_SLIDER.
 
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.

See also

Method Detail
createModelParameter()method
public function createModelParameter(labelBounds:YOrientedRectangle, edgeLayout:EdgeLayout, sourceNode:NodeLayout, targetNode:NodeLayout):Object

Parameters

labelBounds:YOrientedRectangle
 
edgeLayout:EdgeLayout
 
sourceNode:NodeLayout
 
targetNode:NodeLayout

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

Returns
Class
getLabelCandidates()method 
public function getLabelCandidates(label:EdgeLabelLayout, edgeLayout:EdgeLayout, sourceNode:NodeLayout, targetNode:NodeLayout):YList

Returns a list of candidate positions for the given edge label. The number of candidates and their respective locations are computed depending on the geometries of both label and edge.

Parameters

label:EdgeLabelLayout
 
edgeLayout:EdgeLayout
 
sourceNode:NodeLayout
 
targetNode:NodeLayout

Returns
YList
getLabelPlacement()method 
public function getLabelPlacement(labelSize:YDimension, edgeLayout:EdgeLayout, sourceNode:NodeLayout, targetNode:NodeLayout, para:Object):YOrientedRectangle

Parameters

labelSize:YDimension
 
edgeLayout:EdgeLayout
 
sourceNode:NodeLayout
 
targetNode:NodeLayout
 
para:Object

Returns
YOrientedRectangle
initRotatedSliderEdgeLabelLayoutModel()method 
protected final function initRotatedSliderEdgeLabelLayoutModel(mode:int):void

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

Parameters

mode:int

See also

newRotatedSliderEdgeLabelLayoutModel()method 
public static function newRotatedSliderEdgeLabelLayoutModel(mode:int):RotatedSliderEdgeLabelLayoutModel

Returns a new instance of RotatedSliderEdgeLabelModel.

Parameters

mode:int — Determines which slider mode to use. Possible values are CENTER_SLIDER, SINGLE_SIDE_SLIDER or SIDE_SLIDER.

Returns
RotatedSliderEdgeLabelLayoutModel

See also

Constant Detail
CENTER_SLIDERConstant
public static const CENTER_SLIDER:int = 0

Symbolic slider mode specifier. Chooses continuous label positions directly on the edge path.

SIDE_SLIDERConstant 
public static const SIDE_SLIDER:int = 1

Symbolic slider mode specifier. Chooses continuous label positions along both sides of the edge path.

SINGLE_SIDE_SLIDERConstant 
public static const SINGLE_SIDE_SLIDER:int = 2

Symbolic slider mode specifier. Chooses continuous label positions along a side of the edge path.