Package | com.yworks.yfiles.layout |
Class | public class DiscreteNodeLabelLayoutModel |
Inheritance | DiscreteNodeLabelLayoutModel YObject Object |
Implements | NodeLabelModel |
Property | Defined By | ||
---|---|---|---|
candidateMask : int [read-only]
Allowed candidate positions, default is all positions. | DiscreteNodeLabelLayoutModel | ||
defaultParameter : Object [read-only]
Returns a model parameter that encodes the default position of this model's allowed node label positions. | DiscreteNodeLabelLayoutModel | ||
distance : Number
Getter:
Returns the distance between the bounding boxes of label and node. | DiscreteNodeLabelLayoutModel |
Method | Defined By | ||
---|---|---|---|
DiscreteNodeLabelLayoutModel(init:Boolean = true)
Returns a new instance of DiscreteNodeLabelModel. | DiscreteNodeLabelLayoutModel | ||
DiscreteNodeLabelLayoutModel | |||
equals(o:Object):Boolean | YObject | ||
getClass():Class [override] | DiscreteNodeLabelLayoutModel | ||
Returns a list of candidate positions for the given node label. | DiscreteNodeLabelLayoutModel | ||
Returns the the oriented label position and bounds encoded by the given model parameter. | DiscreteNodeLabelLayoutModel | ||
hashCode():int | YObject | ||
isParameterValid(parameter:Object):Boolean
Checks if the given model parameter encodes a node label position that is valid in this model. | DiscreteNodeLabelLayoutModel | ||
[static]
Returns a new instance of DiscreteNodeLabelModel. | DiscreteNodeLabelLayoutModel | ||
newDiscreteNodeLabelLayoutModel2(candidateMask:int):DiscreteNodeLabelLayoutModel [static]
Returns a new instance of DiscreteNodeLabelModel. | DiscreteNodeLabelLayoutModel | ||
newDiscreteNodeLabelLayoutModel3(candidateMask:int, inset:Number):DiscreteNodeLabelLayoutModel [static]
Returns a new instance of DiscreteNodeLabelModel. | DiscreteNodeLabelLayoutModel |
Method | Defined By | ||
---|---|---|---|
getLabelPlacementForParameter(labelSize:YDimension, nodeLayout:NodeLayout, pos:int):YOrientedRectangle
Returns the oriented label position and bounds for a node label of the specified size. | DiscreteNodeLabelLayoutModel | ||
Initializes this object. | DiscreteNodeLabelLayoutModel | ||
initDiscreteNodeLabelLayoutModel2(candidateMask:int):void
Initializes this object. | DiscreteNodeLabelLayoutModel | ||
initDiscreteNodeLabelLayoutModel3(candidateMask:int, inset:Number):void
Initializes this object. | DiscreteNodeLabelLayoutModel |
Constant | Defined By | ||
---|---|---|---|
BOTTOM : int = 0x00200 [static]
Symbolic position specifier. | DiscreteNodeLabelLayoutModel | ||
BOTTOM_LEFT : int = 0x08000 [static]
Symbolic position specifier. | DiscreteNodeLabelLayoutModel | ||
BOTTOM_RIGHT : int = 0x10000 [static]
Symbolic position specifier. | DiscreteNodeLabelLayoutModel | ||
CENTER : int = 0x00100 [static]
Symbolic position specifier. | DiscreteNodeLabelLayoutModel | ||
CORNER_MASK : int [static]
Position mask that constrains the positions to NORTH_EAST, NORTH_WEST, SOUTH_EAST, and SOUTH_WEST. | DiscreteNodeLabelLayoutModel | ||
EAST : int = 0x00008 [static]
Symbolic position specifier. | DiscreteNodeLabelLayoutModel | ||
EIGHT_POS_MASK : int [static]
Position mask that allows only the eight node-external positions. | DiscreteNodeLabelLayoutModel | ||
INTERNAL_MASK : int [static]
Position mask that allows only the nine node-internal positions. | DiscreteNodeLabelLayoutModel | ||
LEFT : int = 0x00800 [static]
Symbolic position specifier. | DiscreteNodeLabelLayoutModel | ||
NORTH : int = 0x00001 [static]
Symbolic position specifier. | DiscreteNodeLabelLayoutModel | ||
NORTH_EAST : int = 0x00004 [static]
Symbolic position specifier. | DiscreteNodeLabelLayoutModel | ||
NORTH_WEST : int = 0x00002 [static]
Symbolic position specifier. | DiscreteNodeLabelLayoutModel | ||
RIGHT : int = 0x01000 [static]
Symbolic position specifier. | DiscreteNodeLabelLayoutModel | ||
SANDWICH_MASK : int [static]
Position mask that constrains the positions to NORTH and SOUTH. | DiscreteNodeLabelLayoutModel | ||
SIDES_MASK : int [static]
Position mask that constrains the positions to EAST, WEST, NORTH, and SOUTH. | DiscreteNodeLabelLayoutModel | ||
SOUTH : int = 0x00020 [static]
Symbolic position specifier. | DiscreteNodeLabelLayoutModel | ||
SOUTH_EAST : int = 0x00080 [static]
Symbolic position specifier. | DiscreteNodeLabelLayoutModel | ||
SOUTH_WEST : int = 0x00040 [static]
Symbolic position specifier. | DiscreteNodeLabelLayoutModel | ||
TOP : int = 0x00400 [static]
Symbolic position specifier. | DiscreteNodeLabelLayoutModel | ||
TOP_LEFT : int = 0x02000 [static]
Symbolic position specifier. | DiscreteNodeLabelLayoutModel | ||
TOP_RIGHT : int = 0x04000 [static]
Symbolic position specifier. | DiscreteNodeLabelLayoutModel | ||
WEST : int = 0x00010 [static]
Symbolic position specifier. | DiscreteNodeLabelLayoutModel |
candidateMask | property |
candidateMask:int
[read-only] Allowed candidate positions, default is all positions.
public function get candidateMask():int
defaultParameter | property |
defaultParameter:Object
[read-only] Returns a model parameter that encodes the default position of this model's allowed node label positions.
Default positions are (in descending order): public function get defaultParameter():Object
See also
distance | property |
distance:Number
Getter: Returns the distance between the bounding boxes of label and node.
Setter: Sets the distance between the bounding boxes of label and node in the manner of an insets. It is applied to all label positions, except the CENTER position. public function get distance():Number
public function set distance(value:Number):void
See also
DiscreteNodeLabelLayoutModel | () | Constructor |
public function DiscreteNodeLabelLayoutModel(init:Boolean = true)
Returns a new instance of DiscreteNodeLabelModel. INTERNAL_MASK is used to define the allowed positions for the node label. The distance between label and node is set to 4.0 [pixel].
Parametersinit: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, nodeLayout:NodeLayout):Object
Parameters
labelBounds:YOrientedRectangle | |
nodeLayout:NodeLayout |
Object |
getClass | () | method |
override public function getClass():Class
ReturnsClass |
getLabelCandidates | () | method |
public function getLabelCandidates(nl:NodeLabelLayout, nodeLayout:NodeLayout):YList
Returns a list of candidate positions for the given node label.
Parameters
nl:NodeLabelLayout | |
nodeLayout:NodeLayout |
YList |
getLabelPlacement | () | method |
public function getLabelPlacement(labelSize:YDimension, nodeLayout:NodeLayout, param:Object):YOrientedRectangle
Returns the the oriented label position and bounds encoded by the given model parameter.
Parameters
labelSize:YDimension — The size of the label.
| |
nodeLayout:NodeLayout — The geometric description of the label's node.
| |
param:Object — A model parameter that encodes a label position that is valid in this model.
|
YOrientedRectangle |
getLabelPlacementForParameter | () | method |
protected function getLabelPlacementForParameter(labelSize:YDimension, nodeLayout:NodeLayout, pos:int):YOrientedRectangle
Returns the oriented label position and bounds for a node label of the specified size.
Parameters
labelSize:YDimension — The size of the label.
| |
nodeLayout:NodeLayout — The geometric description of the label's node.
| |
pos:int — A label position that is valid in this model.
|
YOrientedRectangle — the oriented label position and bounds.
|
initDiscreteNodeLabelLayoutModel1 | () | method |
protected final function initDiscreteNodeLabelLayoutModel1():void
Initializes this object. See the documentation of the corresponding factory method newDiscreteNodeLabelLayoutModel1()
for details.
See also
initDiscreteNodeLabelLayoutModel2 | () | method |
protected final function initDiscreteNodeLabelLayoutModel2(candidateMask:int):void
Initializes this object. See the documentation of the corresponding factory method newDiscreteNodeLabelLayoutModel2()
for details.
Parameters
candidateMask:int |
See also
initDiscreteNodeLabelLayoutModel3 | () | method |
protected final function initDiscreteNodeLabelLayoutModel3(candidateMask:int, inset:Number):void
Initializes this object. See the documentation of the corresponding factory method newDiscreteNodeLabelLayoutModel3()
for details.
Parameters
candidateMask:int | |
inset:Number |
See also
isParameterValid | () | method |
public function isParameterValid(parameter:Object):Boolean
Checks if the given model parameter encodes a node label position that is valid in this model.
Parameters
parameter:Object |
Boolean — Whether the label position encoded by the given model parameter is among the allowed positions.
|
newDiscreteNodeLabelLayoutModel1 | () | method |
public static function newDiscreteNodeLabelLayoutModel1():DiscreteNodeLabelLayoutModel
Returns a new instance of DiscreteNodeLabelModel. INTERNAL_MASK is used to define the allowed positions for the node label. The distance between label and node is set to 4.0 [pixel].
ReturnsDiscreteNodeLabelLayoutModel |
See also
newDiscreteNodeLabelLayoutModel2 | () | method |
public static function newDiscreteNodeLabelLayoutModel2(candidateMask:int):DiscreteNodeLabelLayoutModel
Returns a new instance of DiscreteNodeLabelModel. The given position mask is used to define the allowed positions for the node label. The distance between label and node is set to 4.0 [pixel].
Parameters
candidateMask:int — Defines the allowed positions for the node label.
|
DiscreteNodeLabelLayoutModel |
See also
newDiscreteNodeLabelLayoutModel3 | () | method |
public static function newDiscreteNodeLabelLayoutModel3(candidateMask:int, inset:Number):DiscreteNodeLabelLayoutModel
Returns a new instance of DiscreteNodeLabelModel.
Parameters
candidateMask:int — Defines the allowed positions for the node label.
| |
inset:Number — The distance between label and node.
|
DiscreteNodeLabelLayoutModel |
See also
BOTTOM | Constant |
public static const BOTTOM:int = 0x00200
Symbolic position specifier. Places the label at the bottom inside of the node.
BOTTOM_LEFT | Constant |
public static const BOTTOM_LEFT:int = 0x08000
Symbolic position specifier. Places the label at the bottom-left inside of the node.
BOTTOM_RIGHT | Constant |
public static const BOTTOM_RIGHT:int = 0x10000
Symbolic position specifier. Places the label at the bottom-right inside of the node.
CENTER | Constant |
public static const CENTER:int = 0x00100
Symbolic position specifier. Places the label in the center of the node.
CORNER_MASK | Constant |
public static const CORNER_MASK:int
Position mask that constrains the positions to NORTH_EAST, NORTH_WEST, SOUTH_EAST, and SOUTH_WEST.
See also
EAST | Constant |
public static const EAST:int = 0x00008
Symbolic position specifier. Places the label east of the node.
EIGHT_POS_MASK | Constant |
public static const EIGHT_POS_MASK:int
Position mask that allows only the eight node-external positions.
INTERNAL_MASK | Constant |
public static const INTERNAL_MASK:int
Position mask that allows only the nine node-internal positions.
LEFT | Constant |
public static const LEFT:int = 0x00800
Symbolic position specifier. Places the label at the left inside of the node.
NORTH | Constant |
public static const NORTH:int = 0x00001
Symbolic position specifier. Places the label north of the node.
NORTH_EAST | Constant |
public static const NORTH_EAST:int = 0x00004
Symbolic position specifier. Places the label north-east of the node.
NORTH_WEST | Constant |
public static const NORTH_WEST:int = 0x00002
Symbolic position specifier. Places the label north-west of the node.
RIGHT | Constant |
public static const RIGHT:int = 0x01000
Symbolic position specifier. Places the label at the right inside of the node.
SANDWICH_MASK | Constant |
public static const SANDWICH_MASK:int
Position mask that constrains the positions to NORTH and SOUTH.
See also
SIDES_MASK | Constant |
public static const SIDES_MASK:int
Position mask that constrains the positions to EAST, WEST, NORTH, and SOUTH.
See also
SOUTH | Constant |
public static const SOUTH:int = 0x00020
Symbolic position specifier. Places the label south of the node.
SOUTH_EAST | Constant |
public static const SOUTH_EAST:int = 0x00080
Symbolic position specifier. Places the label south-east of the node.
SOUTH_WEST | Constant |
public static const SOUTH_WEST:int = 0x00040
Symbolic position specifier. Places the label south-west of the node.
TOP | Constant |
public static const TOP:int = 0x00400
Symbolic position specifier. Places the label at the top inside of the node.
TOP_LEFT | Constant |
public static const TOP_LEFT:int = 0x02000
Symbolic position specifier. Places the label at the top-left inside of the node.
TOP_RIGHT | Constant |
public static const TOP_RIGHT:int = 0x04000
Symbolic position specifier. Places the label at the top-right inside of the node.
WEST | Constant |
public static const WEST:int = 0x00010
Symbolic position specifier. Places the label west of the node.