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.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 Object
    Holds 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, view

    Fields inherited from class com.mxgraph.util.mxEventSource

    eventListeners, eventsEnabled, eventSource
  • Constructor Summary

    Constructors
    Constructor
    Description
    Custom 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 Type
    Method
    Description
    aggregateToHtmlTable(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)
     
    void
    clears the graph of all cells with event firing disabled so the underlying NESTWorkflow is not modified
     
    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.
    void
     
    com.mxgraph.model.mxICell
     
     
    getEdgeValidationError(Object edge, Object source, Object target)
     
    com.mxgraph.util.mxRectangle
     
     
    de.uni_trier.wi2.procake.data.object.nest.NESTAbstractWorkflowObject
     
    com.mxgraph.util.mxRectangle
     
    Prints out some useful information about the cell in the tooltip.
    boolean
    isSplitTarget(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 highlighted
    void
    loadNESTWorkflow(de.uni_trier.wi2.procake.data.object.nest.NESTAbstractWorkflowObject nestWorkflow)
     
    void
    selectGraphItemsOfClass(de.uni_trier.wi2.procake.data.model.DataClass targetDataClass)
     
    void
    setCellId(com.mxgraph.model.mxICell cell, String newId)
    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..
    void
    Sets the edge template to be used to inserting edges.
    splitEdge(Object edge, Object[] cells, double dx, double dy)
     
    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.
    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.

    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, 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, wait, wait, wait
  • Field Details

    • edgeTemplate

      protected Object 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

      public void setEdgeTemplate(Object template)
      Sets the edge template to be used to inserting edges.
    • getToolTipForCell

      public String getToolTipForCell(Object cell)
      Prints out some useful information about the cell in the tooltip.
      Overrides:
      getToolTipForCell in class com.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:
      createEdge in class com.mxgraph.view.mxGraph
      Parameters:
      parent -
      id -
      value -
      source -
      target -
      style -
      Returns:
    • splitEdge

      public Object splitEdge(Object edge, Object[] cells, double dx, double dy)
      Overrides:
      splitEdge in class com.mxgraph.view.mxGraph
    • convertValueToString

      public String convertValueToString(Object cell)
      Overrides:
      convertValueToString in class com.mxgraph.view.mxGraph
    • getEdgeValidationError

      public String getEdgeValidationError(Object edge, Object source, Object target)
      Overrides:
      getEdgeValidationError in class com.mxgraph.view.mxGraph
    • getLabelSize

      public com.mxgraph.util.mxRectangle getLabelSize(Object cell)
    • getLayout

      public NESTWorkflowLayout 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 - The NESTEdgeObject which 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

      public void setCellId(com.mxgraph.model.mxICell cell, String newId)
      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

      public com.mxgraph.model.mxICell getCellById(String id)
    • clearWithoutEvents

      public void clearWithoutEvents()
      clears the graph of all cells with event firing disabled so the underlying NESTWorkflow is not modified
    • getPreferredSizeForCell

      public com.mxgraph.util.mxRectangle getPreferredSizeForCell(Object cell)
      Overrides:
      getPreferredSizeForCell in class com.mxgraph.view.mxGraph
    • isSplitTarget

      public boolean isSplitTarget(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 highlighted
      Overrides:
      isSplitTarget in class com.mxgraph.view.mxGraph
      Parameters:
      target - potential drop edge
      cells - that are dragged
      Returns:
      whether cells can be dropped on target
    • getCellLabelGenerator

      public CellLabelGenerator getCellLabelGenerator()