Class NESTWorkflowEditor.CustomGraph
java.lang.Object
com.mxgraph.util.mxEventSource
com.mxgraph.view.mxGraph
de.uni_trier.wi2.procake.gui.objecteditor.nestworkfloweditor.NESTWorkflowEditor.CustomGraph
- Enclosing class:
- NESTWorkflowEditor
public static class NESTWorkflowEditor.CustomGraph
extends com.mxgraph.view.mxGraph
A graph that creates new edges from a given template edge.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.mxgraph.view.mxGraph
com.mxgraph.view.mxGraph.mxICellVisitorNested classes/interfaces inherited from class com.mxgraph.util.mxEventSource
com.mxgraph.util.mxEventSource.mxIEventListener -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ObjectHolds the edge to be used as a template for inserting new edges.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, viewFields inherited from class com.mxgraph.util.mxEventSource
eventListeners, eventsEnabled, eventSource -
Constructor Summary
ConstructorsConstructorDescriptionCustom graph that defines the alternate edge style to be used when the middle control point of edges is double clicked (flipped). -
Method Summary
Modifier and TypeMethodDescriptionaggregateToHtmlTable(de.uni_trier.wi2.procake.data.object.base.AggregateObject aggregateObject, boolean includeDataClassNames) aggregateToHtmlTable(de.uni_trier.wi2.procake.data.object.base.AggregateObject aggregateObject, boolean includeDataClassNames, boolean includeNullAttributes) voidclears the graph of all cells with event firing disabled so the underlying NESTWorkflow is not modifiedconvertValueToString(Object cell) Overrides the method to use the currently selected edge template for new edges.voidcom.mxgraph.model.mxICellgetCellById(String id) getEdgeValidationError(Object edge, Object source, Object target) com.mxgraph.util.mxRectanglegetLabelSize(Object cell) de.uni_trier.wi2.procake.data.object.nest.NESTAbstractWorkflowObjectcom.mxgraph.util.mxRectanglegetToolTipForCell(Object cell) Prints out some useful information about the cell in the tooltip.booleanisSplitTarget(Object target, Object[] cells) restricts edge splitting to controlflow edges and sequence nodes / blocks also affects the "dragging preview": only valid combinations of target edges and dragged cells are highlightedvoidloadNESTWorkflow(de.uni_trier.wi2.procake.data.object.nest.NESTAbstractWorkflowObject nestWorkflow) voidselectGraphItemsOfClass(de.uni_trier.wi2.procake.data.model.DataClass targetDataClass) voidSets the cells id to newId and updates the mapping of id to cell in the graph model by removing the cell with the old id and adding it with the new id..voidsetEdgeTemplate(Object template) Sets the edge template to be used to inserting edges.com.mxgraph.model.mxICellsyncEdge(de.uni_trier.wi2.procake.data.object.nest.NESTEdgeObject nestEdge) Inserts the given nestEdge into the graph view when no cell with the id of the given nestEdge is present in the mxGraph.voidsyncOutgoingEdges(de.uni_trier.wi2.procake.data.object.nest.NESTNodeObject nestNode) Inserts the outgoing edges (only when its id is missing in the mxGraph) of the given nestNode into the graph view.Methods inherited from class com.mxgraph.view.mxGraph
addAllEdges, addCell, addCell, addCell, addCells, addCells, addCells, addCells, addEdge, addImageBundle, addPropertyChangeListener, addPropertyChangeListener, addSelectionCell, addSelectionCells, addTopmostVerticesAndEdges, alignCells, alignCells, alignCells, cellConnected, cellDrawn, cellLabelChanged, cellsAdded, cellsAdded, cellsFolded, cellsFolded, cellSizeUpdated, cellsMoved, cellsOrdered, cellsRemoved, cellsResized, cellsToggled, clearSelection, cloneCells, cloneCells, connectCell, connectCell, constrainChild, 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, 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, isCellFoldable, isCellLocked, isCellMovable, isCellResizable, isCellsBendable, isCellsCloneable, isCellsDeletable, isCellsDisconnectable, isCellsEditable, isCellSelectable, isCellSelected, isCellsLocked, isCellsMovable, isCellsResizable, isCellsSelectable, isCellVisible, 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, isSwimlane, isSwimlaneNesting, isTerminalPointMovable, isValidAncestor, isValidConnection, isValidDropTarget, 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, swapBounds, toggleCells, toggleCells, toggleCells, toggleCellStyle, toggleCellStyleFlags, toggleCellStyleFlags, toggleCellStyles, toggleCellStyles, toString, translateCell, traverse, traverse, ungroupCells, ungroupCells, updateAlternateBounds, updateCellSize, updateCellSize, updateGroupBounds, updateGroupBounds, updateGroupBounds, updateGroupBounds, updateOrigin, updateSelection, validateCell, validateEdgeMethods inherited from class com.mxgraph.util.mxEventSource
addListener, fireEvent, fireEvent, getEventSource, isEventsEnabled, removeListener, removeListener, setEventsEnabled, setEventSource
-
Field Details
-
edgeTemplate
Holds the edge to be used as a template for inserting new edges.
-
-
Constructor Details
-
CustomGraph
public CustomGraph()Custom graph that defines the alternate edge style to be used when the middle control point of edges is double clicked (flipped).
-
-
Method Details
-
setEdgeTemplate
Sets the edge template to be used to inserting edges. -
getToolTipForCell
Prints out some useful information about the cell in the tooltip.- Overrides:
getToolTipForCellin classcom.mxgraph.view.mxGraph
-
aggregateToHtmlTable
public String aggregateToHtmlTable(de.uni_trier.wi2.procake.data.object.base.AggregateObject aggregateObject, boolean includeDataClassNames, boolean includeNullAttributes) -
aggregateToHtmlTable
public String aggregateToHtmlTable(de.uni_trier.wi2.procake.data.object.base.AggregateObject aggregateObject, boolean includeDataClassNames) -
createEdge
public Object createEdge(Object parent, String id, Object value, Object source, Object target, String style) Overrides the method to use the currently selected edge template for new edges.- Overrides:
createEdgein classcom.mxgraph.view.mxGraph- Parameters:
parent-id-value-source-target-style-- Returns:
-
splitEdge
- Overrides:
splitEdgein classcom.mxgraph.view.mxGraph
-
convertValueToString
- Overrides:
convertValueToStringin classcom.mxgraph.view.mxGraph
-
getEdgeValidationError
- Overrides:
getEdgeValidationErrorin classcom.mxgraph.view.mxGraph
-
getLabelSize
-
getLayout
-
selectGraphItemsOfClass
public void selectGraphItemsOfClass(de.uni_trier.wi2.procake.data.model.DataClass targetDataClass) -
getNestWorkflow
public de.uni_trier.wi2.procake.data.object.nest.NESTAbstractWorkflowObject getNestWorkflow() -
loadNESTWorkflow
public void loadNESTWorkflow(de.uni_trier.wi2.procake.data.object.nest.NESTAbstractWorkflowObject nestWorkflow) -
executeLayout
public void executeLayout() -
syncEdge
public com.mxgraph.model.mxICell syncEdge(de.uni_trier.wi2.procake.data.object.nest.NESTEdgeObject nestEdge) Inserts the given nestEdge into the graph view when no cell with the id of the given nestEdge is present in the mxGraph.- Parameters:
nestEdge- TheNESTEdgeObjectwhich should be synced to the graph view- Returns:
-
syncOutgoingEdges
public void syncOutgoingEdges(de.uni_trier.wi2.procake.data.object.nest.NESTNodeObject nestNode) Inserts the outgoing edges (only when its id is missing in the mxGraph) of the given nestNode into the graph view.- Parameters:
nestNode-
-
setCellId
Sets the cells id to newId and updates the mapping of id to cell in the graph model by removing the cell with the old id and adding it with the new id.. Is necessary for model.getCell(id) to work later on (returns null when not updating the map).- Parameters:
cell-newId-
-
getCellById
-
clearWithoutEvents
public void clearWithoutEvents()clears the graph of all cells with event firing disabled so the underlying NESTWorkflow is not modified -
getPreferredSizeForCell
- Overrides:
getPreferredSizeForCellin classcom.mxgraph.view.mxGraph
-
isSplitTarget
restricts edge splitting to controlflow edges and sequence nodes / blocks also affects the "dragging preview": only valid combinations of target edges and dragged cells are highlighted- Overrides:
isSplitTargetin classcom.mxgraph.view.mxGraph- Parameters:
target- potential drop edgecells- that are dragged- Returns:
- whether cells can be dropped on target
-
getCellLabelGenerator
-