Package com.mxgraph.view
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 com.mxgraph.util.mxEventSource
mxEventSource.mxIEventListener
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected boolean
Specifies if newly added cells should be resized to match the size of their existing siblings.protected mxEventSource.mxIEventListener
protected boolean
Optional string that specifies the value of the attribute to be passed to mxCell.is to check if the rule applies to a cell.protected mxGraph
Defines the type of the source or target terminal.protected boolean
Optional string that specifies the attributename to be passed to mxCell.is to check if the rule applies to a cell.protected boolean
Specifies if resizing of swimlanes should be handled.protected mxEventSource.mxIEventListener
Fields inherited from class com.mxgraph.util.mxEventSource
eventListeners, eventsEnabled, eventSource
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
cellsAdded
(Object[] cells) Called if any cells have been added.protected void
cellsResized
(Object[] cells) Called if any cells have been resizes.void
destroy()
getGraph()
boolean
protected boolean
isCellHorizontal
(Object cell) Returns true if the given cell is horizontal.boolean
boolean
boolean
protected boolean
isSwimlaneIgnored
(Object swimlane) Returns true if the given swimlane should be ignored.protected void
resizeSwimlane
(Object swimlane, double w, double h, boolean parentHorizontal) Sets the width or height of the given swimlane to the given value depending on. void
setAddEnabled
(boolean value) void
setEnabled
(boolean value) void
void
setHorizontal
(boolean value) void
setResizeEnabled
(boolean value) protected void
swimlaneAdded
(Object swimlane) Called for each swimlane which has been added.Methods inherited from class com.mxgraph.util.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()
-