Package | com.yworks.yfiles.layout |
Class | public class PreferredPlacementDescriptor |
Inheritance | PreferredPlacementDescriptor YObject Object |
It provides methods to specify
See also
Property | Defined By | ||
---|---|---|---|
angle : Number
Specifies the angle (in radians) for the label rotation. | PreferredPlacementDescriptor | ||
angleAbsolute : Boolean [read-only]
Returns if one of the angle interpretations is to interpret the angle absolute. | PreferredPlacementDescriptor | ||
angleOffsetOnRightSide : int
Specifies the angle offset for labels that are placed on the right side of the edge. | PreferredPlacementDescriptor | ||
angleOffsetOnRightSide0 : Boolean [read-only]
Returns if one of the angle interpretations is to add no additional angle offset to labels that are right of the edge. | PreferredPlacementDescriptor | ||
angleOffsetOnRightSide180 : Boolean [read-only]
Returns if one of the angle interpretations is to add an additional angle offset of 180 degree to labels that are right of the edge. | PreferredPlacementDescriptor | ||
angleOnRightSideCoRotating : Boolean [read-only]
Returns if one of the angle interpretations is to interpret the angle of labels that are right of the edge as co-rotating with the labels left of or centered on edge, i.e. | PreferredPlacementDescriptor | ||
angleOnRightSideCounterRotating : Boolean [read-only]
Returns if one of the angle interpretations is to interpret the angle of labels that are right of the edge as counter-rotating with the labels left of or centered on edge, i.e. | PreferredPlacementDescriptor | ||
angleReference : int
Specifies the reference of the angle given by com.yworks.yfiles.layout.PreferredPlacementDescriptor.angle. | PreferredPlacementDescriptor | ||
angleRelativeToEdgeFlow : Boolean [read-only]
Returns if one of the angle interpretations is to interpret the angle relative to the edge slope. | PreferredPlacementDescriptor | ||
angleRotationOnRightSide : int
Specifies how the angle is applied to labels on the right side in respect of the labels of the left side of the edge. | PreferredPlacementDescriptor | ||
atCenter : Boolean [read-only]
Returns if one of the preferred placements for this label is at center. | PreferredPlacementDescriptor | ||
atSource : Boolean [read-only]
Returns if one of the preferred placements for this label is at source. | PreferredPlacementDescriptor | ||
atTarget : Boolean [read-only]
Returns if one of the preferred placements for this label is at target. | PreferredPlacementDescriptor | ||
distanceToEdge : Number
Specifies the preferred distance between a label and the corresponding edge segment. | PreferredPlacementDescriptor | ||
frozen : Boolean [read-only]
Returns whether or not this is an immutable descriptor instance. | PreferredPlacementDescriptor | ||
leftOfEdge : Boolean [read-only]
Returns if one of the preferred sides for this label is left of the edge. | PreferredPlacementDescriptor | ||
onEdge : Boolean [read-only]
Returns if one of the preferred sides for this label is on the edge. | PreferredPlacementDescriptor | ||
placeAlongEdge : int
Specifies the preferred placement along the edge. | PreferredPlacementDescriptor | ||
rightOfEdge : Boolean [read-only]
Returns if one of the preferred sides for this label is right of the edge. | PreferredPlacementDescriptor | ||
sideAbsoluteWithLeftInNorth : Boolean [read-only]
Returns if the preferred side specified by com.yworks.yfiles.layout.LabelLayoutConstants.PLACE_LEFT_OF_EDGE and com.yworks.yfiles.layout.LabelLayoutConstants.PLACE_RIGHT_OF_EDGE is interpreted absolute and on horizontal segments, labels with preferred side com.yworks.yfiles.layout.LabelLayoutConstants.PLACE_LEFT_OF_EDGE are placed above the segment. | PreferredPlacementDescriptor | ||
sideAbsoluteWithRightInNorth : Boolean [read-only]
Returns if the preferred side specified by com.yworks.yfiles.layout.LabelLayoutConstants.PLACE_LEFT_OF_EDGE and com.yworks.yfiles.layout.LabelLayoutConstants.PLACE_RIGHT_OF_EDGE is interpreted absolute and on horizontal segments, labels with preferred side com.yworks.yfiles.layout.LabelLayoutConstants.PLACE_RIGHT_OF_EDGE are placed above the segment. | PreferredPlacementDescriptor | ||
sideOfEdge : int
Specifies the preferred side of the edge. | PreferredPlacementDescriptor | ||
sideReference : int
Getter:
Specifies how to interpret the preferred side as given by com.yworks.yfiles.layout.LabelLayoutConstants.PLACE_LEFT_OF_EDGE and com.yworks.yfiles.layout.LabelLayoutConstants.PLACE_RIGHT_OF_EDGE. | PreferredPlacementDescriptor | ||
sideRelativeToEdgeFlow : Boolean [read-only]
Returns if the preferred side specified by com.yworks.yfiles.layout.LabelLayoutConstants.PLACE_LEFT_OF_EDGE and com.yworks.yfiles.layout.LabelLayoutConstants.PLACE_RIGHT_OF_EDGE is interpreted relative to the edge flow. | PreferredPlacementDescriptor |
Method | Defined By | ||
---|---|---|---|
PreferredPlacementDescriptor(init:Boolean = true)
Creates a mutable instance of this descriptor. | PreferredPlacementDescriptor | ||
equals(o:Object):Boolean [override] | PreferredPlacementDescriptor | ||
freeze():void
Makes this instance immutable. | PreferredPlacementDescriptor | ||
getClass():Class [override] | PreferredPlacementDescriptor | ||
hashCode():int [override] | PreferredPlacementDescriptor | ||
[static]
Creates a mutable instance of this descriptor. | PreferredPlacementDescriptor | ||
newPreferredPlacementDescriptor2(descriptor:PreferredPlacementDescriptor):PreferredPlacementDescriptor [static]
Creates a mutable copy of the given PreferredPlacementDescriptor. | PreferredPlacementDescriptor | ||
newSharedInstance(placement:int):PreferredPlacementDescriptor [static]
Returns an immutable descriptor instance for the specified placement. | PreferredPlacementDescriptor | ||
toString():String | PreferredPlacementDescriptor |
Method | Defined By | ||
---|---|---|---|
Initializes this object. | PreferredPlacementDescriptor | ||
initPreferredPlacementDescriptor2(descriptor:PreferredPlacementDescriptor):void
Initializes this object. | PreferredPlacementDescriptor |
Constant | Defined By | ||
---|---|---|---|
ANGLE_IS_ABSOLUTE : int = 0x01 [static]
Angle interpretation specifier for edge labels. | PreferredPlacementDescriptor | ||
ANGLE_IS_RELATIVE_TO_EDGE_FLOW : int = 0x02 [static]
Angle interpretation specifier for edge labels. | PreferredPlacementDescriptor | ||
ANGLE_OFFSET_ON_RIGHT_SIDE_0 : int = 0x01 [static]
Angle offset specifier for edge labels whose descriptor rightOfEdge. | PreferredPlacementDescriptor | ||
ANGLE_OFFSET_ON_RIGHT_SIDE_180 : int = 0x02 [static]
Angle offset specifier for edge labels whose descriptor rightOfEdge. | PreferredPlacementDescriptor | ||
ANGLE_ON_RIGHT_SIDE_CO_ROTATING : int = 0x01 [static]
Angle interpretation specifier for edge labels whose descriptor rightOfEdge. | PreferredPlacementDescriptor | ||
ANGLE_ON_RIGHT_SIDE_COUNTER_ROTATING : int = 0x02 [static]
Angle interpretation specifier for edge labels whose descriptor rightOfEdge. | PreferredPlacementDescriptor | ||
SIDE_IS_ABSOLUTE_WITH_LEFT_IN_NORTH : int = 0x02 [static]
Side placement specifier for edge labels. | PreferredPlacementDescriptor | ||
SIDE_IS_ABSOLUTE_WITH_RIGHT_IN_NORTH : int = 0x04 [static]
Side placement specifier for edge labels. | PreferredPlacementDescriptor | ||
SIDE_IS_RELATIVE_TO_EDGE_FLOW : int = 0x01 [static]
Side placement specifier for edge labels. | PreferredPlacementDescriptor |
angle | property |
angle:Number
Specifies the angle (in radians) for the label rotation. How this angle is applied is specified by angleReference, angleRotationOnRightSide and angleOffsetOnRightSide . Default is 0.
public function get angle():Number
public function set angle(value:Number):void
Error — if this instance is immutable (frozen).
|
See also
angleAbsolute | property |
angleAbsolute:Boolean
[read-only] Returns if one of the angle interpretations is to interpret the angle absolute.
public function get angleAbsolute():Boolean
angleOffsetOnRightSide | property |
angleOffsetOnRightSide:int
Specifies the angle offset for labels that are placed on the right side of the edge. Default is ANGLE_OFFSET_ON_RIGHT_SIDE_0.
public function get angleOffsetOnRightSide():int
public function set angleOffsetOnRightSide(value:int):void
Error — if this instance is immutable (frozen).
| |
IllegalArgumentException — if the specified value has not at least one of the required bits set.
|
See also
angleOffsetOnRightSide0 | property |
angleOffsetOnRightSide0:Boolean
[read-only] Returns if one of the angle interpretations is to add no additional angle offset to labels that are right of the edge.
public function get angleOffsetOnRightSide0():Boolean
See also
angleOffsetOnRightSide180 | property |
angleOffsetOnRightSide180:Boolean
[read-only] Returns if one of the angle interpretations is to add an additional angle offset of 180 degree to labels that are right of the edge.
public function get angleOffsetOnRightSide180():Boolean
See also
angleOnRightSideCoRotating | property |
angleOnRightSideCoRotating:Boolean
[read-only] Returns if one of the angle interpretations is to interpret the angle of labels that are right of the edge as co-rotating with the labels left of or centered on edge, i.e. the angle of all labels is interpreted clockwise.
public function get angleOnRightSideCoRotating():Boolean
See also
angleOnRightSideCounterRotating | property |
angleOnRightSideCounterRotating:Boolean
[read-only] Returns if one of the angle interpretations is to interpret the angle of labels that are right of the edge as counter-rotating with the labels left of or centered on edge, i.e. the angle of labels left or centered on edge is interpreted clockwise while the angle of labels right of edge is interpreted counter-clockwise.
public function get angleOnRightSideCounterRotating():Boolean
See also
angleReference | property |
angleReference:int
Specifies the reference of the angle given by com.yworks.yfiles.layout.PreferredPlacementDescriptor.angle. Default is ANGLE_IS_ABSOLUTE.
public function get angleReference():int
public function set angleReference(value:int):void
Error — if this instance is immutable (frozen).
| |
IllegalArgumentException — if the specified value has not at least one of the required bits set.
|
See also
angleRelativeToEdgeFlow | property |
angleRelativeToEdgeFlow:Boolean
[read-only] Returns if one of the angle interpretations is to interpret the angle relative to the edge slope.
public function get angleRelativeToEdgeFlow():Boolean
angleRotationOnRightSide | property |
angleRotationOnRightSide:int
Specifies how the angle is applied to labels on the right side in respect of the labels of the left side of the edge. Default is ANGLE_ON_RIGHT_SIDE_CO_ROTATING.
public function get angleRotationOnRightSide():int
public function set angleRotationOnRightSide(value:int):void
Error — if this instance is immutable (frozen).
| |
IllegalArgumentException — if the specified value has not at least one of the required bits set.
|
See also
atCenter | property |
atCenter:Boolean
[read-only] Returns if one of the preferred placements for this label is at center.
public function get atCenter():Boolean
atSource | property |
atSource:Boolean
[read-only] Returns if one of the preferred placements for this label is at source.
public function get atSource():Boolean
atTarget | property |
atTarget:Boolean
[read-only] Returns if one of the preferred placements for this label is at target.
public function get atTarget():Boolean
distanceToEdge | property |
distanceToEdge:Number
Specifies the preferred distance between a label and the corresponding edge segment. If the given distance is < 0, the distance is not fixed, i.e., it is chosen by the automatic labeling algorithm. Default is -1.
public function get distanceToEdge():Number
public function set distanceToEdge(value:Number):void
IllegalArgumentException — if the specified value is infinite or NaN.
| |
Error — if this instance is immutable (frozen).
|
See also
frozen | property |
frozen:Boolean
[read-only]
Returns whether or not this is an immutable descriptor instance.
If this instance is immutable, all set
methods will throw an Error when invoked.
public function get frozen():Boolean
See also
leftOfEdge | property |
leftOfEdge:Boolean
[read-only] Returns if one of the preferred sides for this label is left of the edge.
public function get leftOfEdge():Boolean
onEdge | property |
onEdge:Boolean
[read-only] Returns if one of the preferred sides for this label is on the edge.
public function get onEdge():Boolean
placeAlongEdge | property |
placeAlongEdge:int
Specifies the preferred placement along the edge. Default is com.yworks.yfiles.layout.LabelLayoutConstants.PLACE_AT_CENTER.
public function get placeAlongEdge():int
public function set placeAlongEdge(value:int):void
Error — if this instance is immutable (frozen).
|
See also
rightOfEdge | property |
rightOfEdge:Boolean
[read-only] Returns if one of the preferred sides for this label is right of the edge.
public function get rightOfEdge():Boolean
sideAbsoluteWithLeftInNorth | property |
sideAbsoluteWithLeftInNorth:Boolean
[read-only] Returns if the preferred side specified by com.yworks.yfiles.layout.LabelLayoutConstants.PLACE_LEFT_OF_EDGE and com.yworks.yfiles.layout.LabelLayoutConstants.PLACE_RIGHT_OF_EDGE is interpreted absolute and on horizontal segments, labels with preferred side com.yworks.yfiles.layout.LabelLayoutConstants.PLACE_LEFT_OF_EDGE are placed above the segment.
public function get sideAbsoluteWithLeftInNorth():Boolean
See also
sideAbsoluteWithRightInNorth | property |
sideAbsoluteWithRightInNorth:Boolean
[read-only] Returns if the preferred side specified by com.yworks.yfiles.layout.LabelLayoutConstants.PLACE_LEFT_OF_EDGE and com.yworks.yfiles.layout.LabelLayoutConstants.PLACE_RIGHT_OF_EDGE is interpreted absolute and on horizontal segments, labels with preferred side com.yworks.yfiles.layout.LabelLayoutConstants.PLACE_RIGHT_OF_EDGE are placed above the segment.
public function get sideAbsoluteWithRightInNorth():Boolean
See also
sideOfEdge | property |
sideOfEdge:int
Specifies the preferred side of the edge. Default is com.yworks.yfiles.layout.LabelLayoutConstants.PLACE_ON_EDGE.
public function get sideOfEdge():int
public function set sideOfEdge(value:int):void
Error — if this instance is immutable (frozen).
|
See also
sideReference | property |
sideReference:int
Getter: Specifies how to interpret the preferred side as given by com.yworks.yfiles.layout.LabelLayoutConstants.PLACE_LEFT_OF_EDGE and com.yworks.yfiles.layout.LabelLayoutConstants.PLACE_RIGHT_OF_EDGE. Default is SIDE_IS_RELATIVE_TO_EDGE_FLOW.
Setter: Specifies how to interpret the preferred side as given by com.yworks.yfiles.layout.LabelLayoutConstants.PLACE_RIGHT_OF_EDGE and com.yworks.yfiles.layout.LabelLayoutConstants.PLACE_LEFT_OF_EDGE. public function get sideReference():int
public function set sideReference(value:int):void
Error — if this instance is immutable (frozen).
| |
IllegalArgumentException — if the specified value has not at least one of the required bits set.
|
See also
sideRelativeToEdgeFlow | property |
sideRelativeToEdgeFlow:Boolean
[read-only] Returns if the preferred side specified by com.yworks.yfiles.layout.LabelLayoutConstants.PLACE_LEFT_OF_EDGE and com.yworks.yfiles.layout.LabelLayoutConstants.PLACE_RIGHT_OF_EDGE is interpreted relative to the edge flow.
public function get sideRelativeToEdgeFlow():Boolean
See also
PreferredPlacementDescriptor | () | Constructor |
public function PreferredPlacementDescriptor(init:Boolean = true)
Creates a mutable instance of this descriptor.
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.
|
equals | () | method |
override public function equals(o:Object):Boolean
Parameters
o:Object |
Boolean |
freeze | () | method |
public function freeze():void
Makes this instance immutable.
If this instance is immutable, all set
methods will throw an Error when invoked.
See also
getClass | () | method |
override public function getClass():Class
ReturnsClass |
hashCode | () | method |
override public function hashCode():int
Returnsint |
initPreferredPlacementDescriptor1 | () | method |
protected final function initPreferredPlacementDescriptor1():void
Initializes this object. See the documentation of the corresponding factory method newPreferredPlacementDescriptor1()
for details.
See also
initPreferredPlacementDescriptor2 | () | method |
protected final function initPreferredPlacementDescriptor2(descriptor:PreferredPlacementDescriptor):void
Initializes this object. See the documentation of the corresponding factory method newPreferredPlacementDescriptor2()
for details.
Parameters
descriptor:PreferredPlacementDescriptor |
See also
newPreferredPlacementDescriptor1 | () | method |
public static function newPreferredPlacementDescriptor1():PreferredPlacementDescriptor
Creates a mutable instance of this descriptor.
ReturnsPreferredPlacementDescriptor |
newPreferredPlacementDescriptor2 | () | method |
public static function newPreferredPlacementDescriptor2(descriptor:PreferredPlacementDescriptor):PreferredPlacementDescriptor
Creates a mutable copy of the given PreferredPlacementDescriptor.
Parameters
descriptor:PreferredPlacementDescriptor — PreferredPlacementDescriptor to make a copy from
|
PreferredPlacementDescriptor |
newSharedInstance | () | method |
public static function newSharedInstance(placement:int):PreferredPlacementDescriptor
Returns an immutable descriptor instance for the specified placement. Descriptor instances returned by this method will use default values for all properties but placement along edge (placeAlongEdge) and side of edge (sideOfEdge).
Parameters
placement:int — an ORed combination of com.yworks.yfiles.layout.LabelLayoutConstants.PLACE_ANYWHERE, com.yworks.yfiles.layout.LabelLayoutConstants.PLACE_AT_SOURCE, com.yworks.yfiles.layout.LabelLayoutConstants.PLACE_AT_TARGET, or com.yworks.yfiles.layout.LabelLayoutConstants.PLACE_AT_CENTER and com.yworks.yfiles.layout.LabelLayoutConstants.PLACE_LEFT_OF_EDGE, com.yworks.yfiles.layout.LabelLayoutConstants.PLACE_RIGHT_OF_EDGE, or com.yworks.yfiles.layout.LabelLayoutConstants.PLACE_ON_EDGE.
|
PreferredPlacementDescriptor — an immutable descriptor instance for the specified placement.
|
See also
toString | () | method |
public function toString():String
ReturnsString |
ANGLE_IS_ABSOLUTE | Constant |
public static const ANGLE_IS_ABSOLUTE:int = 0x01
Angle interpretation specifier for edge labels. Expresses that the angle should be interpreted absolute and not relative to the edge slope.
See also
ANGLE_IS_RELATIVE_TO_EDGE_FLOW | Constant |
public static const ANGLE_IS_RELATIVE_TO_EDGE_FLOW:int = 0x02
Angle interpretation specifier for edge labels. Expresses that the angle should be interpreted relative to the edge slope.
See also
ANGLE_OFFSET_ON_RIGHT_SIDE_0 | Constant |
public static const ANGLE_OFFSET_ON_RIGHT_SIDE_0:int = 0x01
Angle offset specifier for edge labels whose descriptor rightOfEdge. Expresses that for labels right of edge no additional offset should be added to the angle offset.
See also
ANGLE_OFFSET_ON_RIGHT_SIDE_180 | Constant |
public static const ANGLE_OFFSET_ON_RIGHT_SIDE_180:int = 0x02
Angle offset specifier for edge labels whose descriptor rightOfEdge. Expresses that for labels right of edge an additional offset of 180 degree should be added to the angle offset so that point symmetric label placements left and right of the edge can be attained.
See also
ANGLE_ON_RIGHT_SIDE_CO_ROTATING | Constant |
public static const ANGLE_ON_RIGHT_SIDE_CO_ROTATING:int = 0x01
Angle interpretation specifier for edge labels whose descriptor rightOfEdge. Expresses that the angle should be interpreted as clockwise and therefore as co-rotating with the angle of labels that are left of or centered on edge.
See also
ANGLE_ON_RIGHT_SIDE_COUNTER_ROTATING | Constant |
public static const ANGLE_ON_RIGHT_SIDE_COUNTER_ROTATING:int = 0x02
Angle interpretation specifier for edge labels whose descriptor rightOfEdge. Expresses that the angle should be interpreted as counter-clockwise and therefore as counter-rotating with the angle of labels that are left of or centered on edge.
See also
SIDE_IS_ABSOLUTE_WITH_LEFT_IN_NORTH | Constant |
public static const SIDE_IS_ABSOLUTE_WITH_LEFT_IN_NORTH:int = 0x02
Side placement specifier for edge labels. Expresses that the preferred side (as specified by com.yworks.yfiles.layout.LabelLayoutConstants.PLACE_LEFT_OF_EDGE and com.yworks.yfiles.layout.LabelLayoutConstants.PLACE_RIGHT_OF_EDGE) is interpreted absolute. On horizontal segments labels with preferred side com.yworks.yfiles.layout.LabelLayoutConstants.PLACE_LEFT_OF_EDGE are placed above the segment.
See also
SIDE_IS_ABSOLUTE_WITH_RIGHT_IN_NORTH | Constant |
public static const SIDE_IS_ABSOLUTE_WITH_RIGHT_IN_NORTH:int = 0x04
Side placement specifier for edge labels. Expresses that the preferred side (as specified by com.yworks.yfiles.layout.LabelLayoutConstants.PLACE_LEFT_OF_EDGE and com.yworks.yfiles.layout.LabelLayoutConstants.PLACE_RIGHT_OF_EDGE) is interpreted absolute. On horizontal segments labels with preferred side com.yworks.yfiles.layout.LabelLayoutConstants.PLACE_RIGHT_OF_EDGE are placed above the segment.
See also
SIDE_IS_RELATIVE_TO_EDGE_FLOW | Constant |
public static const SIDE_IS_RELATIVE_TO_EDGE_FLOW:int = 0x01
Side placement specifier for edge labels. Expresses that the preferred side (as specified by com.yworks.yfiles.layout.LabelLayoutConstants.PLACE_LEFT_OF_EDGE and com.yworks.yfiles.layout.LabelLayoutConstants.PLACE_RIGHT_OF_EDGE) is interpreted relative to the edge flow.
See also