Package | com.yworks.yfiles.layout |
Class | public class RotatedSliderEdgeLabelLayoutModel |
Inheritance | RotatedSliderEdgeLabelLayoutModel YObject Object |
Implements | EdgeLabelModel |
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.
Property | Defined 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 |
Method | Defined 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 | ||
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 | ||
hashCode():int | YObject | ||
[static]
Returns a new instance of RotatedSliderEdgeLabelModel. | RotatedSliderEdgeLabelLayoutModel |
Method | Defined By | ||
---|---|---|---|
initRotatedSliderEdgeLabelLayoutModel(mode:int):void
Initializes this object. | RotatedSliderEdgeLabelLayoutModel |
Constant | Defined 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 |
angle | property |
angle:Number
Specifies the angle (measured in radians) of the label model. The angle is applied in clockwise direction.
public function get angle():Number
public function set angle(value:Number):void
autoFlippingEnabled | property |
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.
public function get autoFlippingEnabled():Boolean
public function set autoFlippingEnabled(value:Boolean):void
autoRotationEnabled | property |
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.
public function get autoRotationEnabled():Boolean
public function set autoRotationEnabled(value:Boolean):void
defaultParameter | property |
defaultParameter:Object
[read-only] Returns a model parameter that encodes the default position of this model's allowed edge label positions.
public function get defaultParameter():Object
distance | property |
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).
public function get distance():Number
public function set distance(value:Number):void
See also
distanceRelativeToEdge | property |
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
.
public function get distanceRelativeToEdge():Boolean
public function set distanceRelativeToEdge(value:Boolean):void
See also
mode | property |
mode:int
[read-only] Returns the model's slider mode.
public function get mode():int
RotatedSliderEdgeLabelLayoutModel | () | Constructor |
public function RotatedSliderEdgeLabelLayoutModel(mode:int, init:Boolean = true)
Returns a new instance of RotatedSliderEdgeLabelModel.
Parametersmode: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
createModelParameter | () | method |
public function createModelParameter(labelBounds:YOrientedRectangle, edgeLayout:EdgeLayout, sourceNode:NodeLayout, targetNode:NodeLayout):Object
Parameters
labelBounds:YOrientedRectangle | |
edgeLayout:EdgeLayout | |
sourceNode:NodeLayout | |
targetNode:NodeLayout |
Object |
getClass | () | method |
override public function getClass():Class
ReturnsClass |
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 |
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 |
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.
|
RotatedSliderEdgeLabelLayoutModel |
See also
CENTER_SLIDER | Constant |
public static const CENTER_SLIDER:int = 0
Symbolic slider mode specifier. Chooses continuous label positions directly on the edge path.
SIDE_SLIDER | Constant |
public static const SIDE_SLIDER:int = 1
Symbolic slider mode specifier. Chooses continuous label positions along both sides of the edge path.
SINGLE_SIDE_SLIDER | Constant |
public static const SINGLE_SIDE_SLIDER:int = 2
Symbolic slider mode specifier. Chooses continuous label positions along a side of the edge path.