Class AbstractGraphPanelVisualizer

  • All Implemented Interfaces:
    java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, java.util.EventListener, javax.accessibility.Accessible, javax.swing.event.ChangeListener, SettingsInterface, org.apache.jmeter.gui.ClearGui, org.apache.jmeter.gui.JMeterGUIComponent, org.apache.jmeter.gui.UnsharedComponent, org.apache.jmeter.samplers.Clearable, org.apache.jmeter.visualizers.ImageVisualizer, org.apache.jmeter.visualizers.Printable, org.apache.jmeter.visualizers.Visualizer
    Direct Known Subclasses:
    AbstractOverTimeVisualizer, AbstractVsThreadVisualizer

    public abstract class AbstractGraphPanelVisualizer
    extends org.apache.jmeter.visualizers.gui.AbstractVisualizer
    implements org.apache.jmeter.samplers.Clearable, org.apache.jmeter.visualizers.ImageVisualizer, SettingsInterface
    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 ColorsDispatcher colors  
      static java.lang.String GRAPH_AGGREGATED  
      protected GraphPanel graphPanel  
      static java.lang.String INTERVAL_PROPERTY  
      protected boolean isAggregate  
      protected long lastRepaint  
      protected java.util.concurrent.ConcurrentSkipListMap<java.lang.String,​AbstractGraphRow> model  
      protected java.util.concurrent.ConcurrentSkipListMap<java.lang.String,​AbstractGraphRow> modelAggregate  
      protected long startTimeInf  
      protected long startTimeRef  
      protected long startTimeSup  
      • Fields inherited from class org.apache.jmeter.visualizers.gui.AbstractVisualizer

        collector, isStats
      • Fields inherited from class org.apache.jmeter.gui.AbstractJMeterGuiComponent

        namePanel
      • 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
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      void clearData()  
      void clearGui()  
      void configure​(org.apache.jmeter.testelement.TestElement el)  
      protected GraphPanel createGraphPanel()  
      protected abstract JSettingsPanel createSettingsPanel()  
      org.apache.jmeter.testelement.TestElement createTestElement()  
      protected java.awt.Component createTitleLabel()  
      protected void enableMaximize​(boolean enable)  
      int getGranulation()  
      GraphPanelChart getGraphPanelChart()  
      protected javax.swing.JPanel getGraphPanelContainer()
      Provide a JPanel with BorderLayout, holder of the GraphPanelChart, which will be placed in the BorderLayout.CENTER.
      java.awt.Image getImage()  
      protected AbstractGraphRow getNewRow​(java.util.concurrent.ConcurrentSkipListMap<java.lang.String,​AbstractGraphRow> model, int rowType, java.lang.String label, int markerSize, boolean isBarRow, boolean displayLabel, boolean thickLines, boolean showInLegend, boolean canCompose)  
      protected AbstractGraphRow getNewRow​(java.util.concurrent.ConcurrentSkipListMap<java.lang.String,​AbstractGraphRow> model, int rowType, java.lang.String label, int markerSize, boolean isBarRow, boolean displayLabel, boolean thickLines, boolean showInLegend, java.awt.Color color, boolean canCompose)  
      JSettingsPanel getSettingsPanel()  
      abstract java.lang.String getStaticLabel()  
      protected void hideFilePanel()  
      protected boolean isFromTransactionControler​(org.apache.jmeter.samplers.SampleResult res)  
      boolean isIgnoreCurrentTestStartTime()
      Ignore current test start time(ie take it from reload test data) this is needed for visualizer that don't use current tests data but reload from file
      protected boolean isSampleIncluded​(java.lang.String sampleLabel)  
      protected boolean isSampleIncluded​(org.apache.jmeter.samplers.SampleResult res)  
      void modifyTestElement​(org.apache.jmeter.testelement.TestElement c)  
      protected void setExtraChartSettings()  
      void setGranulation​(int granulation)  
      void setIgnoreCurrentTestStartTime()
      Ignore current test start time(ie take it from reload test data) this is needed for visualizer that don't use current tests data but reload from file
      void setUpFiltering​(CorrectedResultCollector rc)  
      void stateChanged​(javax.swing.event.ChangeEvent e)
      Invoked when the target of the listener has changed its state.
      void switchModel​(boolean aggregate)  
      void updateGui()  
      void updateGui​(org.apache.jmeter.visualizers.Sample sample)  
      • Methods inherited from class org.apache.jmeter.visualizers.gui.AbstractVisualizer

        configureTestElement, getErrorLoggingCheckbox, getFile, getFilePanel, getModel, isStats, makeTitlePanel, setFile, setModel
      • Methods inherited from class org.apache.jmeter.visualizers.gui.AbstractListenerGui

        createPopupMenu, getMenuCategories
      • Methods inherited from class org.apache.jmeter.gui.AbstractJMeterGuiComponent

        configureTestElement, getComment, getDocAnchor, getName, getNamePanel, getPrintableComponent, isEnabled, makeBorder, makeScrollPane, makeScrollPane, setComment, setEnabled, setName
      • 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, 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, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, 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, getParent, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, 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, 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
      • Methods inherited from interface org.apache.jmeter.gui.JMeterGUIComponent

        getLabelResource
      • Methods inherited from interface org.apache.jmeter.visualizers.Visualizer

        add
    • Field Detail

      • model

        protected java.util.concurrent.ConcurrentSkipListMap<java.lang.String,​AbstractGraphRow> model
      • modelAggregate

        protected java.util.concurrent.ConcurrentSkipListMap<java.lang.String,​AbstractGraphRow> modelAggregate
      • lastRepaint

        protected long lastRepaint
      • isAggregate

        protected boolean isAggregate
      • INTERVAL_PROPERTY

        public static final java.lang.String INTERVAL_PROPERTY
        See Also:
        Constant Field Values
      • GRAPH_AGGREGATED

        public static final java.lang.String GRAPH_AGGREGATED
        See Also:
        Constant Field Values
      • startTimeRef

        protected long startTimeRef
      • startTimeInf

        protected long startTimeInf
      • startTimeSup

        protected long startTimeSup
    • Constructor Detail

      • AbstractGraphPanelVisualizer

        public AbstractGraphPanelVisualizer()
    • Method Detail

      • createSettingsPanel

        protected abstract JSettingsPanel createSettingsPanel()
      • getStaticLabel

        public abstract java.lang.String getStaticLabel()
        Specified by:
        getStaticLabel in interface org.apache.jmeter.gui.JMeterGUIComponent
        Overrides:
        getStaticLabel in class org.apache.jmeter.gui.AbstractJMeterGuiComponent
      • createTitleLabel

        protected java.awt.Component createTitleLabel()
        Overrides:
        createTitleLabel in class org.apache.jmeter.gui.AbstractJMeterGuiComponent
      • enableMaximize

        protected void enableMaximize​(boolean enable)
      • hideFilePanel

        protected void hideFilePanel()
      • getGraphPanelContainer

        protected javax.swing.JPanel getGraphPanelContainer()
        Provide a JPanel with BorderLayout, holder of the GraphPanelChart, which will be placed in the BorderLayout.CENTER. It can be overridden to create custom Visualizer layout. Note the JMeter file panel can be retrieved with getFilePanel() and moved in.
        Returns:
        a JPanel with a BorderLayout
      • createGraphPanel

        protected GraphPanel createGraphPanel()
      • setExtraChartSettings

        protected void setExtraChartSettings()
      • updateGui

        public void updateGui​(org.apache.jmeter.visualizers.Sample sample)
      • updateGui

        public void updateGui()
      • clearData

        public void clearData()
        Specified by:
        clearData in interface org.apache.jmeter.samplers.Clearable
      • getImage

        public java.awt.Image getImage()
        Specified by:
        getImage in interface org.apache.jmeter.visualizers.ImageVisualizer
      • stateChanged

        public void stateChanged​(javax.swing.event.ChangeEvent e)
        Invoked when the target of the listener has changed its state. This implementation assumes that the target is the FilePanel, and will update the result collector for the new filename.
        Specified by:
        stateChanged in interface javax.swing.event.ChangeListener
        Overrides:
        stateChanged in class org.apache.jmeter.visualizers.gui.AbstractVisualizer
        Parameters:
        e - the event that has occurred
      • createTestElement

        public org.apache.jmeter.testelement.TestElement createTestElement()
        Specified by:
        createTestElement in interface org.apache.jmeter.gui.JMeterGUIComponent
        Overrides:
        createTestElement in class org.apache.jmeter.visualizers.gui.AbstractVisualizer
      • modifyTestElement

        public void modifyTestElement​(org.apache.jmeter.testelement.TestElement c)
        Specified by:
        modifyTestElement in interface org.apache.jmeter.gui.JMeterGUIComponent
        Overrides:
        modifyTestElement in class org.apache.jmeter.visualizers.gui.AbstractVisualizer
      • configure

        public void configure​(org.apache.jmeter.testelement.TestElement el)
        Specified by:
        configure in interface org.apache.jmeter.gui.JMeterGUIComponent
        Overrides:
        configure in class org.apache.jmeter.visualizers.gui.AbstractVisualizer
      • getNewRow

        protected AbstractGraphRow getNewRow​(java.util.concurrent.ConcurrentSkipListMap<java.lang.String,​AbstractGraphRow> model,
                                             int rowType,
                                             java.lang.String label,
                                             int markerSize,
                                             boolean isBarRow,
                                             boolean displayLabel,
                                             boolean thickLines,
                                             boolean showInLegend,
                                             java.awt.Color color,
                                             boolean canCompose)
      • getNewRow

        protected AbstractGraphRow getNewRow​(java.util.concurrent.ConcurrentSkipListMap<java.lang.String,​AbstractGraphRow> model,
                                             int rowType,
                                             java.lang.String label,
                                             int markerSize,
                                             boolean isBarRow,
                                             boolean displayLabel,
                                             boolean thickLines,
                                             boolean showInLegend,
                                             boolean canCompose)
      • isFromTransactionControler

        protected boolean isFromTransactionControler​(org.apache.jmeter.samplers.SampleResult res)
      • getSettingsPanel

        public JSettingsPanel getSettingsPanel()
        Returns:
        the settingsPanel
      • isSampleIncluded

        protected boolean isSampleIncluded​(org.apache.jmeter.samplers.SampleResult res)
      • isSampleIncluded

        protected boolean isSampleIncluded​(java.lang.String sampleLabel)
      • setIgnoreCurrentTestStartTime

        public void setIgnoreCurrentTestStartTime()
        Ignore current test start time(ie take it from reload test data) this is needed for visualizer that don't use current tests data but reload from file
      • isIgnoreCurrentTestStartTime

        public boolean isIgnoreCurrentTestStartTime()
        Ignore current test start time(ie take it from reload test data) this is needed for visualizer that don't use current tests data but reload from file
        Returns:
        the ignoreTestStartTime
      • clearGui

        public void clearGui()
        Specified by:
        clearGui in interface org.apache.jmeter.gui.ClearGui
        Overrides:
        clearGui in class org.apache.jmeter.visualizers.gui.AbstractVisualizer