Package | com.yworks.yfiles.layout |
Class | public class SliderEdgeLabelLayoutModel |
Inheritance | SliderEdgeLabelLayoutModel 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 | ||
---|---|---|---|
defaultParameter : Object [read-only]
Returns a model parameter that encodes the default position of this model's allowed edge label positions. | SliderEdgeLabelLayoutModel | ||
density : Number
Specifies the density to generate label candidate positions. | SliderEdgeLabelLayoutModel | ||
maximumDistance : Number
Specifies the maximum distance between the label's bounding box and the edge's path. | SliderEdgeLabelLayoutModel | ||
minimumDistance : Number
Specifies the minimum distance between the label's bounding box and the edge's path. | SliderEdgeLabelLayoutModel | ||
mode : int [read-only]
Returns the model's slider mode. | SliderEdgeLabelLayoutModel | ||
nodeBorderDistance : Number
Specifies the minimal distance between the label's bounding box and a node's borders. | SliderEdgeLabelLayoutModel |
Method | Defined By | ||
---|---|---|---|
SliderEdgeLabelLayoutModel(mode:int, init:Boolean = true)
Initializes a new instance of SliderEdgeLabelModel. | SliderEdgeLabelLayoutModel | ||
createModelParameter(labelBounds:YOrientedRectangle, edgeLayout:EdgeLayout, sourceNode:NodeLayout, targetNode:NodeLayout):Object | SliderEdgeLabelLayoutModel | ||
equals(o:Object):Boolean | YObject | ||
getClass():Class [override] | SliderEdgeLabelLayoutModel | ||
getLabelCandidates(label:EdgeLabelLayout, edgeLayout:EdgeLayout, sourceNode:NodeLayout, targetNode:NodeLayout):YList
Returns a list of candidate positions for the given edge label. | SliderEdgeLabelLayoutModel | ||
getLabelPlacement(labelSize:YDimension, edgeLayout:EdgeLayout, sourceNode:NodeLayout, targetNode:NodeLayout, para:Object):YOrientedRectangle | SliderEdgeLabelLayoutModel | ||
getOffsetVec(dx:Number, dy:Number, width:Number, height:Number, labelPosition:int):YVector
Returns the offset vector for a given edge label and a given edge segment. | SliderEdgeLabelLayoutModel | ||
hashCode():int | YObject | ||
[static]
Initializes a new instance of SliderEdgeLabelModel. | SliderEdgeLabelLayoutModel | ||
setDistances(minDistance:Number, maxDistance:Number):void
Sets the minimum and maximum distances between the label's bounding box and the edge's path. | SliderEdgeLabelLayoutModel |
Method | Defined By | ||
---|---|---|---|
initSliderEdgeLabelLayoutModel(mode:int):void
Initializes this object. | SliderEdgeLabelLayoutModel |
Constant | Defined By | ||
---|---|---|---|
CENTER_RATIO : int = 0 [static]
Symbolic ratio specifier. | SliderEdgeLabelLayoutModel | ||
CENTER_SLIDER : int = 0 [static]
Symbolic slider mode specifier. | SliderEdgeLabelLayoutModel | ||
HEAD_RATIO : int = 2 [static]
Symbolic ratio specifier. | SliderEdgeLabelLayoutModel | ||
LEFT_RATIO : int = 3 [static]
Symbolic ratio specifier. | SliderEdgeLabelLayoutModel | ||
RIGHT_RATIO : int = 4 [static]
Symbolic ratio specifier. | SliderEdgeLabelLayoutModel | ||
SIDE_SLIDER : int = 1 [static]
Symbolic slider mode specifier. | SliderEdgeLabelLayoutModel | ||
TAIL_RATIO : int = 1 [static]
Symbolic ratio specifier. | SliderEdgeLabelLayoutModel |
defaultParameter | property |
defaultParameter:Object
[read-only] Returns a model parameter that encodes the default position of this model's allowed edge label positions.
The default positions for both slider edge label models are relative to the first edge segment, either at the beginning of the segment ( SIDE_SLIDER model) or at its middle ( CENTER_SLIDER model). public function get defaultParameter():Object
See also
density | property |
density:Number
Specifies the density to generate label candidate positions.
A density value of 1.0
(which is the default) generates the most possible candidate positions without overlap.
public function get density():Number
public function set density(value:Number):void
maximumDistance | property |
maximumDistance:Number
Specifies the maximum distance between the label's bounding box and the edge's path.
By default, a maximum distance of 1.0
is set.
public function get maximumDistance():Number
public function set maximumDistance(value:Number):void
See also
minimumDistance | property |
minimumDistance:Number
Specifies the minimum distance between the label's bounding box and the edge's path.
By default, a minimum distance of 1.0
is set.
public function get minimumDistance():Number
public function set minimumDistance(value:Number):void
See also
mode | property |
mode:int
[read-only] Returns the model's slider mode.
public function get mode():int
nodeBorderDistance | property |
nodeBorderDistance:Number
Specifies the minimal distance between the label's bounding box and a node's borders.
public function get nodeBorderDistance():Number
public function set nodeBorderDistance(value:Number):void
SliderEdgeLabelLayoutModel | () | Constructor |
public function SliderEdgeLabelLayoutModel(mode:int, init:Boolean = true)
Initializes a new instance of SliderEdgeLabelModel
.
mode:int — Determines which slider mode to use. Possible values are either CENTER_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 |
getOffsetVec | () | method |
public function getOffsetVec(dx:Number, dy:Number, width:Number, height:Number, labelPosition:int):YVector
Returns the offset vector for a given edge label and a given edge segment. The offset vector describes where to move a label candidate such that it keeps a certain distance to the edge's path.
Parameters
dx:Number — x-coordinates delta for an edge segment.
| |
dy:Number — y-coordinates delta for an edge segment.
| |
width:Number — The label's width.
| |
height:Number — The label's height.
| |
labelPosition:int — One of the symbolic ratio specifiers CENTER_RATIO, LEFT_RATIO, or RIGHT_RATIO .
|
YVector — An offset vector.
|
See also
initSliderEdgeLabelLayoutModel | () | method |
protected final function initSliderEdgeLabelLayoutModel(mode:int):void
Initializes this object. See the documentation of the corresponding factory method newSliderEdgeLabelLayoutModel()
for details.
Parameters
mode:int |
See also
newSliderEdgeLabelLayoutModel | () | method |
public static function newSliderEdgeLabelLayoutModel(mode:int):SliderEdgeLabelLayoutModel
Initializes a new instance of SliderEdgeLabelModel
.
Parameters
mode:int — Determines which slider mode to use. Possible values are either CENTER_SLIDER or SIDE_SLIDER .
|
SliderEdgeLabelLayoutModel |
See also
setDistances | () | method |
public function setDistances(minDistance:Number, maxDistance:Number):void
Sets the minimum and maximum distances between the label's bounding box and the edge's path.
Parameters
minDistance:Number — The minimal distance between label and edge.
| |
maxDistance:Number — The maximal distance between label and edge.
|
See also
CENTER_RATIO | Constant |
public static const CENTER_RATIO:int = 0
Symbolic ratio specifier. Valid only in conjunction with slider mode CENTER_SLIDER.
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.
HEAD_RATIO | Constant |
public static const HEAD_RATIO:int = 2
Symbolic ratio specifier. Valid only in conjunction with slider mode SIDE_SLIDER. Determines a label to be left of or above the edge's path.
See also
LEFT_RATIO | Constant |
public static const LEFT_RATIO:int = 3
Symbolic ratio specifier. Valid only in conjunction with slider mode SIDE_SLIDER. Determines a label to be left of the edge's path.
See also
RIGHT_RATIO | Constant |
public static const RIGHT_RATIO:int = 4
Symbolic ratio specifier. Valid only in conjunction with slider mode SIDE_SLIDER. Determines a label to be right of the edge's path.
See also
SIDE_SLIDER | Constant |
public static const SIDE_SLIDER:int = 1
Symbolic slider mode specifier. Chooses continuous label positions along the sides of the edge path.
TAIL_RATIO | Constant |
public static const TAIL_RATIO:int = 1
Symbolic ratio specifier. Valid only in conjunction with slider mode SIDE_SLIDER. Determines a label to be right of or below the edge's path.
See also