Class ProMJGraph

  • All Implemented Interfaces:
    java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, java.util.EventListener, javax.accessibility.Accessible, javax.swing.Scrollable, org.jgraph.event.GraphLayoutCacheListener, org.jgraph.event.GraphModelListener, org.jgraph.event.GraphSelectionListener, org.processmining.framework.util.Cleanable, ScalableComponent, org.processmining.models.connections.GraphLayoutConnection.Listener, org.processmining.models.graphbased.ExpansionListener

    public class ProMJGraph
    extends org.jgraph.JGraph
    implements org.jgraph.event.GraphModelListener, org.jgraph.event.GraphLayoutCacheListener, org.jgraph.event.GraphSelectionListener, org.processmining.framework.util.Cleanable, org.processmining.models.graphbased.ExpansionListener, ScalableComponent, org.processmining.models.connections.GraphLayoutConnection.Listener
    See Also:
    Serialized Form
    • Nested Class Summary

      • Nested classes/interfaces inherited from class org.jgraph.JGraph

        org.jgraph.JGraph.EmptySelectionModel, org.jgraph.JGraph.GraphSelectionRedirector
      • Nested classes/interfaces inherited from class javax.swing.JComponent

        javax.swing.JComponent.AccessibleJComponent
      • Nested classes/interfaces inherited from class java.awt.Container

        java.awt.Container.AccessibleAWTContainer
      • Nested classes/interfaces inherited from class java.awt.Component

        java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
      • Nested classes/interfaces inherited from interface org.processmining.models.graphbased.ExpansionListener

        org.processmining.models.graphbased.ExpansionListener.ListenerList
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String PIPVIEWATTRIBUTE  
      • Fields inherited from class org.jgraph.JGraph

        antiAliased, ANTIALIASED_PROPERTY, autoResizeGraph, backgroundComponent, backgroundImage, backgroundScaled, bendable, cloneable, connectable, CROSS_GRID_MODE, disconnectable, disconnectOnMove, DOT_GRID_MODE, dragEnabled, dropEnabled, edgeLabelsMovable, editable, EDITABLE_PROPERTY, editClickCount, enabled, GRAPH_LAYOUT_CACHE_PROPERTY, GRAPH_MODEL_PROPERTY, graphLayoutCache, graphModel, GRID_COLOR_PROPERTY, GRID_SIZE_PROPERTY, GRID_VISIBLE_PROPERTY, gridColor, gridEnabled, gridMode, gridSize, gridVisible, groupsEditable, HANDLE_COLOR_PROPERTY, HANDLE_SIZE_PROPERTY, handleColor, handleSize, highlightColor, INVOKES_STOP_CELL_EDITING_PROPERTY, invokesStopCellEditing, IS_MAC, isJumpToDefaultPort, isMoveIntoGroups, isMoveOutOfGroups, lastBufferAllocated, LINE_GRID_MODE, LOCKED_HANDLE_COLOR_PROPERTY, lockedHandleColor, marquee, MARQUEE_HANDLER_PROPERTY, marqueeColor, minimumMove, moveable, moveBelowZero, moveBeyondGraphBounds, offgraphics, offscreen, offscreenBounds, offscreenBuffer, offscreenDirty, offscreenOffset, PORTS_SCALED_PROPERTY, PORTS_VISIBLE_PROPERTY, portsOnTop, portsScaled, portsVisible, previewInvalidNullPorts, PROPERTY_BACKGROUNDIMAGE, scale, SCALE_PROPERTY, SELECTION_MODEL_PROPERTY, selectionEnabled, SELECTIONENABLED_PROPERTY, selectionModel, selectionRedirector, sizeable, tolerance, VERSION, volatileOffscreen, wholeOffscreenDirty, wholeOffscreenDirtyProportion, xorEnabled
      • Fields inherited from class javax.swing.JComponent

        listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
      • Fields inherited from class java.awt.Component

        accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
      • Fields inherited from interface java.awt.image.ImageObserver

        ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
    • Constructor Summary

      Constructors 
      Constructor Description
      ProMJGraph​(ProMGraphModel model, boolean isPIP, org.processmining.models.graphbased.ViewSpecificAttributeMap viewSpecificAttributes, org.processmining.models.connections.GraphLayoutConnection layoutConnection)  
      ProMJGraph​(ProMGraphModel model, org.processmining.models.graphbased.ViewSpecificAttributeMap viewSpecificAttributes, org.processmining.models.connections.GraphLayoutConnection layoutConnection)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addUpdateListener​(ScalableComponent.UpdateListener listener)
      Adds an updatelistener to this scalable component.
      protected void changeHandled()
      Might be overridden to signal that a change was handled
      void cleanUp()  
      javax.swing.JComponent getComponent()
      Returns the component that will be scaled using getScale and setScale methods Most implementations will actually override JComponent and return this in this method.
      org.processmining.models.connections.GraphLayoutConnection getLayoutConnection()  
      ProMGraphModel getModel()
      Returns the GraphModel that is providing the data.
      org.processmining.models.graphbased.directed.DirectedGraph<? extends org.processmining.models.graphbased.directed.DirectedGraphNode,​? extends org.processmining.models.graphbased.directed.DirectedGraphEdge<? extends org.processmining.models.graphbased.directed.DirectedGraphNode,​? extends org.processmining.models.graphbased.directed.DirectedGraphNode>> getProMGraph()  
      java.lang.String getToolTipText​(java.awt.event.MouseEvent event)
      Overrides JComponent'sgetToolTipText method in order to allow the graph to create a tooltip for the topmost cell under the mousepointer.
      com.jgraph.layout.JGraphLayout getUpdateLayout()  
      org.processmining.models.graphbased.ViewSpecificAttributeMap getViewSpecificAttributes()  
      void graphChanged​(org.jgraph.event.GraphModelEvent e)
      Invoked after a cell has changed in some way.
      void graphLayoutCacheChanged​(org.jgraph.event.GraphLayoutCacheEvent e)
      Invoked after a cell has changed in some way.
      int hashCode()  
      void layoutConnectionUpdated​(org.processmining.models.graphbased.AttributeMapOwner... owners)  
      void nodeCollapsed​(org.processmining.models.graphbased.Expandable source)  
      void nodeExpanded​(org.processmining.models.graphbased.Expandable source)  
      void removeUpdateListener​(ScalableComponent.UpdateListener listener)
      Removes an updatelistener from this scalable component.
      void repositionToOrigin()  
      void setUpdateLayout​(com.jgraph.layout.JGraphLayout layout)  
      java.lang.String toString()  
      void update​(java.lang.Object... elements)  
      void update​(java.util.Set<?> elements)  
      void valueChanged​(org.jgraph.event.GraphSelectionEvent e)
      Called whenever the value of the selection changes.
      • Methods inherited from class org.jgraph.JGraph

        addGraphSelectionListener, addOffscreenDirty, addSampleData, addSelectionCell, addSelectionCells, cancelEditing, clearOffscreen, clearOffscreenDirty, clearSelection, cloneCells, convertValueToString, createBounds, createBufferedImage, drawImage, drawImage, fireValueChanged, fromScreen, fromScreen, getAttributes, getBackgroundComponent, getBackgroundImage, getCellBounds, getCellBounds, getCenterPoint, getClipRectangle, getDefaultPortForCell, getDescendants, getEdgeLabelsMovable, getEditClickCount, getEditingCell, getFirstCellForLocation, getGraphLayoutCache, getGridColor, getGridMode, getGridSize, getHandleColor, getHandleSize, getHighlightColor, getImage, getInvokesStopCellEditing, getLeafViewAt, getLockedHandleColor, getMarqueeColor, getMarqueeHandler, getMinimumMove, getNextCellForLocation, getNextSelectableViewAt, getNextViewAt, getNextViewAt, getNextViewAt, getNextViewAt, getOffgraphics, getOffscreen, getOffscreenDirty, getOffscreenOffset, getPortForLocation, getPortViewAt, getPortViewAt, getPreferredScrollableViewportSize, getRoots, getRoots, getScale, getScrollableBlockIncrement, getScrollableTracksViewportHeight, getScrollableTracksViewportWidth, getScrollableUnitIncrement, getSelectionCell, getSelectionCellAt, getSelectionCells, getSelectionCells, getSelectionCount, getSelectionModel, getTolerance, getTopmostViewAt, getUI, getUIClassID, getViewPortBounds, graphDidChange, isAntiAliased, isAutoResizeGraph, isBackgroundScaled, isBendable, isCellEditable, isCellSelected, isCloneable, isConnectable, isDisconnectable, isDisconnectOnMove, isDragEnabled, isDropEnabled, isEditable, isEditing, isGridEnabled, isGridVisible, isGroupsEditable, isJumpToDefaultPort, isMoveable, isMoveBelowZero, isMoveBeyondGraphBounds, isMoveIntoGroups, isMoveOutOfGroups, isPortsOnTop, isPortsScaled, isPortsVisible, isPreviewInvalidNullPorts, isSelectionEmpty, isSelectionEnabled, isSizeable, isVolatileOffscreen, isXorEnabled, main, order, paramString, refresh, releaseOffscreenResources, removeGraphSelectionListener, removeSelectionCell, scrollCellToVisible, scrollPointToVisible, setAntiAliased, setAutoResizeGraph, setBackground, setBackgroundComponent, setBackgroundImage, setBackgroundScaled, setBendable, setCloneable, setConnectable, setDisconnectable, setDisconnectOnMove, setDragEnabled, setDropEnabled, setEdgeLabelsMovable, setEditable, setEditClickCount, setGraphLayoutCache, setGridColor, setGridEnabled, setGridMode, setGridSize, setGridVisible, setGroupsEditable, setHandleColor, setHandleSize, setHighlightColor, setInvokesStopCellEditing, setJumpToDefaultPort, setLockedHandleColor, setMarqueeColor, setMarqueeHandler, setMinimumMove, setModel, setMoveable, setMoveBelowZero, setMoveBeyondGraphBounds, setMoveIntoGroups, setMoveOutOfGroups, setOffscreenOffset, setOpaque, setPortsOnTop, setPortsScaled, setPortsVisible, setPreviewInvalidNullPorts, setScale, setScale, setSelectionCell, setSelectionCells, setSelectionEnabled, setSelectionModel, setSizeable, setTolerance, setUI, setupOffScreen, setVolatileOffscreen, setXorEnabled, snap, snap, snap, startEditingAtCell, stopEditing, toScreen, toScreen, updateAutoSize, updateUI
      • Methods inherited from class javax.swing.JComponent

        addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
      • Methods inherited from class java.awt.Container

        add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTree
      • Methods inherited from class java.awt.Component

        action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAccessibleContext, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setMixingCutoutShape, setName, setSize, setSize, show, show, size, transferFocus, transferFocusBackward, transferFocusUpCycle
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface javax.accessibility.Accessible

        getAccessibleContext
    • Field Detail

      • PIPVIEWATTRIBUTE

        public static final java.lang.String PIPVIEWATTRIBUTE
        See Also:
        Constant Field Values
    • Constructor Detail

      • ProMJGraph

        public ProMJGraph​(ProMGraphModel model,
                          org.processmining.models.graphbased.ViewSpecificAttributeMap viewSpecificAttributes,
                          org.processmining.models.connections.GraphLayoutConnection layoutConnection)
      • ProMJGraph

        public ProMJGraph​(ProMGraphModel model,
                          boolean isPIP,
                          org.processmining.models.graphbased.ViewSpecificAttributeMap viewSpecificAttributes,
                          org.processmining.models.connections.GraphLayoutConnection layoutConnection)
    • Method Detail

      • getModel

        public ProMGraphModel getModel()
        Returns the GraphModel that is providing the data.
        Overrides:
        getModel in class org.jgraph.JGraph
        Returns:
        the model that is providing the data
      • cleanUp

        public void cleanUp()
        Specified by:
        cleanUp in interface org.processmining.framework.util.Cleanable
      • update

        public void update​(java.lang.Object... elements)
      • update

        public void update​(java.util.Set<?> elements)
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.awt.Component
      • graphChanged

        public void graphChanged​(org.jgraph.event.GraphModelEvent e)
        Description copied from interface: org.jgraph.event.GraphModelListener
        Invoked after a cell has changed in some way. The vertex/vertices may have changed bounds or altered adjacency, or other attributes have changed that may affect presentation. Note : Read the notes on the GraphModelEvent class carefully. A GraphModelEvent is the undo of the event that has just occurred, i.e. if you undo this event is executed.
        Specified by:
        graphChanged in interface org.jgraph.event.GraphModelListener
      • changeHandled

        protected void changeHandled()
        Might be overridden to signal that a change was handled
      • graphLayoutCacheChanged

        public void graphLayoutCacheChanged​(org.jgraph.event.GraphLayoutCacheEvent e)
        Description copied from interface: org.jgraph.event.GraphLayoutCacheListener
        Invoked after a cell has changed in some way. The vertex/vertices may have changed bounds or altered adjacency, or other attributes have changed that may affect presentation.
        Specified by:
        graphLayoutCacheChanged in interface org.jgraph.event.GraphLayoutCacheListener
      • valueChanged

        public void valueChanged​(org.jgraph.event.GraphSelectionEvent e)
        Description copied from interface: org.jgraph.event.GraphSelectionListener
        Called whenever the value of the selection changes.
        Specified by:
        valueChanged in interface org.jgraph.event.GraphSelectionListener
        Parameters:
        e - the event that characterizes the change.
      • getToolTipText

        public java.lang.String getToolTipText​(java.awt.event.MouseEvent event)
        Description copied from class: org.jgraph.JGraph
        Overrides JComponent'sgetToolTipText method in order to allow the graph to create a tooltip for the topmost cell under the mousepointer. This differs from JTree where the renderers tooltip is used.

        NOTE: For JGraph to properly display tooltips of its renderers, JGraph must be a registered component with the ToolTipManager. This can be done by invoking ToolTipManager.sharedInstance().registerComponent(graph). This is not done automatically!

        Overrides:
        getToolTipText in class org.jgraph.JGraph
        Parameters:
        event - the MouseEvent that initiated the ToolTip display
        Returns:
        a string containing the tooltip or null if event is null
      • repositionToOrigin

        public void repositionToOrigin()
      • getProMGraph

        public org.processmining.models.graphbased.directed.DirectedGraph<? extends org.processmining.models.graphbased.directed.DirectedGraphNode,​? extends org.processmining.models.graphbased.directed.DirectedGraphEdge<? extends org.processmining.models.graphbased.directed.DirectedGraphNode,​? extends org.processmining.models.graphbased.directed.DirectedGraphNode>> getProMGraph()
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • getUpdateLayout

        public com.jgraph.layout.JGraphLayout getUpdateLayout()
      • getLayoutConnection

        public org.processmining.models.connections.GraphLayoutConnection getLayoutConnection()
      • setUpdateLayout

        public void setUpdateLayout​(com.jgraph.layout.JGraphLayout layout)
      • getViewSpecificAttributes

        public org.processmining.models.graphbased.ViewSpecificAttributeMap getViewSpecificAttributes()
      • nodeCollapsed

        public void nodeCollapsed​(org.processmining.models.graphbased.Expandable source)
        Specified by:
        nodeCollapsed in interface org.processmining.models.graphbased.ExpansionListener
      • nodeExpanded

        public void nodeExpanded​(org.processmining.models.graphbased.Expandable source)
        Specified by:
        nodeExpanded in interface org.processmining.models.graphbased.ExpansionListener
      • getComponent

        public javax.swing.JComponent getComponent()
        Description copied from interface: ScalableComponent
        Returns the component that will be scaled using getScale and setScale methods Most implementations will actually override JComponent and return this in this method.
        Specified by:
        getComponent in interface ScalableComponent
        Returns:
        a component
      • layoutConnectionUpdated

        public void layoutConnectionUpdated​(org.processmining.models.graphbased.AttributeMapOwner... owners)
        Specified by:
        layoutConnectionUpdated in interface org.processmining.models.connections.GraphLayoutConnection.Listener