Class mxSwimlaneManager
java.lang.Object
com.mxgraph.util.mxEventSource
com.mxgraph.view.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.
-
Nested Class Summary
Nested classes/interfaces inherited from class mxEventSource
mxEventSource.mxIEventListener -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanSpecifies if newly added cells should be resized to match the size of their existing siblings.protected mxEventSource.mxIEventListenerprotected booleanOptional string that specifies the value of the attribute to be passed to mxCell.is to check if the rule applies to a cell.protected mxGraphDefines the type of the source or target terminal.protected booleanOptional string that specifies the attributename to be passed to mxCell.is to check if the rule applies to a cell.protected booleanSpecifies if resizing of swimlanes should be handled.protected mxEventSource.mxIEventListenerFields inherited from class mxEventSource
eventListeners, eventsEnabled, eventSource -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcellsAdded(Object[] cells) Called if any cells have been added.protected voidcellsResized(Object[] cells) Called if any cells have been resizes.voiddestroy()getGraph()booleanprotected booleanisCellHorizontal(Object cell) Returns true if the given cell is horizontal.booleanbooleanbooleanprotected booleanisSwimlaneIgnored(Object swimlane) Returns true if the given swimlane should be ignored.protected voidresizeSwimlane(Object swimlane, double w, double h, boolean parentHorizontal) Sets the width or height of the given swimlane to the given value depending on. voidsetAddEnabled(boolean value) voidsetEnabled(boolean value) voidvoidsetHorizontal(boolean value) voidsetResizeEnabled(boolean value) protected voidswimlaneAdded(Object swimlane) Called for each swimlane which has been added.Methods inherited from class mxEventSource
addListener, fireEvent, fireEvent, getEventSource, isEventsEnabled, removeListener, removeListener, setEventsEnabled, setEventSource
-
Field Details
-
graph
Defines the type of the source or target terminal. The type is a string passed to mxCell.is to check if the rule applies to a cell. -
enabled
protected boolean enabledOptional string that specifies the value of the attribute to be passed to mxCell.is to check if the rule applies to a cell. -
horizontal
protected boolean horizontalOptional string that specifies the attributename to be passed to mxCell.is to check if the rule applies to a cell. -
addEnabled
protected boolean addEnabledSpecifies if newly added cells should be resized to match the size of their existing siblings. Default is true. -
resizeEnabled
protected boolean resizeEnabledSpecifies if resizing of swimlanes should be handled. Default is true. -
addHandler
-
resizeHandler
-
-
Constructor Details
-
mxSwimlaneManager
-
-
Method Details
-
isEnabled
public boolean isEnabled()- Returns:
- the enabled
-
setEnabled
public void setEnabled(boolean value) - Parameters:
value- the enabled to set
-
isHorizontal
public boolean isHorizontal()- Returns:
- the bubbling
-
setHorizontal
public void setHorizontal(boolean value) - Parameters:
value- the bubbling to set
-
isAddEnabled
public boolean isAddEnabled()- Returns:
- the addEnabled
-
setAddEnabled
public void setAddEnabled(boolean value) - Parameters:
value- the addEnabled to set
-
isResizeEnabled
public boolean isResizeEnabled()- Returns:
- the resizeEnabled
-
setResizeEnabled
public void setResizeEnabled(boolean value) - Parameters:
value- the resizeEnabled to set
-
getGraph
- Returns:
- the graph
-
setGraph
- Parameters:
graph- the graph to set
-
isSwimlaneIgnored
Returns true if the given swimlane should be ignored. -
isCellHorizontal
Returns true if the given cell is horizontal. If the given cell is not a swimlane, then thevalue is returned. -
cellsAdded
Called if any cells have been added. Calls swimlaneAdded for all swimlanes where isSwimlaneIgnored returns false. -
swimlaneAdded
Called for each swimlane which has been added. This finds a reference sibling swimlane and applies its size to the newly added swimlane. If no sibling can be found then the parent swimlane is resized so that the new swimlane fits into the parent swimlane. -
cellsResized
Called if any cells have been resizes. Calls swimlaneResized for all swimlanes where isSwimlaneIgnored returns false. -
resizeSwimlane
Sets the width or height of the given swimlane to the given value depending on. If is true, then the width is set, otherwise, the height is set. -
destroy
public void destroy()
-