Class InductiveVisualMinerAnimationPanel
- java.lang.Object
-
- java.awt.Component
-
- java.awt.Container
-
- javax.swing.JComponent
-
- javax.swing.JPanel
-
- org.processmining.plugins.graphviz.visualisation.NavigableSVGPanel
-
- org.processmining.plugins.graphviz.visualisation.DotPanel
-
- org.processmining.plugins.inductiveVisualMiner.InductiveVisualMinerAnimationPanel
-
- All Implemented Interfaces:
java.awt.image.ImageObserver,java.awt.MenuContainer,java.awt.print.Printable,java.io.Serializable,javax.accessibility.Accessible
public class InductiveVisualMinerAnimationPanel extends org.processmining.plugins.graphviz.visualisation.DotPanelThis class takes care of the node popups and render an animation- Author:
- sleemans
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class javax.swing.JPanel
javax.swing.JPanel.AccessibleJPanel
-
Nested classes/interfaces inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
-
-
Field Summary
Fields Modifier and Type Field Description protected booleananimationEnabledstatic java.lang.StringanimationGlobalEnabledFalsestatic java.lang.StringanimationGlobalEnabledTruestatic intpopupEmptyRowHeightstatic intpopupHistogramHeightstatic intpopupHistogramYPaddingstatic intpopupPaddingstatic intpopupRightMarginstatic intpopupRowHeightprotected RenderingThreadrenderingThread-
Fields inherited from class org.processmining.plugins.graphviz.visualisation.NavigableSVGPanel
animationControls, controlsPlayPause, controlsTimeScale, dash1, helperControlsButtonFont, helperControlsButtonString, helperControlsExplanations, helperControlsFont, helperControlsShortcuts, helperControlsWidth, image, image2user, isDraggingAnimation, isDraggingImage, isDraggingTimeScale, navigationImageBorderColor, navigationImageOutlineStroke, navigationImageWidthInPartOfPanel
-
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
-
-
Constructor Summary
Constructors Constructor Description InductiveVisualMinerAnimationPanel(org.processmining.framework.plugin.ProMCanceller canceller, IvMDecoratorI decorator)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddAnimationEnabledChangedListener(AnimationEnabledChangedListener animationEnabledChangedListener)voidaddLogPopupListener(LogPopupListener logPopupListener)The log popup will only show if there are listeners registered.protected voiddrawAnimation(java.awt.Graphics2D g)Draw the animation.doublegetAnimationMaximumTime()Needs to be overridden by a subclass.doublegetAnimationMinimumTime()Needs to be overridden by a subclass.doublegetAnimationTime()Needs to be overridden by a subclass.AnimationTimeChangedListenergetAnimationTimeChangedListener()java.util.List<org.processmining.plugins.graphviz.visualisation.export.Exporter>getExporters()GetExportersgetGetExporters()static org.processmining.plugins.graphviz.dot.DotgetSplashScreen()doublegetTimeScale()Needs to be overridden by a subclass.booleanisAnimationEnabled()Needs to be overridden by a subclass.booleanisAnimationPlaying()Needs to be overridden by a subclass.booleanisInLogPopupButton(java.awt.Point pointInUserCoordinates)booleanisMouseInLogPopupButton()booleanisShowPopup()protected voidpaintComponent(java.awt.Graphics g)Paints the panel and its image at the current zoom level, location, and interpolation method dependent on the image scale.voidpaintGlobalHistogram(java.awt.Graphics2D g)voidpaintImage(java.awt.Graphics2D g)voidpaintLogPopupCircle(java.awt.Graphics2D g)voidpaintPopup(java.awt.Graphics2D g)voidpaintPopupHistogram(java.awt.Graphics2D g, int offsetX, int offsetY)voidpause()Request the animation to pause.voidpauseResume()Request the animation to pause or resume.protected booleanprocessMouseMove(java.awt.event.MouseEvent e)Process a mouse move.voidrenderOneFrame()Request one frame of the animation to be rendered.voidresume()Resume the animation from pausing.voidseek(double time)Request the next animation frame to be rendered at the given time.voidsetAnimationEnabled(boolean enabled)Sets whether the animation is rendered and controls are displayed.voidsetAnimationEnabledChangedListener(AnimationEnabledChangedListener animationEnabledChangedListener)Sets a callback that is called whenever the user changes the animation enabled-ness.voidsetAnimationExtremeTimes(double animationMinUserTime, double animationMaxUserTime)Set the extreme times of the animation, in user times.voidsetAnimationGlobalEnabled(boolean animationGlobalEnabled)Sets the message of the helper items popup to enable or disable the animation.voidsetAnimationTimeChangedListener(AnimationTimeChangedListener listener)Sets a callback that is called whenever the time is updated.voidsetFilteredLog(IvMLogFilteredImpl ivMLogFiltered)voidsetGetExporters(GetExporters getExporters)voidsetHistogramData(HistogramData histogramData)voidsetPopupActivity(java.util.List<java.lang.String> popup, int popupHistogramUnode)voidsetPopupLogMove(java.util.List<java.lang.String> popup, LogMovePosition position)voidsetPopupStartEnd(java.util.List<java.lang.String> popup)voidsetShowPopup(boolean showPopup, int width)voidsetTimeScale(double timeScale)Request the time scale to be set.voidsetTokens(GraphVizTokens animationGraphVizTokens)Sets the tokens to be rendered.voidsetTraceColourMap(TraceColourMap trace2colour)-
Methods inherited from class org.processmining.plugins.graphviz.visualisation.DotPanel
addGraphChangedListener, addMouseInElementsChangedListener, addSelectionChangedListener, changeDot, changeDot, dot2svg, getAttributeOf, getDot, getEdges, getMouseInElements, getNodes, getSelectedElements, getSVG, getSVGElementOf, getUserSettings, processMouseClick, processMouseDrag, processMouseExit, processMouseRelease, select, setCSSAttributeOf, setCSSAttributeOf, setCSSAttributeOf, setDirection
-
Methods inherited from class org.processmining.plugins.graphviz.visualisation.NavigableSVGPanel
centerImageAround, drawSVG, exportView, getControlsProgressLine, getHelperControlsExplanations, getHelperControlsShortcuts, getImage, getImageBoundingBoxInUserCoordinates, getVisibleImageBoundingBoxInUserCoordinates, isAnimationControlsShowing, isImageCompletelyInPanel, isInAnimationControls, isInHelperControls, isInImage, isInNavigation, print, processMousePress, resetView, setHelperControlsExplanations, setHelperControlsShortcuts, setImage, setImageTransformationChangedListener, setTransformation, setupListeners, transformElement2Image, transformImage2User, transformImageToNavigation, transformNavigationToImage, transformUser2Image
-
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, 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, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, 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, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, 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, 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, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
-
-
-
-
Field Detail
-
popupRowHeight
public static final int popupRowHeight
- See Also:
- Constant Field Values
-
popupEmptyRowHeight
public static final int popupEmptyRowHeight
- See Also:
- Constant Field Values
-
popupPadding
public static final int popupPadding
- See Also:
- Constant Field Values
-
popupRightMargin
public static final int popupRightMargin
- See Also:
- Constant Field Values
-
popupHistogramHeight
public static final int popupHistogramHeight
- See Also:
- Constant Field Values
-
popupHistogramYPadding
public static final int popupHistogramYPadding
- See Also:
- Constant Field Values
-
animationEnabled
protected boolean animationEnabled
-
renderingThread
protected RenderingThread renderingThread
-
animationGlobalEnabledTrue
public static final java.lang.String animationGlobalEnabledTrue
- See Also:
- Constant Field Values
-
animationGlobalEnabledFalse
public static final java.lang.String animationGlobalEnabledFalse
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
InductiveVisualMinerAnimationPanel
public InductiveVisualMinerAnimationPanel(org.processmining.framework.plugin.ProMCanceller canceller, IvMDecoratorI decorator)
-
-
Method Detail
-
paintComponent
protected void paintComponent(java.awt.Graphics g)
Description copied from class:org.processmining.plugins.graphviz.visualisation.NavigableSVGPanelPaints the panel and its image at the current zoom level, location, and interpolation method dependent on the image scale.- Overrides:
paintComponentin classorg.processmining.plugins.graphviz.visualisation.NavigableSVGPanel- Parameters:
g- theGraphicscontext for painting
-
drawAnimation
protected void drawAnimation(java.awt.Graphics2D g)
Description copied from class:org.processmining.plugins.graphviz.visualisation.NavigableSVGPanelDraw the animation.- Overrides:
drawAnimationin classorg.processmining.plugins.graphviz.visualisation.NavigableSVGPanel
-
paintImage
public void paintImage(java.awt.Graphics2D g)
- Overrides:
paintImagein classorg.processmining.plugins.graphviz.visualisation.NavigableSVGPanel
-
paintLogPopupCircle
public void paintLogPopupCircle(java.awt.Graphics2D g)
-
paintPopup
public void paintPopup(java.awt.Graphics2D g)
-
paintPopupHistogram
public void paintPopupHistogram(java.awt.Graphics2D g, int offsetX, int offsetY)
-
paintGlobalHistogram
public void paintGlobalHistogram(java.awt.Graphics2D g)
-
isInLogPopupButton
public boolean isInLogPopupButton(java.awt.Point pointInUserCoordinates)
-
processMouseMove
protected boolean processMouseMove(java.awt.event.MouseEvent e)
Description copied from class:org.processmining.plugins.graphviz.visualisation.NavigableSVGPanelProcess a mouse move. Captured = true implies that the hover was already processed (and we should hide everything related to hovering).- Overrides:
processMouseMovein classorg.processmining.plugins.graphviz.visualisation.DotPanel- Returns:
- whether the move is hovering something.
-
setPopupActivity
public void setPopupActivity(java.util.List<java.lang.String> popup, int popupHistogramUnode)
-
setPopupLogMove
public void setPopupLogMove(java.util.List<java.lang.String> popup, LogMovePosition position)
-
setPopupStartEnd
public void setPopupStartEnd(java.util.List<java.lang.String> popup)
-
isShowPopup
public boolean isShowPopup()
-
setShowPopup
public void setShowPopup(boolean showPopup, int width)
-
getSplashScreen
public static org.processmining.plugins.graphviz.dot.Dot getSplashScreen()
-
getAnimationTimeChangedListener
public AnimationTimeChangedListener getAnimationTimeChangedListener()
-
setAnimationTimeChangedListener
public void setAnimationTimeChangedListener(AnimationTimeChangedListener listener)
Sets a callback that is called whenever the time is updated.- Parameters:
timeStepCallback-
-
setAnimationEnabledChangedListener
public void setAnimationEnabledChangedListener(AnimationEnabledChangedListener animationEnabledChangedListener)
Sets a callback that is called whenever the user changes the animation enabled-ness.- Parameters:
animationEnabledChangedListener-
-
setAnimationEnabled
public void setAnimationEnabled(boolean enabled)
Sets whether the animation is rendered and controls are displayed.
-
setAnimationGlobalEnabled
public void setAnimationGlobalEnabled(boolean animationGlobalEnabled)
Sets the message of the helper items popup to enable or disable the animation. Does not influence anything else.- Parameters:
animationGlobalEnabled-
-
setTokens
public void setTokens(GraphVizTokens animationGraphVizTokens)
Sets the tokens to be rendered.- Parameters:
animationGraphVizTokens-
-
isAnimationEnabled
public boolean isAnimationEnabled()
Description copied from class:org.processmining.plugins.graphviz.visualisation.NavigableSVGPanelNeeds to be overridden by a subclass.- Overrides:
isAnimationEnabledin classorg.processmining.plugins.graphviz.visualisation.NavigableSVGPanel- Returns:
- whether the animation is rendered and controls are displayed.
-
setAnimationExtremeTimes
public void setAnimationExtremeTimes(double animationMinUserTime, double animationMaxUserTime)Set the extreme times of the animation, in user times.- Parameters:
animationMinUserTime-animationMaxUserTime-
-
setFilteredLog
public void setFilteredLog(IvMLogFilteredImpl ivMLogFiltered)
-
setTraceColourMap
public void setTraceColourMap(TraceColourMap trace2colour)
-
setHistogramData
public void setHistogramData(HistogramData histogramData)
-
pause
public void pause()
Description copied from class:org.processmining.plugins.graphviz.visualisation.NavigableSVGPanelRequest the animation to pause. Needs to be overridden by a subclass.- Overrides:
pausein classorg.processmining.plugins.graphviz.visualisation.NavigableSVGPanel
-
resume
public void resume()
Description copied from class:org.processmining.plugins.graphviz.visualisation.NavigableSVGPanelResume the animation from pausing. Needs to be overridden by a subclass.- Overrides:
resumein classorg.processmining.plugins.graphviz.visualisation.NavigableSVGPanel
-
seek
public void seek(double time)
Description copied from class:org.processmining.plugins.graphviz.visualisation.NavigableSVGPanelRequest the next animation frame to be rendered at the given time. Needs to be overridden by a subclass.- Overrides:
seekin classorg.processmining.plugins.graphviz.visualisation.NavigableSVGPanel
-
pauseResume
public void pauseResume()
Description copied from class:org.processmining.plugins.graphviz.visualisation.NavigableSVGPanelRequest the animation to pause or resume. Needs to be overridden by a subclass.- Overrides:
pauseResumein classorg.processmining.plugins.graphviz.visualisation.NavigableSVGPanel
-
isAnimationPlaying
public boolean isAnimationPlaying()
Description copied from class:org.processmining.plugins.graphviz.visualisation.NavigableSVGPanelNeeds to be overridden by a subclass.- Overrides:
isAnimationPlayingin classorg.processmining.plugins.graphviz.visualisation.NavigableSVGPanel- Returns:
- whether the animation is currently playing (not paused)
-
getAnimationTime
public double getAnimationTime()
Description copied from class:org.processmining.plugins.graphviz.visualisation.NavigableSVGPanelNeeds to be overridden by a subclass.- Overrides:
getAnimationTimein classorg.processmining.plugins.graphviz.visualisation.NavigableSVGPanel- Returns:
- the current animation time.
-
getAnimationMinimumTime
public double getAnimationMinimumTime()
Description copied from class:org.processmining.plugins.graphviz.visualisation.NavigableSVGPanelNeeds to be overridden by a subclass.- Overrides:
getAnimationMinimumTimein classorg.processmining.plugins.graphviz.visualisation.NavigableSVGPanel- Returns:
- the minimum animation time.
-
getAnimationMaximumTime
public double getAnimationMaximumTime()
Description copied from class:org.processmining.plugins.graphviz.visualisation.NavigableSVGPanelNeeds to be overridden by a subclass.- Overrides:
getAnimationMaximumTimein classorg.processmining.plugins.graphviz.visualisation.NavigableSVGPanel- Returns:
- the maximum animation time.
-
renderOneFrame
public void renderOneFrame()
Description copied from class:org.processmining.plugins.graphviz.visualisation.NavigableSVGPanelRequest one frame of the animation to be rendered. Needs to be overridden by a subclass.- Overrides:
renderOneFramein classorg.processmining.plugins.graphviz.visualisation.NavigableSVGPanel
-
setTimeScale
public void setTimeScale(double timeScale)
Description copied from class:org.processmining.plugins.graphviz.visualisation.NavigableSVGPanelRequest the time scale to be set. Needs to be overridden by a subclass.- Overrides:
setTimeScalein classorg.processmining.plugins.graphviz.visualisation.NavigableSVGPanel
-
getTimeScale
public double getTimeScale()
Description copied from class:org.processmining.plugins.graphviz.visualisation.NavigableSVGPanelNeeds to be overridden by a subclass.- Overrides:
getTimeScalein classorg.processmining.plugins.graphviz.visualisation.NavigableSVGPanel- Returns:
- the time scale set, which is a 0 <= number <= 1.
-
getExporters
public java.util.List<org.processmining.plugins.graphviz.visualisation.export.Exporter> getExporters()
- Overrides:
getExportersin classorg.processmining.plugins.graphviz.visualisation.DotPanel- Returns:
- The list of exporters. Subclasses can override this to a relevant list. Called everytime the user attempts to export the image.
-
addAnimationEnabledChangedListener
public void addAnimationEnabledChangedListener(AnimationEnabledChangedListener animationEnabledChangedListener)
-
getGetExporters
public GetExporters getGetExporters()
-
setGetExporters
public void setGetExporters(GetExporters getExporters)
-
isMouseInLogPopupButton
public boolean isMouseInLogPopupButton()
-
addLogPopupListener
public void addLogPopupListener(LogPopupListener logPopupListener)
The log popup will only show if there are listeners registered.- Parameters:
logPopupListener-
-
-