Class 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.DotPanel
    This 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
      • 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
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected boolean animationEnabled  
      static java.lang.String animationGlobalEnabledFalse  
      static java.lang.String animationGlobalEnabledTrue  
      static int popupEmptyRowHeight  
      static int popupHistogramHeight  
      static int popupHistogramYPadding  
      static int popupPadding  
      static int popupRightMargin  
      static int popupRowHeight  
      protected RenderingThread renderingThread  
      • 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
      • Fields inherited from interface java.awt.image.ImageObserver

        ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
      • Fields inherited from interface java.awt.print.Printable

        NO_SUCH_PAGE, PAGE_EXISTS
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addAnimationEnabledChangedListener​(AnimationEnabledChangedListener animationEnabledChangedListener)  
      void addLogPopupListener​(LogPopupListener logPopupListener)
      The log popup will only show if there are listeners registered.
      protected void drawAnimation​(java.awt.Graphics2D g)
      Draw the animation.
      double getAnimationMaximumTime()
      Needs to be overridden by a subclass.
      double getAnimationMinimumTime()
      Needs to be overridden by a subclass.
      double getAnimationTime()
      Needs to be overridden by a subclass.
      AnimationTimeChangedListener getAnimationTimeChangedListener()  
      java.util.List<org.processmining.plugins.graphviz.visualisation.export.Exporter> getExporters()  
      GetExporters getGetExporters()  
      static org.processmining.plugins.graphviz.dot.Dot getSplashScreen()  
      double getTimeScale()
      Needs to be overridden by a subclass.
      boolean isAnimationEnabled()
      Needs to be overridden by a subclass.
      boolean isAnimationPlaying()
      Needs to be overridden by a subclass.
      boolean isInLogPopupButton​(java.awt.Point pointInUserCoordinates)  
      boolean isMouseInLogPopupButton()  
      boolean isShowPopup()  
      protected void paintComponent​(java.awt.Graphics g)
      Paints the panel and its image at the current zoom level, location, and interpolation method dependent on the image scale.
      void paintGlobalHistogram​(java.awt.Graphics2D g)  
      void paintImage​(java.awt.Graphics2D g)  
      void paintLogPopupCircle​(java.awt.Graphics2D g)  
      void paintPopup​(java.awt.Graphics2D g)  
      void paintPopupHistogram​(java.awt.Graphics2D g, int offsetX, int offsetY)  
      void pause()
      Request the animation to pause.
      void pauseResume()
      Request the animation to pause or resume.
      protected boolean processMouseMove​(java.awt.event.MouseEvent e)
      Process a mouse move.
      void renderOneFrame()
      Request one frame of the animation to be rendered.
      void resume()
      Resume the animation from pausing.
      void seek​(double time)
      Request the next animation frame to be rendered at the given time.
      void setAnimationEnabled​(boolean enabled)
      Sets whether the animation is rendered and controls are displayed.
      void setAnimationEnabledChangedListener​(AnimationEnabledChangedListener animationEnabledChangedListener)
      Sets a callback that is called whenever the user changes the animation enabled-ness.
      void setAnimationExtremeTimes​(double animationMinUserTime, double animationMaxUserTime)
      Set the extreme times of the animation, in user times.
      void setAnimationGlobalEnabled​(boolean animationGlobalEnabled)
      Sets the message of the helper items popup to enable or disable the animation.
      void setAnimationTimeChangedListener​(AnimationTimeChangedListener listener)
      Sets a callback that is called whenever the time is updated.
      void setFilteredLog​(IvMLogFilteredImpl ivMLogFiltered)  
      void setGetExporters​(GetExporters getExporters)  
      void setHistogramData​(HistogramData histogramData)  
      void setPopupActivity​(java.util.List<java.lang.String> popup, int popupHistogramUnode)  
      void setPopupLogMove​(java.util.List<java.lang.String> popup, LogMovePosition position)  
      void setPopupStartEnd​(java.util.List<java.lang.String> popup)  
      void setShowPopup​(boolean showPopup, int width)  
      void setTimeScale​(double timeScale)
      Request the time scale to be set.
      void setTokens​(GraphVizTokens animationGraphVizTokens)
      Sets the tokens to be rendered.
      void setTraceColourMap​(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
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • 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.NavigableSVGPanel
        Paints the panel and its image at the current zoom level, location, and interpolation method dependent on the image scale.

        Overrides:
        paintComponent in class org.processmining.plugins.graphviz.visualisation.NavigableSVGPanel
        Parameters:
        g - the Graphics context for painting
      • drawAnimation

        protected void drawAnimation​(java.awt.Graphics2D g)
        Description copied from class: org.processmining.plugins.graphviz.visualisation.NavigableSVGPanel
        Draw the animation.
        Overrides:
        drawAnimation in class org.processmining.plugins.graphviz.visualisation.NavigableSVGPanel
      • paintImage

        public void paintImage​(java.awt.Graphics2D g)
        Overrides:
        paintImage in class org.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.NavigableSVGPanel
        Process a mouse move. Captured = true implies that the hover was already processed (and we should hide everything related to hovering).
        Overrides:
        processMouseMove in class org.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()
      • 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.NavigableSVGPanel
        Needs to be overridden by a subclass.
        Overrides:
        isAnimationEnabled in class org.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 -
      • 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.NavigableSVGPanel
        Request the animation to pause. Needs to be overridden by a subclass.
        Overrides:
        pause in class org.processmining.plugins.graphviz.visualisation.NavigableSVGPanel
      • resume

        public void resume()
        Description copied from class: org.processmining.plugins.graphviz.visualisation.NavigableSVGPanel
        Resume the animation from pausing. Needs to be overridden by a subclass.
        Overrides:
        resume in class org.processmining.plugins.graphviz.visualisation.NavigableSVGPanel
      • seek

        public void seek​(double time)
        Description copied from class: org.processmining.plugins.graphviz.visualisation.NavigableSVGPanel
        Request the next animation frame to be rendered at the given time. Needs to be overridden by a subclass.
        Overrides:
        seek in class org.processmining.plugins.graphviz.visualisation.NavigableSVGPanel
      • pauseResume

        public void pauseResume()
        Description copied from class: org.processmining.plugins.graphviz.visualisation.NavigableSVGPanel
        Request the animation to pause or resume. Needs to be overridden by a subclass.
        Overrides:
        pauseResume in class org.processmining.plugins.graphviz.visualisation.NavigableSVGPanel
      • isAnimationPlaying

        public boolean isAnimationPlaying()
        Description copied from class: org.processmining.plugins.graphviz.visualisation.NavigableSVGPanel
        Needs to be overridden by a subclass.
        Overrides:
        isAnimationPlaying in class org.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.NavigableSVGPanel
        Needs to be overridden by a subclass.
        Overrides:
        getAnimationTime in class org.processmining.plugins.graphviz.visualisation.NavigableSVGPanel
        Returns:
        the current animation time.
      • getAnimationMinimumTime

        public double getAnimationMinimumTime()
        Description copied from class: org.processmining.plugins.graphviz.visualisation.NavigableSVGPanel
        Needs to be overridden by a subclass.
        Overrides:
        getAnimationMinimumTime in class org.processmining.plugins.graphviz.visualisation.NavigableSVGPanel
        Returns:
        the minimum animation time.
      • getAnimationMaximumTime

        public double getAnimationMaximumTime()
        Description copied from class: org.processmining.plugins.graphviz.visualisation.NavigableSVGPanel
        Needs to be overridden by a subclass.
        Overrides:
        getAnimationMaximumTime in class org.processmining.plugins.graphviz.visualisation.NavigableSVGPanel
        Returns:
        the maximum animation time.
      • renderOneFrame

        public void renderOneFrame()
        Description copied from class: org.processmining.plugins.graphviz.visualisation.NavigableSVGPanel
        Request one frame of the animation to be rendered. Needs to be overridden by a subclass.
        Overrides:
        renderOneFrame in class org.processmining.plugins.graphviz.visualisation.NavigableSVGPanel
      • setTimeScale

        public void setTimeScale​(double timeScale)
        Description copied from class: org.processmining.plugins.graphviz.visualisation.NavigableSVGPanel
        Request the time scale to be set. Needs to be overridden by a subclass.
        Overrides:
        setTimeScale in class org.processmining.plugins.graphviz.visualisation.NavigableSVGPanel
      • getTimeScale

        public double getTimeScale()
        Description copied from class: org.processmining.plugins.graphviz.visualisation.NavigableSVGPanel
        Needs to be overridden by a subclass.
        Overrides:
        getTimeScale in class org.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:
        getExporters in class org.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.
      • 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 -