mxSwimlaneManager

Manager for swimlanes and nested swimlanes that sets the size of newly added swimlanes to that of their siblings, and propagates changes to the size of a swimlane to its siblings, if <siblings> is true, and its ancestors, if <bubbling> is true.

Summary
mxSwimlaneManagerManager for swimlanes and nested swimlanes that sets the size of newly added swimlanes to that of their siblings, and propagates changes to the size of a swimlane to its siblings, if <siblings> is true, and its ancestors, if <bubbling> is true.
Functions
mxSwimlaneManagerConstructs a new swimlane manager for the given graph.
Variables
graphReference to the enclosing mxGraph.
enabledSpecifies if event handling is enabled.
horizontalSpecifies the orientation of the swimlanes.
addEnabledSpecifies if newly added cells should be resized to match the size of their existing siblings.
resizeEnabledSpecifies if resizing of swimlanes should be handled.
moveHandlerHolds the function that handles the move event.
moveHandlerHolds the function that handles the move event.
Functions
isEnabledReturns true if events are handled.
setEnabledEnables or disables event handling.
isHorizontalReturns horizontal.
setHorizontalSets horizontal.
isAddEnabledReturns addEnabled.
setAddEnabledSets addEnabled.
isResizeEnabledReturns resizeEnabled.
setResizeEnabledSets resizeEnabled.
getGraphReturns the graph that this manager operates on.
setGraphSets the graph that the manager operates on.
isSwimlaneIgnoredReturns true if the given swimlane should be ignored.
isCellHorizontalReturns true if the given cell is horizontal.
cellsAddedCalled if any cells have been added.
swimlaneAddedUpdates the size of the given swimlane to match that of any existing siblings swimlanes.
cellsResizedCalled if any cells have been resizes.
resizeSwimlaneCalled from cellsResized for all swimlanes that are not ignored to update the size of the siblings and the size of the parent swimlanes, recursively, if <bubbling> is true.
destroyRemoves all handlers from the graph and deletes the reference to it.

Functions

mxSwimlaneManager

function mxSwimlaneManager(graph,
horizontal,
addEnabled,
resizeEnabled)

Constructs a new swimlane manager for the given graph.

Arguments

graphReference to the enclosing graph.

Variables

graph

mxSwimlaneManager.prototype.graph

Reference to the enclosing mxGraph.

enabled

mxSwimlaneManager.prototype.enabled

Specifies if event handling is enabled.  Default is true.

horizontal

mxSwimlaneManager.prototype.horizontal

Specifies the orientation of the swimlanes.  Default is true.

addEnabled

mxSwimlaneManager.prototype.addEnabled

Specifies if newly added cells should be resized to match the size of their existing siblings.  Default is true.

resizeEnabled

mxSwimlaneManager.prototype.resizeEnabled

Specifies if resizing of swimlanes should be handled.  Default is true.

moveHandler

Holds the function that handles the move event.

moveHandler

Holds the function that handles the move event.

Functions

isEnabled

mxSwimlaneManager.prototype.isEnabled = function()

Returns true if events are handled.  This implementation returns enabled.

setEnabled

mxSwimlaneManager.prototype.setEnabled = function(value)

Enables or disables event handling.  This implementation updates enabled.

Parameters

enabledBoolean that specifies the new enabled state.

isHorizontal

mxSwimlaneManager.prototype.isHorizontal = function()

Returns horizontal.

setHorizontal

mxSwimlaneManager.prototype.setHorizontal = function(value)

Sets horizontal.

isAddEnabled

mxSwimlaneManager.prototype.isAddEnabled = function()

Returns addEnabled.

setAddEnabled

mxSwimlaneManager.prototype.setAddEnabled = function(value)

Sets addEnabled.

isResizeEnabled

mxSwimlaneManager.prototype.isResizeEnabled = function()

Returns resizeEnabled.

setResizeEnabled

mxSwimlaneManager.prototype.setResizeEnabled = function(value)

Sets resizeEnabled.

getGraph

mxSwimlaneManager.prototype.getGraph = function()

Returns the graph that this manager operates on.

setGraph

mxSwimlaneManager.prototype.setGraph = function(graph)

Sets the graph that the manager operates on.

isSwimlaneIgnored

mxSwimlaneManager.prototype.isSwimlaneIgnored = function(swimlane)

Returns true if the given swimlane should be ignored.

isCellHorizontal

mxSwimlaneManager.prototype.isCellHorizontal = function(cell)

Returns true if the given cell is horizontal.  If the given cell is not a swimlane, then the global orientation is returned.

cellsAdded

mxSwimlaneManager.prototype.cellsAdded = function(cells)

Called if any cells have been added.

Parameters

cellArray of mxCells that have been added.

swimlaneAdded

mxSwimlaneManager.prototype.swimlaneAdded = function(swimlane)

Updates the size of the given swimlane to match that of any existing siblings swimlanes.

Parameters

swimlanemxCell that represents the new swimlane.

cellsResized

mxSwimlaneManager.prototype.cellsResized = function(cells)

Called if any cells have been resizes.  Calls <swimlaneResized> for all swimlanes where isSwimlaneIgnored returns false.

Parameters

cellsArray of mxCells whose size was changed.

resizeSwimlane

mxSwimlaneManager.prototype.resizeSwimlane = function(swimlane,
w,
h,
parentHorizontal)

Called from cellsResized for all swimlanes that are not ignored to update the size of the siblings and the size of the parent swimlanes, recursively, if <bubbling> is true.

Parameters

swimlanemxCell whose size has changed.

destroy

mxSwimlaneManager.prototype.destroy = function()

Removes all handlers from the graph and deletes the reference to it.

function mxSwimlaneManager(graph,
horizontal,
addEnabled,
resizeEnabled)
Constructs a new swimlane manager for the given graph.
mxSwimlaneManager.prototype.graph
Reference to the enclosing mxGraph.
Extends mxEventSource to implement a graph component for the browser.
mxSwimlaneManager.prototype.enabled
Specifies if event handling is enabled.
mxSwimlaneManager.prototype.horizontal
Specifies the orientation of the swimlanes.
mxSwimlaneManager.prototype.addEnabled
Specifies if newly added cells should be resized to match the size of their existing siblings.
mxSwimlaneManager.prototype.resizeEnabled
Specifies if resizing of swimlanes should be handled.
mxSwimlaneManager.prototype.isEnabled = function()
Returns true if events are handled.
mxSwimlaneManager.prototype.setEnabled = function(value)
Enables or disables event handling.
mxSwimlaneManager.prototype.isHorizontal = function()
Returns horizontal.
mxSwimlaneManager.prototype.setHorizontal = function(value)
Sets horizontal.
mxSwimlaneManager.prototype.isAddEnabled = function()
Returns addEnabled.
mxSwimlaneManager.prototype.setAddEnabled = function(value)
Sets addEnabled.
mxSwimlaneManager.prototype.isResizeEnabled = function()
Returns resizeEnabled.
mxSwimlaneManager.prototype.setResizeEnabled = function(value)
Sets resizeEnabled.
mxSwimlaneManager.prototype.getGraph = function()
Returns the graph that this manager operates on.
mxSwimlaneManager.prototype.setGraph = function(graph)
Sets the graph that the manager operates on.
mxSwimlaneManager.prototype.isSwimlaneIgnored = function(swimlane)
Returns true if the given swimlane should be ignored.
mxSwimlaneManager.prototype.isCellHorizontal = function(cell)
Returns true if the given cell is horizontal.
mxSwimlaneManager.prototype.cellsAdded = function(cells)
Called if any cells have been added.
mxSwimlaneManager.prototype.swimlaneAdded = function(swimlane)
Updates the size of the given swimlane to match that of any existing siblings swimlanes.
mxSwimlaneManager.prototype.cellsResized = function(cells)
Called if any cells have been resizes.
mxSwimlaneManager.prototype.resizeSwimlane = function(swimlane,
w,
h,
parentHorizontal)
Called from cellsResized for all swimlanes that are not ignored to update the size of the siblings and the size of the parent swimlanes, recursively, if bubbling is true.
mxSwimlaneManager.prototype.destroy = function()
Removes all handlers from the graph and deletes the reference to it.
Cells are the elements of the graph model.
Close