Package | com.yworks.yfiles.layout |
Class | public class OrientationLayouter |
Inheritance | OrientationLayouter AbstractLayoutStage YObject Object |
For all com.yworks.yfiles.layout.CanonicMultiStageLayouter s it is highly recommended to use com.yworks.yfiles.layout.CanonicMultiStageLayouter.orientationLayouter for layout orientation changes and not to wrap the CanonicMultiStageLayouter
with an OrientationLayouter
, which may cause unwanted artifacts.
See also
Property | Defined By | ||
---|---|---|---|
considerEdgeLabelsEnabled : Boolean
Getter:
Returns whether or not the position of the edge labels should be changed during orientation change. | OrientationLayouter | ||
coreLayouter : Layouter
Specifies the core layouter. | AbstractLayoutStage | ||
horizontalOrientation : Boolean [read-only]
Returns whether or not the set orientation is a horizontal orientation, i.e. | OrientationLayouter | ||
mirrorMask : int
Specifies the mirror mask, that defines which orientations this layouter shall mirror. | OrientationLayouter | ||
orientation : int
Specifies the orientation of the layout. | OrientationLayouter |
Method | Defined By | ||
---|---|---|---|
OrientationLayouter(init:Boolean = true)
Instantiates a new OrientationLayouter. | OrientationLayouter | ||
canLayout(graph:LayoutGraph):Boolean [override] | OrientationLayouter | ||
Create and return an insets object that is a geometric transform of the given insets. | OrientationLayouter | ||
Create and return an insets object that is a geometric transform of the given insets. | OrientationLayouter | ||
Create and return a node halo object that is a geometric transform of the given node halo. | OrientationLayouter | ||
Create and return an YDimension object that is a geometric transform of the given size. | OrientationLayouter | ||
doLayout(graph:LayoutGraph):void [override] | OrientationLayouter | ||
equals(o:Object):Boolean | YObject | ||
getClass():Class [override] | OrientationLayouter | ||
hashCode():int | YObject | ||
isOrientationMirrored(orientation:int):Boolean
This method will return whether the layouter will mirror the graph for a given layout orientation. | OrientationLayouter | ||
[static]
Instantiates a new OrientationLayouter. | OrientationLayouter | ||
newOrientationLayouter2(orientation:int):OrientationLayouter [static]
Instantiates a new OrientationLayouter with a given orientation. | OrientationLayouter | ||
[static]
Instantiates a new OrientationLayouter. | OrientationLayouter |
Method | Defined By | ||
---|---|---|---|
canLayoutCore(graph:LayoutGraph):Boolean
Queries the core layouter whether or not the given graph can be laid out. | AbstractLayoutStage | ||
completeOrientationChange(graph:LayoutGraph):void
Method that will be called after the core layouter has been activated. | OrientationLayouter | ||
Transforms a point for the completion phase. | OrientationLayouter | ||
doLayoutCore(graph:LayoutGraph):void
Invokes the layout routine of the core layouter. | AbstractLayoutStage | ||
initAbstractLayoutStage1():void | AbstractLayoutStage | ||
initAbstractLayoutStage2(core:Layouter):void | AbstractLayoutStage | ||
initOrientationLayouter1():void
Initializes this object. | OrientationLayouter | ||
initOrientationLayouter2(orientation:int):void
Initializes this object. | OrientationLayouter | ||
initOrientationLayouter3(coreLayouter:Layouter):void
Initializes this object. | OrientationLayouter | ||
prepareOrientationChange(graph:LayoutGraph):void
Method that will be called before the core layouter gets activated. | OrientationLayouter | ||
Transforms a point for the preparation phase. | OrientationLayouter | ||
Transforms a point for the preparation or completion phase. | OrientationLayouter |
Constant | Defined By | ||
---|---|---|---|
MIRROR_BOTTOM_TO_TOP : int = 4 [static]
Constant that can be used to create the mirror mask, that defines which layout orientations shall be mirrored at their corresponding axis. | OrientationLayouter | ||
MIRROR_LEFT_TO_RIGHT : int = 8 [static]
Constant that can be used to create the mirror mask, that defines which layout orientations shall be mirrored at their corresponding axis. | OrientationLayouter | ||
MIRROR_NONE : int = 0 [static]
Constant that can be used to prevent any mirroring of layout orientations. | OrientationLayouter | ||
MIRROR_RIGHT_TO_LEFT : int = 2 [static]
Constant that can be used to create the mirror mask, that defines which layout orientations shall be mirrored at their corresponding axis. | OrientationLayouter | ||
MIRROR_TOP_TO_BOTTOM : int = 1 [static]
Constant that can be used to create the mirror mask, that defines which layout orientations shall be mirrored at their corresponding axis. | OrientationLayouter |
considerEdgeLabelsEnabled | property |
considerEdgeLabelsEnabled:Boolean
Getter:
Returns whether or not the position of the edge labels should be changed during orientation change.
Default is true
.
true
.
public function get considerEdgeLabelsEnabled():Boolean
public function set considerEdgeLabelsEnabled(value:Boolean):void
horizontalOrientation | property |
horizontalOrientation:Boolean
[read-only] Returns whether or not the set orientation is a horizontal orientation, i.e. one of com.yworks.yfiles.layout.LayoutOrientation.LEFT_TO_RIGHT or com.yworks.yfiles.layout.LayoutOrientation.RIGHT_TO_LEFT.
public function get horizontalOrientation():Boolean
See also
mirrorMask | property |
mirrorMask:int
Specifies the mirror mask, that defines which orientations this layouter shall mirror. Setting a layout orientation can be seen as rotating the graph 90, 180 or 270 degrees. Afterwards the graph can be mirrored at the x-Axis (for horizontal layout orientations) or y-Axis (for vertical layout orientations). Which directions are mirrored can be defined by the given mask.
By default a mirror mask is set, where com.yworks.yfiles.layout.LayoutOrientation.BOTTOM_TO_TOP, will be mirrored at the y-Axis.
public function get mirrorMask():int
public function set mirrorMask(value:int):void
See also
orientation | property |
orientation:int
Specifies the orientation of the layout. By default com.yworks.yfiles.layout.LayoutOrientation.TOP_TO_BOTTOM is set.
public function get orientation():int
public function set orientation(value:int):void
See also
OrientationLayouter | () | Constructor |
public function OrientationLayouter(init:Boolean = true)
Instantiates a new OrientationLayouter.
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.
|
canLayout | () | method |
override public function canLayout(graph:LayoutGraph):Boolean
Parameters
graph:LayoutGraph |
Boolean |
completeOrientationChange | () | method |
protected function completeOrientationChange(graph:LayoutGraph):void
Method that will be called after the core layouter has been activated. It performs the inverse coordinate transformation that has been applied to the layout by method prepareOrientationChange().
Parameters
graph:LayoutGraph |
See also
completeTransform | () | method |
protected function completeTransform(p:YPoint):YPoint
Transforms a point for the completion phase.
Parameters
p:YPoint |
YPoint |
See also
createOrientedInsets | () | method |
public function createOrientedInsets(insets:Insets):YInsets
Create and return an insets object that is a geometric transform of the given insets. The transform will correspond to the currently set orientation.
Parameters
insets:Insets |
YInsets |
createOrientedInsets2 | () | method |
public function createOrientedInsets2(insets:YInsets):YInsets
Create and return an insets object that is a geometric transform of the given insets. The transform will correspond to the currently set orientation.
Parameters
insets:YInsets |
YInsets |
createOrientedNodeHalo | () | method |
public function createOrientedNodeHalo(halo:NodeHalo):NodeHalo
Create and return a node halo object that is a geometric transform of the given node halo. The transform will correspond to the currently set orientation.
Parameters
halo:NodeHalo |
NodeHalo |
createOrientedNodeSize | () | method |
public function createOrientedNodeSize(nodeSize:YDimension):YDimension
Create and return an YDimension object that is a geometric transform of the given size. The transform will correspond to the currently set orientation.
Parameters
nodeSize:YDimension |
YDimension |
doLayout | () | method |
getClass | () | method |
override public function getClass():Class
ReturnsClass |
initOrientationLayouter1 | () | method |
protected final function initOrientationLayouter1():void
Initializes this object. See the documentation of the corresponding factory method newOrientationLayouter1()
for details.
See also
initOrientationLayouter2 | () | method |
protected final function initOrientationLayouter2(orientation:int):void
Initializes this object. See the documentation of the corresponding factory method newOrientationLayouter2()
for details.
Parameters
orientation:int |
See also
initOrientationLayouter3 | () | method |
protected final function initOrientationLayouter3(coreLayouter:Layouter):void
Initializes this object. See the documentation of the corresponding factory method newOrientationLayouter3()
for details.
Parameters
coreLayouter:Layouter |
See also
isOrientationMirrored | () | method |
public function isOrientationMirrored(orientation:int):Boolean
This method will return whether the layouter will mirror the graph for a given layout orientation.
Parameters
orientation:int — the layout orientation, for which to check the mirror state.
|
Boolean —
|
newOrientationLayouter1 | () | method |
public static function newOrientationLayouter1():OrientationLayouter
Instantiates a new OrientationLayouter.
ReturnsOrientationLayouter |
newOrientationLayouter2 | () | method |
public static function newOrientationLayouter2(orientation:int):OrientationLayouter
Instantiates a new OrientationLayouter with a given orientation.
Parameters
orientation:int |
OrientationLayouter |
See also
newOrientationLayouter3 | () | method |
public static function newOrientationLayouter3(coreLayouter:Layouter):OrientationLayouter
Instantiates a new OrientationLayouter. the core layout routine will be delegated to the given layouter.
Parameters
coreLayouter:Layouter |
OrientationLayouter |
prepareOrientationChange | () | method |
protected function prepareOrientationChange(graph:LayoutGraph):void
Method that will be called before the core layouter gets activated. It prepares the layout for the desired orientation by rotating/mirroring the coordinates and bounds of the graph layout such that the core layouter can perform the layout in the canonical TOP_TO_BOTTOM manner.
Parameters
graph:LayoutGraph |
prepareTransform | () | method |
protected function prepareTransform(p:YPoint):YPoint
Transforms a point for the preparation phase.
Parameters
p:YPoint |
YPoint |
See also
transform | () | method |
protected function transform(p:YPoint, prepare:Boolean):YPoint
Transforms a point for the preparation or completion phase.
Parameters
p:YPoint | |
prepare:Boolean — if true then the transformation is for the preparation phase, otherwise for the completion phase.
|
YPoint |
See also
MIRROR_BOTTOM_TO_TOP | Constant |
public static const MIRROR_BOTTOM_TO_TOP:int = 4
Constant that can be used to create the mirror mask, that defines which layout orientations shall be mirrored at their corresponding axis. Adding this constant to the mask will result in mirror the y-axis of the graph for layout orientation LayoutOrientation.BOTTOM_TO_TOP.
MIRROR_LEFT_TO_RIGHT | Constant |
public static const MIRROR_LEFT_TO_RIGHT:int = 8
Constant that can be used to create the mirror mask, that defines which layout orientations shall be mirrored at their corresponding axis. Adding this constant to the mask will result in mirror the x-axis of the graph for layout orientation LayoutOrientation.LEFT_TO_RIGHT.
MIRROR_NONE | Constant |
public static const MIRROR_NONE:int = 0
Constant that can be used to prevent any mirroring of layout orientations.
MIRROR_RIGHT_TO_LEFT | Constant |
public static const MIRROR_RIGHT_TO_LEFT:int = 2
Constant that can be used to create the mirror mask, that defines which layout orientations shall be mirrored at their corresponding axis. Adding this constant to the mask will result in mirror the x-axis of the graph for layout orientation LayoutOrientation.RIGHT_TO_LEFT.
MIRROR_TOP_TO_BOTTOM | Constant |
public static const MIRROR_TOP_TO_BOTTOM:int = 1
Constant that can be used to create the mirror mask, that defines which layout orientations shall be mirrored at their corresponding axis. Adding this constant to the mask will result in mirror the y-axis of the graph for layout orientation LayoutOrientation.TOP_TO_BOTTOM.