Package jadex.bpmn.editor.gui
Class BpmnGraph
- java.lang.Object
- 
- com.mxgraph.util.mxEventSource
- 
- com.mxgraph.view.mxGraph
- 
- jadex.bpmn.editor.gui.BpmnGraph
 
 
 
- 
 public class BpmnGraph extends com.mxgraph.view.mxGraphGraph for BPMN models.
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description protected static classBpmnGraph.BpmnLayoutManagerThe layout manager.
 - 
Field SummaryFields Modifier and Type Field Description protected LRU<java.lang.String,VElement>elementidcacheElement ID cache.protected BpmnGraph.BpmnLayoutManagerlayoutmanagerThe layout manager.protected ModelContainermodelcontainerThe model container.- 
Fields inherited from class com.mxgraph.view.mxGraphallowDanglingEdges, 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
 
- 
 - 
Constructor SummaryConstructors Constructor Description BpmnGraph(ModelContainer container, com.mxgraph.view.mxStylesheet sheet)Creates the graph.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidactivate()voiddeactivate()voiddelayedRefreshCellView(com.mxgraph.model.mxICell cell)Refreshes the view for a cell later.protected VElementfindElementById(com.mxgraph.model.mxICell startelement, java.lang.String id)java.lang.StringgetEdgeValidationError(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.ModelContainergetModelContainer()Gets the model container.java.lang.StringgetToolTipForCell(java.lang.Object cell)Gets the tool tip for a cell.VElementgetVisualElementById(com.mxgraph.model.mxICell startelement, java.lang.String id)Gets a visual element by BPMN id.VElementgetVisualElementById(java.lang.String id)Gets a visual element by BPMN id.booleanisCellFoldable(java.lang.Object cell, boolean collapse)Returns true if the given cell is expandable.booleanisCellVisible(java.lang.Object cell)booleanisValidDropTarget(java.lang.Object cell, java.lang.Object[] cells)Returns true if the given cell is a valid drop target for the specified cells.voidrefreshCellView(com.mxgraph.model.mxICell cell)Refreshes the view for a cell.- 
Methods inherited from class com.mxgraph.view.mxGraphaddAllEdges, 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
 
- 
 
- 
- 
- 
Field Detail- 
modelcontainerprotected ModelContainer modelcontainer The model container.
 - 
layoutmanagerprotected BpmnGraph.BpmnLayoutManager layoutmanager The layout manager.
 
- 
 - 
Constructor Detail- 
BpmnGraphpublic BpmnGraph(ModelContainer container, com.mxgraph.view.mxStylesheet sheet) Creates the graph.
 
- 
 - 
Method Detail- 
activatepublic void activate() 
 - 
deactivatepublic void deactivate() 
 - 
isCellFoldablepublic 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:
- isCellFoldablein class- com.mxgraph.view.mxGraph
- Parameters:
- cell-
- Returns:
- Returns true if the given cell is expandable.
 
 - 
getToolTipForCellpublic java.lang.String getToolTipForCell(java.lang.Object cell) Gets the tool tip for a cell.- Overrides:
- getToolTipForCellin class- com.mxgraph.view.mxGraph
- Parameters:
- cell- The cell.
- Returns:
- The tool tip.
 
 - 
getModelContainerpublic ModelContainer getModelContainer() Gets the model container.- Returns:
- The model container.
 
 - 
isCellVisiblepublic boolean isCellVisible(java.lang.Object cell) - Overrides:
- isCellVisiblein class- com.mxgraph.view.mxGraph
 
 - 
isValidDropTargetpublic 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:
- isValidDropTargetin 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.
 
 - 
delayedRefreshCellViewpublic void delayedRefreshCellView(com.mxgraph.model.mxICell cell) Refreshes the view for a cell later.- Parameters:
- cell- The cell.
 
 - 
getVisualElementByIdpublic VElement getVisualElementById(java.lang.String id) Gets a visual element by BPMN id.- Parameters:
- id- The ID.
- Returns:
- The element, null if not found.
 
 - 
getVisualElementByIdpublic 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.
 
 - 
refreshCellViewpublic void refreshCellView(com.mxgraph.model.mxICell cell) Refreshes the view for a cell.- Parameters:
- cell- The cell.
 
 - 
getEdgeValidationErrorpublic 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:
- getEdgeValidationErrorin 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.
 
 - 
findElementByIdprotected VElement findElementById(com.mxgraph.model.mxICell startelement, java.lang.String id) 
 
- 
 
-