Class mxSwimlaneManager


  • public class mxSwimlaneManager
    extends mxEventSource
    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.
    • Field Detail

      • graph

        protected mxGraph 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 enabled
        Optional 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 horizontal
        Optional string that specifies the attributename to be passed to mxCell.is to check if the rule applies to a cell.
      • addEnabled

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

        protected boolean resizeEnabled
        Specifies if resizing of swimlanes should be handled. Default is true.
    • Constructor Detail

      • mxSwimlaneManager

        public mxSwimlaneManager​(mxGraph graph)
    • Method Detail

      • 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

        public mxGraph getGraph()
        Returns:
        the graph
      • setGraph

        public void setGraph​(mxGraph graph)
        Parameters:
        graph - the graph to set
      • isSwimlaneIgnored

        protected boolean isSwimlaneIgnored​(java.lang.Object swimlane)
        Returns true if the given swimlane should be ignored.
      • isCellHorizontal

        protected boolean isCellHorizontal​(java.lang.Object cell)
        Returns true if the given cell is horizontal. If the given cell is not a swimlane, then the value is returned.
      • cellsAdded

        protected void cellsAdded​(java.lang.Object[] cells)
        Called if any cells have been added. Calls swimlaneAdded for all swimlanes where isSwimlaneIgnored returns false.
      • swimlaneAdded

        protected void swimlaneAdded​(java.lang.Object swimlane)
        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

        protected void cellsResized​(java.lang.Object[] cells)
        Called if any cells have been resizes. Calls swimlaneResized for all swimlanes where isSwimlaneIgnored returns false.
      • resizeSwimlane

        protected void resizeSwimlane​(java.lang.Object swimlane,
                                      double w,
                                      double h,
                                      boolean parentHorizontal)
        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()