Package org.processmining.models.jgraph
Class ProMJGraph
- java.lang.Object
-
- java.awt.Component
-
- java.awt.Container
-
- javax.swing.JComponent
-
- org.jgraph.JGraph
-
- org.processmining.models.jgraph.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
-
Nested classes/interfaces inherited from interface org.processmining.framework.util.ui.scalableview.ScalableComponent
ScalableComponent.UpdateListener
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringPIPVIEWATTRIBUTE-
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
-
-
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 voidaddUpdateListener(ScalableComponent.UpdateListener listener)Adds an updatelistener to this scalable component.protected voidchangeHandled()Might be overridden to signal that a change was handledvoidcleanUp()javax.swing.JComponentgetComponent()Returns the component that will be scaled using getScale and setScale methods Most implementations will actually override JComponent and returnthisin this method.org.processmining.models.connections.GraphLayoutConnectiongetLayoutConnection()ProMGraphModelgetModel()Returns theGraphModelthat 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.StringgetToolTipText(java.awt.event.MouseEvent event)OverridesJComponent'sgetToolTipTextmethod in order to allow the graph to create a tooltip for the topmost cell under the mousepointer.com.jgraph.layout.JGraphLayoutgetUpdateLayout()org.processmining.models.graphbased.ViewSpecificAttributeMapgetViewSpecificAttributes()voidgraphChanged(org.jgraph.event.GraphModelEvent e)Invoked after a cell has changed in some way.voidgraphLayoutCacheChanged(org.jgraph.event.GraphLayoutCacheEvent e)Invoked after a cell has changed in some way.inthashCode()voidlayoutConnectionUpdated(org.processmining.models.graphbased.AttributeMapOwner... owners)voidnodeCollapsed(org.processmining.models.graphbased.Expandable source)voidnodeExpanded(org.processmining.models.graphbased.Expandable source)voidremoveUpdateListener(ScalableComponent.UpdateListener listener)Removes an updatelistener from this scalable component.voidrepositionToOrigin()voidsetUpdateLayout(com.jgraph.layout.JGraphLayout layout)java.lang.StringtoString()voidupdate(java.lang.Object... elements)voidupdate(java.util.Set<?> elements)voidvalueChanged(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 org.processmining.framework.util.ui.scalableview.ScalableComponent
getScale, setScale
-
-
-
-
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 theGraphModelthat is providing the data.- Overrides:
getModelin classorg.jgraph.JGraph- Returns:
- the model that is providing the data
-
cleanUp
public void cleanUp()
- Specified by:
cleanUpin interfaceorg.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:
toStringin classjava.awt.Component
-
graphChanged
public void graphChanged(org.jgraph.event.GraphModelEvent e)
Description copied from interface:org.jgraph.event.GraphModelListenerInvoked 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:
graphChangedin interfaceorg.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.GraphLayoutCacheListenerInvoked 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:
graphLayoutCacheChangedin interfaceorg.jgraph.event.GraphLayoutCacheListener
-
valueChanged
public void valueChanged(org.jgraph.event.GraphSelectionEvent e)
Description copied from interface:org.jgraph.event.GraphSelectionListenerCalled whenever the value of the selection changes.- Specified by:
valueChangedin interfaceorg.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.JGraphOverridesJComponent'sgetToolTipTextmethod 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
JGraphto properly display tooltips of its renderers,JGraphmust be a registered component with theToolTipManager. This can be done by invokingToolTipManager.sharedInstance().registerComponent(graph). This is not done automatically!- Overrides:
getToolTipTextin classorg.jgraph.JGraph- Parameters:
event- theMouseEventthat initiated theToolTipdisplay- Returns:
- a string containing the tooltip or
nullifeventis 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:
hashCodein classjava.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:
nodeCollapsedin interfaceorg.processmining.models.graphbased.ExpansionListener
-
nodeExpanded
public void nodeExpanded(org.processmining.models.graphbased.Expandable source)
- Specified by:
nodeExpandedin interfaceorg.processmining.models.graphbased.ExpansionListener
-
getComponent
public javax.swing.JComponent getComponent()
Description copied from interface:ScalableComponentReturns the component that will be scaled using getScale and setScale methods Most implementations will actually override JComponent and returnthisin this method.- Specified by:
getComponentin interfaceScalableComponent- Returns:
- a component
-
addUpdateListener
public void addUpdateListener(ScalableComponent.UpdateListener listener)
Description copied from interface:ScalableComponentAdds an updatelistener to this scalable component. This listener will be updated as soon as the contents of the component change, i.e. if the component- Specified by:
addUpdateListenerin interfaceScalableComponent
-
removeUpdateListener
public void removeUpdateListener(ScalableComponent.UpdateListener listener)
Description copied from interface:ScalableComponentRemoves an updatelistener from this scalable component.- Specified by:
removeUpdateListenerin interfaceScalableComponent
-
layoutConnectionUpdated
public void layoutConnectionUpdated(org.processmining.models.graphbased.AttributeMapOwner... owners)
- Specified by:
layoutConnectionUpdatedin interfaceorg.processmining.models.connections.GraphLayoutConnection.Listener
-
-