Package | com.yworks.yfiles.layout |
Class | public class LayoutMultiplexer |
Inheritance | LayoutMultiplexer AbstractLayoutStage YObject Object |
If a data provider is registered with the given graph using the look-up key LAYOUTER_DPKEY it is used to retrieve the com.yworks.yfiles.layout.Layouter objects that are stored for the graph's nodes. If no such data provider is registered, this layout stage's core layouter (if any) is used for layout calculation of all nodes. Note that the first non-null
Layouter retrieved from the data provider is used for all nodes.
The main purpose of this class is to enable the use of individual layout algorithms for components (when used as the core layouter of class com.yworks.yfiles.layout.ComponentLayouter) or for the contents of group nodes (when used as the core layouter of class com.yworks.yfiles.layout.grouping.RecursiveGroupLayouter).
See also
Method | Defined By | ||
---|---|---|---|
LayoutMultiplexer(init:Boolean = true) | LayoutMultiplexer | ||
canLayout(graph:LayoutGraph):Boolean [override] | LayoutMultiplexer | ||
doLayout(graph:LayoutGraph):void [override] | LayoutMultiplexer | ||
equals(o:Object):Boolean | YObject | ||
getClass():Class [override] | LayoutMultiplexer | ||
hashCode():int | YObject | ||
[static] | LayoutMultiplexer |
Method | Defined By | ||
---|---|---|---|
canLayoutCore(graph:LayoutGraph):Boolean
Queries the core layouter whether or not the given graph can be laid out. | AbstractLayoutStage | ||
doLayoutCore(graph:LayoutGraph):void
Invokes the layout routine of the core layouter. | AbstractLayoutStage | ||
Returns the core layout algorithm associated with the nodes contained in the given graph. | LayoutMultiplexer | ||
initAbstractLayoutStage1():void | AbstractLayoutStage | ||
initAbstractLayoutStage2(core:Layouter):void | AbstractLayoutStage | ||
initLayoutMultiplexer():void | LayoutMultiplexer |
Constant | Defined By | ||
---|---|---|---|
LAYOUTER_DPKEY : Object = y.layout.LayoutMultiplexer.LAYOUTER_DPKEY [static]
Look-up key used to register a com.yworks.yfiles.base.DataProvider that provides a com.yworks.yfiles.layout.Layouter object for each node of a graph. | LayoutMultiplexer |
LayoutMultiplexer | () | Constructor |
public function LayoutMultiplexer(init:Boolean = true)
init:Boolean (default = true )
|
canLayout | () | method |
override public function canLayout(graph:LayoutGraph):Boolean
Parameters
graph:LayoutGraph |
Boolean |
doLayout | () | method |
getClass | () | method |
override public function getClass():Class
ReturnsClass |
getCoreLayouter | () | method |
protected function getCoreLayouter(graph:LayoutGraph):Layouter
Returns the core layout algorithm associated with the nodes contained in the given graph. The default implementation looks up the layout algorithm in the data provider registered with the key LAYOUTER_DPKEY .
Parameters
graph:LayoutGraph |
Layouter |
See also
initLayoutMultiplexer | () | method |
protected final function initLayoutMultiplexer():void
newLayoutMultiplexer | () | method |
LAYOUTER_DPKEY | Constant |
public static const LAYOUTER_DPKEY:Object = y.layout.LayoutMultiplexer.LAYOUTER_DPKEY
Look-up key used to register a com.yworks.yfiles.base.DataProvider that provides a com.yworks.yfiles.layout.Layouter object for each node of a graph.
See also