Class BpmnGraph


  • public class BpmnGraph
    extends com.mxgraph.view.mxGraph
    Graph for BPMN models.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      protected static class  BpmnGraph.BpmnLayoutManager
      The layout manager.
      • Nested classes/interfaces inherited from class com.mxgraph.view.mxGraph

        com.mxgraph.view.mxGraph.mxICellVisitor
      • Nested classes/interfaces inherited from class com.mxgraph.util.mxEventSource

        com.mxgraph.util.mxEventSource.mxIEventListener
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected LRU<java.lang.String,​VElement> elementidcache
      Element ID cache.
      protected BpmnGraph.BpmnLayoutManager layoutmanager
      The layout manager.
      protected ModelContainer modelcontainer
      The model container.
      • Fields inherited from class com.mxgraph.view.mxGraph

        allowDanglingEdges, allowLoops, allowNegativeCoordinates, alternateEdgeStyle, autoOrigin, autoSizeCells, border, cellsBendable, cellsCloneable, cellsDeletable, cellsDisconnectable, cellsEditable, cellsLocked, cellsMovable, cellsResizable, cellsSelectable, changesRepaintThreshold, changeSupport, cloneInvalidEdges, collapseToPreferredSize, connectableEdges, constrainChildren, defaultLoopStyle, defaultOverlap, defaultParent, disconnectOnMove, dropEnabled, edgeLabelsMovable, enabled, extendParents, extendParentsOnAdd, fullRepaintHandler, graphModelChangeHandler, gridEnabled, gridSize, htmlLabels, imageBundles, keepEdgesInBackground, keepEdgesInForeground, labelsClipped, labelsVisible, maximumGraphBounds, minimumGraphSize, model, multigraph, multiplicities, origin, portsEnabled, resetEdgesOnConnect, resetEdgesOnMove, resetEdgesOnResize, resetViewOnRootChange, selectionModel, splitEnabled, stylesheet, swimlaneNesting, updateOriginHandler, VERSION, vertexLabelsMovable, view
      • Fields inherited from class com.mxgraph.util.mxEventSource

        eventListeners, eventsEnabled, eventSource
    • Constructor Summary

      Constructors 
      Constructor Description
      BpmnGraph​(ModelContainer container, com.mxgraph.view.mxStylesheet sheet)
      Creates the graph.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void activate()  
      void deactivate()  
      void delayedRefreshCellView​(com.mxgraph.model.mxICell cell)
      Refreshes the view for a cell later.
      protected VElement findElementById​(com.mxgraph.model.mxICell startelement, java.lang.String id)  
      java.lang.String getEdgeValidationError​(java.lang.Object edge, java.lang.Object source, java.lang.Object target)
      Returns the validation error message to be displayed when inserting or changing an edges' connectivity.
      ModelContainer getModelContainer()
      Gets the model container.
      java.lang.String getToolTipForCell​(java.lang.Object cell)
      Gets the tool tip for a cell.
      VElement getVisualElementById​(com.mxgraph.model.mxICell startelement, java.lang.String id)
      Gets a visual element by BPMN id.
      VElement getVisualElementById​(java.lang.String id)
      Gets a visual element by BPMN id.
      boolean isCellFoldable​(java.lang.Object cell, boolean collapse)
      Returns true if the given cell is expandable.
      boolean isCellVisible​(java.lang.Object cell)  
      boolean isValidDropTarget​(java.lang.Object cell, java.lang.Object[] cells)
      Returns true if the given cell is a valid drop target for the specified cells.
      void refreshCellView​(com.mxgraph.model.mxICell cell)
      Refreshes the view for a cell.
      • Methods inherited from class com.mxgraph.view.mxGraph

        addAllEdges, addCell, addCell, addCell, addCells, addCells, addCells, addCells, addEdge, addImageBundle, addPropertyChangeListener, addPropertyChangeListener, addSelectionCell, addSelectionCells, alignCells, alignCells, alignCells, cellConnected, cellDrawn, cellLabelChanged, cellsAdded, cellsAdded, cellsFolded, cellsFolded, cellSizeUpdated, cellsMoved, cellsOrdered, cellsRemoved, cellsResized, cellsToggled, clearSelection, cloneCells, cloneCells, connectCell, connectCell, constrainChild, convertValueToString, createEdge, createGraphView, createGroupCell, createSelectionModel, createStylesheet, createVertex, createVertex, disconnectGraph, drawCell, drawGraph, drawState, enterGroup, enterGroup, exitGroup, extendParent, findTreeRoots, findTreeRoots, findTreeRoots, flipEdge, foldCells, foldCells, foldCells, foldCells, getAllConnectionConstraints, getAllEdges, getAlternateEdgeStyle, getBorder, getBoundingBox, getBoundingBox, getBoundingBox, getBoundingBoxFromGeometry, getBoundsForCells, getBoundsForGroup, getCellBounds, getCellBounds, getCellBounds, getCellBounds, getCellContainmentArea, getCellGeometry, getCellsBeyond, getCellsForGroup, getCellStyle, getCellValidationError, getChangesRepaintThreshold, getChildCells, getChildCells, getChildEdges, getChildOffsetForCell, getChildVertices, getCloneableCells, getConnectionConstraint, getConnectionPoint, getConnections, getConnections, getConnections, getCurrentRoot, getDefaultLoopStyle, getDefaultOverlap, getDefaultParent, getDeletableCells, getDropTarget, getEdges, getEdges, getEdges, getEdges, getEdgesBetween, getEdgesBetween, getFoldableCells, getGraphBounds, getGridSize, getImage, getImageBundles, getImageBundles, getImageFromBundles, getIncomingEdges, getIncomingEdges, getLabel, getLinkForCell, getMaximumGraphBounds, getMinimumGraphSize, getModel, getMovableCells, getMultiplicities, getOpposites, getOpposites, getOrigin, getOutgoingEdges, getOutgoingEdges, getOverlap, getPaintBounds, getPreferredSizeForCell, getRemovedCellsForChanges, getSelectionCell, getSelectionCells, getSelectionCellsForChanges, getSelectionCount, getSelectionModel, getStartSize, getStylesheet, getTargetForCell, getTerminalForPort, getTranslateForRoot, getView, graphModelChanged, groupCells, groupCells, groupCells, groupCells, home, insertEdge, insertEdge, insertVertex, insertVertex, insertVertex, isAllowDanglingEdges, isAllowLoops, isAllowNegativeCoordinates, isAllowOverlapParent, isAutoOrigin, isAutoSizeCell, isAutoSizeCells, isCellBendable, isCellCloneable, isCellCollapsed, isCellConnectable, isCellDeletable, isCellDisconnectable, isCellEditable, isCellLocked, isCellMovable, isCellResizable, isCellsBendable, isCellsCloneable, isCellsDeletable, isCellsDisconnectable, isCellsEditable, isCellSelectable, isCellSelected, isCellsLocked, isCellsMovable, isCellsResizable, isCellsSelectable, isCloneInvalidEdges, isCollapseToPreferredSize, isConnectableEdges, isConstrainChild, isConstrainChildren, isDisconnectOnMove, isDropEnabled, isEdgeLabelsMovable, isEdgeValid, isEnabled, isExtendParent, isExtendParents, isExtendParentsOnAdd, isGridEnabled, isHtmlLabel, isHtmlLabels, isKeepEdgesInBackground, isKeepEdgesInForeground, isLabelClipped, isLabelMovable, isLabelsClipped, isLabelsVisible, isLoop, isMultigraph, isOrthogonal, isPort, isPortsEnabled, isResetEdgesOnConnect, isResetEdgesOnMove, isResetEdgesOnResize, isResetViewOnRootChange, isSelectionEmpty, isSplitEnabled, isSplitTarget, isSwimlane, isSwimlaneNesting, isTerminalPointMovable, isValidAncestor, isValidConnection, isValidRoot, isValidSource, isValidTarget, isVertexLabelsMovable, main, moveCells, moveCells, moveCells, orderCells, orderCells, postProcessCellStyle, processChange, processChanges, refresh, removeCells, removeCells, removeCells, removeCellsFromParent, removeCellsFromParent, removeImageBundle, removePropertyChangeListener, removePropertyChangeListener, removeSelectionCell, removeSelectionCells, removeStateForCell, repaint, repaint, resetEdge, resetEdges, resizeCell, resizeCells, selectAll, selectAll, selectCell, selectCells, selectCells, selectChildCell, selectEdges, selectEdges, selectNextCell, selectParentCell, selectPreviousCell, selectVertices, selectVertices, setAllowDanglingEdges, setAllowLoops, setAllowNegativeCoordinates, setAlternateEdgeStyle, setAutoOrigin, setAutoSizeCells, setBorder, setCellsBendable, setCellsCloneable, setCellsDeletable, setCellsDisconnectable, setCellsEditable, setCellsLocked, setCellsMovable, setCellsResizable, setCellsSelectable, setCellStyle, setCellStyle, setCellStyleFlags, setCellStyleFlags, setCellStyles, setCellStyles, setChangesRepaintThreshold, setCloneInvalidEdges, setCollapseToPreferredSize, setConnectableEdges, setConnectionConstraint, setConstrainChildren, setDefaultLoopStyle, setDefaultOverlap, setDefaultParent, setDisconnectOnMove, setDropEnabled, setEdgeLabelsMovable, setEnabled, setExtendParents, setExtendParentsOnAdd, setGridEnabled, setGridSize, setHtmlLabels, setKeepEdgesInBackground, setKeepEdgesInForeground, setLabelsClipped, setLabelsVisible, setMaximumGraphBounds, setMinimumGraphSize, setModel, setMultigraph, setMultiplicities, setOrigin, setPortsEnabled, setResetEdgesOnConnect, setResetEdgesOnMove, setResetEdgesOnResize, setResetViewOnRootChange, setSelectionCell, setSelectionCells, setSelectionCells, setSplitEnabled, setStylesheet, setSwimlaneNesting, setVertexLabelsMovable, setView, snap, splitEdge, splitEdge, splitEdge, swapBounds, toggleCells, toggleCells, toggleCells, toggleCellStyle, toggleCellStyleFlags, toggleCellStyleFlags, toggleCellStyles, toggleCellStyles, translateCell, traverse, traverse, ungroupCells, ungroupCells, updateAlternateBounds, updateCellSize, updateCellSize, updateGroupBounds, updateGroupBounds, updateGroupBounds, updateGroupBounds, updateOrigin, validateCell, validateEdge
      • Methods inherited from class com.mxgraph.util.mxEventSource

        addListener, fireEvent, fireEvent, getEventSource, isEventsEnabled, removeListener, removeListener, setEventsEnabled, setEventSource
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • BpmnGraph

        public BpmnGraph​(ModelContainer container,
                         com.mxgraph.view.mxStylesheet sheet)
        Creates the graph.
    • Method Detail

      • activate

        public void activate()
      • deactivate

        public void deactivate()
      • isCellFoldable

        public boolean isCellFoldable​(java.lang.Object cell,
                                      boolean collapse)
        Returns true if the given cell is expandable. This implementation returns true if the cell has at least one child and its style does not specify mxConstants.STYLE_FOLDABLE to be 0.
        Overrides:
        isCellFoldable in class com.mxgraph.view.mxGraph
        Parameters:
        cell -
        Returns:
        Returns true if the given cell is expandable.
      • getToolTipForCell

        public java.lang.String getToolTipForCell​(java.lang.Object cell)
        Gets the tool tip for a cell.
        Overrides:
        getToolTipForCell in class com.mxgraph.view.mxGraph
        Parameters:
        cell - The cell.
        Returns:
        The tool tip.
      • getModelContainer

        public ModelContainer getModelContainer()
        Gets the model container.
        Returns:
        The model container.
      • isCellVisible

        public boolean isCellVisible​(java.lang.Object cell)
        Overrides:
        isCellVisible in class com.mxgraph.view.mxGraph
      • isValidDropTarget

        public boolean isValidDropTarget​(java.lang.Object cell,
                                         java.lang.Object[] cells)
        Returns true if the given cell is a valid drop target for the specified cells. This returns true if the cell is a swimlane, has children and is not collapsed, or if splitEnabled is true and isSplitTarget returns true for the given arguments
        Overrides:
        isValidDropTarget in class com.mxgraph.view.mxGraph
        Parameters:
        cell - Object that represents the possible drop target.
        cells - Objects that are going to be dropped.
        Returns:
        Returns true if the cell is a valid drop target for the given cells.
      • delayedRefreshCellView

        public void delayedRefreshCellView​(com.mxgraph.model.mxICell cell)
        Refreshes the view for a cell later.
        Parameters:
        cell - The cell.
      • getVisualElementById

        public VElement getVisualElementById​(java.lang.String id)
        Gets a visual element by BPMN id.
        Parameters:
        id - The ID.
        Returns:
        The element, null if not found.
      • getVisualElementById

        public VElement getVisualElementById​(com.mxgraph.model.mxICell startelement,
                                             java.lang.String id)
        Gets a visual element by BPMN id.
        Parameters:
        id - The ID.
        Returns:
        The element, null if not found.
      • refreshCellView

        public void refreshCellView​(com.mxgraph.model.mxICell cell)
        Refreshes the view for a cell.
        Parameters:
        cell - The cell.
      • getEdgeValidationError

        public java.lang.String getEdgeValidationError​(java.lang.Object edge,
                                                       java.lang.Object source,
                                                       java.lang.Object target)
        Returns the validation error message to be displayed when inserting or changing an edges' connectivity. A return value of null means the edge is valid, a return value of '' means it's not valid, but do not display an error message. Any other (non-empty) string returned from this method is displayed as an error message when trying to connect an edge to a source and target. This implementation uses the multiplicities, as well as multigraph and allowDanglingEdges to generate validation errors.
        Overrides:
        getEdgeValidationError in class com.mxgraph.view.mxGraph
        Parameters:
        edge - Cell that represents the edge to validate.
        source - Cell that represents the source terminal.
        target - Cell that represents the target terminal.
      • findElementById

        protected VElement findElementById​(com.mxgraph.model.mxICell startelement,
                                           java.lang.String id)