Package | com.yworks.graph.model |
Class | public class LayoutExecutor |
Inheritance | LayoutExecutor Object |
Layouter
, and possibly
animate the result.
Property | Defined By | ||
---|---|---|---|
animateViewport : Boolean
Gets or sets a value indicating whether to animate the viewport. | LayoutExecutor | ||
configureTableNodeLayout : Boolean
Whether to automatically perform calls to TableLayoutConfigurator.prepareAll()
and TableLayoutConfigurator.restoreAll() in order to layout table nodes. | LayoutExecutor | ||
duration : int
Gets or sets the duration of the animation. | LayoutExecutor | ||
easingFunction : Function
Gets or sets the easing function that should be used for the animation. | LayoutExecutor | ||
finishHandler : Function
Gets or sets the function that will be executed when this instance has finished its work. | LayoutExecutor | ||
graph : IGraph [read-only]
Gets the graph this instance is working on. | LayoutExecutor | ||
tableLayoutConfigurator : TableLayoutConfigurator [read-only]
The table layout configurator that is used if configureTableNodeLayout is enabled. | LayoutExecutor | ||
targetBoundsInsets : IRectangle
Gets or sets the target bounds insets that will be used to calculate the target viewport. | LayoutExecutor | ||
updateContentRect : Boolean
Gets or sets a value indicating whether the content rectangle property of the
canvas should be updated upon completion. | LayoutExecutor |
Property | Defined By | ||
---|---|---|---|
canvas : GraphCanvasComponent [read-only]
Gets the canvas this instance has been created for. | LayoutExecutor |
Method | Defined By | ||
---|---|---|---|
LayoutExecutor(canvas:GraphCanvasComponent, layouter:Layouter, graph:IGraph = null, duration:int = 0, handler:Function = null, animateViewPort:Boolean = false, easingFunction:Function = null, targetBoundsInsets:IRectangle = null, updateContentRect:Boolean = false) Initializes a new instance of the LayoutExecutor class. | LayoutExecutor | ||
start():void
Actually starts the process. | LayoutExecutor |
Method | Defined By | ||
---|---|---|---|
Factory method that creates and configures the
LayoutMorpherWrapper that will be used by this
instance after the layout has been calculated. | LayoutExecutor | ||
Create a new instance of TableLayoutConfigurator that is used if
configureTableNodeLayout is enabled. | LayoutExecutor | ||
prepareTableLayout():void
Set up the TableLayoutConfigurator for an actual layout run. | LayoutExecutor | ||
restoreTableLayout():void
Writes the table layout information provided through TableLayoutConfigurator
back to all tables. | LayoutExecutor |
animateViewport | property |
animateViewport:Boolean
Gets or sets a value indicating whether to animate the viewport.
The default value is false
.
public function get animateViewport():Boolean
public function set animateViewport(value:Boolean):void
canvas | property |
canvas:GraphCanvasComponent
[read-only] Gets the canvas this instance has been created for.
protected function get canvas():GraphCanvasComponent
configureTableNodeLayout | property |
configureTableNodeLayout:Boolean
Whether to automatically perform calls to TableLayoutConfigurator.prepareAll()
and TableLayoutConfigurator.restoreAll()
in order to layout table nodes.
The default value is true
.
public function get configureTableNodeLayout():Boolean
public function set configureTableNodeLayout(value:Boolean):void
duration | property |
duration:int
Gets or sets the duration of the animation.
A value smaller than 0
will prevent the animation from happening.
The default value is 0
.
public function get duration():int
public function set duration(value:int):void
easingFunction | property |
easingFunction:Function
Gets or sets the easing function that should be used for the animation.
The Flex framework provides multiple easing functions in the mx.effects.easing
package.
The default mx.effects.easing.Linear#easeNone()
function doesn't apply an easing effect at all.
The default value is mx.effects.easing.Linear#easeNone()
.
public function get easingFunction():Function
public function set easingFunction(value:Function):void
finishHandler | property |
finishHandler:Function
Gets or sets the function that will be executed when this instance has finished its work.
The function that will be called upon completion or upon an exception.
The function must have the following signature: function( event:Event ):void
The default value is null
.
public function get finishHandler():Function
public function set finishHandler(value:Function):void
graph | property |
graph:IGraph
[read-only] Gets the graph this instance is working on.
public function get graph():IGraph
tableLayoutConfigurator | property |
tableLayoutConfigurator:TableLayoutConfigurator
[read-only]
The table layout configurator that is used if configureTableNodeLayout
is enabled.
The TableLayoutConfigurator
is created upon first access by
createTableLayoutConfigurator()
.
public function get tableLayoutConfigurator():TableLayoutConfigurator
See also
targetBoundsInsets | property |
targetBoundsInsets:IRectangle
Gets or sets the target bounds insets that will be used to calculate the target viewport.
The default value is Zero insets
.
public function get targetBoundsInsets():IRectangle
public function set targetBoundsInsets(value:IRectangle):void
updateContentRect | property |
updateContentRect:Boolean
Gets or sets a value indicating whether the content rectangle property of the
canvas
should be updated upon completion.
The default value is false
.
public function get updateContentRect():Boolean
public function set updateContentRect(value:Boolean):void
LayoutExecutor | () | Constructor |
public function LayoutExecutor(canvas:GraphCanvasComponent, layouter:Layouter, graph:IGraph = null, duration:int = 0, handler:Function = null, animateViewPort:Boolean = false, easingFunction:Function = null, targetBoundsInsets:IRectangle = null, updateContentRect:Boolean = false)
Initializes a new instance of the LayoutExecutor
class.
canvas:GraphCanvasComponent — The control which will be animated.
| |
layouter:Layouter — The layouter to use.
| |
graph:IGraph (default = null ) — The graph to layout. If null ,
the IGraph instance provided by the canvas ' graph
parameter will be used.
| |
duration:int (default = 0 ) — The duration of the animation. If set to 0 , the layout
is not animated.
| |
handler:Function (default = null ) — The finishHandler , a function which is called after the
layout is applied. If animation is enabled the function will be called after the
animation is finished.
| |
animateViewPort:Boolean (default = false ) — Whether to animate the view port if the graph cannot be displayed
in the current view port.
| |
easingFunction:Function (default = null ) — An easing function for the animation. If none is provided the
animation is played linearly.
| |
targetBoundsInsets:IRectangle (default = null ) — Insets for the content rect after the layout. Default is 10,10,10,10.
| |
updateContentRect:Boolean (default = false ) — Whether to update the content rectangle after the layout
|
createMorpher | () | method |
protected function createMorpher():LayoutMorpherWrapper
Factory method that creates and configures the
LayoutMorpherWrapper
that will be used by this
instance after the layout has been calculated.
LayoutMorpherWrapper — The morpher to use after the layout.
|
createTableLayoutConfigurator | () | method |
protected function createTableLayoutConfigurator():TableLayoutConfigurator
Create a new instance of TableLayoutConfigurator
that is used if
configureTableNodeLayout
is enabled.
This method is called upon first access to tableLayoutConfigurator
.
TableLayoutConfigurator — A new instance of TableLayoutConfigurator .
|
prepareTableLayout | () | method |
protected function prepareTableLayout():void
Set up the TableLayoutConfigurator
for an actual layout run.
This implementation configures TableLayoutConfigurator.horizontalLayout
according to the CanonicMultiStageLayouter.layoutOrientation
and calls
TableLayoutConfigurator.prepareAll()
restoreTableLayout | () | method |
protected function restoreTableLayout():void
Writes the table layout information provided through TableLayoutConfigurator
back to all tables.
This method is only called when the layout is not animated.
See also
start | () | method |
public function start():void
Actually starts the process.