Save This Page
Home » jakarta-jmeter-2.3.4_src » org.apache.jmeter.visualizers.gui » [javadoc | source]
org.apache.jmeter.visualizers.gui
abstract public class: AbstractVisualizer [javadoc | source]
java.lang.Object
   java.awt.Component
      java.awt.Container
         javax.swing.JComponent
            javax.swing.JPanel
               org.apache.jmeter.gui.AbstractJMeterGuiComponent
                  org.apache.jmeter.visualizers.gui.AbstractListenerGui
                     org.apache.jmeter.visualizers.gui.AbstractVisualizer

All Implemented Interfaces:
    Visualizer, UnsharedComponent, Clearable, ChangeListener, JMeterGUIComponent, Printable, Accessible, TransferHandler$HasGetTransferHandler, Serializable, MenuContainer, ImageObserver

Direct Known Subclasses:
    ProducerTableVisualizer, DistributionGraphVisualizer, StatGraphVisualizer, AssertionVisualizer, StatVisualizer, MonitorHealthVisualizer, TableVisualizer, SummaryReport, GraphAccumVisualizer, ViewResultsFullVisualizer, GraphVisualizer, SplineVisualizer, SimpleDataWriter, ConsumerTableVisualizer, MailerVisualizer, ConsumerSysTableVisualizer

This is the base class for JMeter GUI components which can display test results in some way. It provides the following conveniences to developers: For most developers, making a new visualizer is primarly for the purpose of either calculating new statistics on the sample results that other visualizers don't calculate, or displaying the results visually in a new and interesting way. Making a new visualizer for either of these purposes is easy - just extend this class and implement the add(SampleResult) method and display the results as you see fit. This AbstractVisualizer and the default ResultCollector handle logging and registering to receive SampleEvents for you - all you need to do is include the JPanel created by makeTitlePanel somewhere in your gui to allow users set the log file.

If you are doing more than that, you may need to extend ResultCollector as well and modify the #configure(TestElement) , #modifyTestElement(TestElement) , and #createTestElement() methods to create and modify your alternate ResultCollector. For an example of this, see the MailerVisualizer .

Field Summary
protected  ResultCollector collector     
protected  boolean isStats     
Fields inherited from org.apache.jmeter.gui.AbstractJMeterGuiComponent:
namePanel
Fields inherited from javax.swing.JComponent:
DEBUG_GRAPHICS_LOADED,  ui,  listenerList,  paintingChild,  WHEN_FOCUSED,  WHEN_ANCESTOR_OF_FOCUSED_COMPONENT,  WHEN_IN_FOCUSED_WINDOW,  UNDEFINED_CONDITION,  TOOL_TIP_TEXT_KEY,  focusController,  accessibleContext
Fields inherited from java.awt.Container:
ncomponents,  component,  layoutMgr,  containerListener,  listeningChildren,  listeningBoundsChildren,  descendantsCount,  INCLUDE_SELF,  SEARCH_HEAVYWEIGHTS,  modalComp,  modalAppContext,  $assertionsDisabled
Fields inherited from java.awt.Component:
peer,  parent,  appContext,  x,  y,  width,  height,  foreground,  background,  font,  peerFont,  cursor,  locale,  graphicsConfig,  bufferStrategy,  ignoreRepaint,  visible,  enabled,  valid,  dropTarget,  popups,  focusTraversalKeys,  LOCK,  minSize,  minSizeSet,  prefSize,  prefSizeSet,  maxSize,  maxSizeSet,  componentOrientation,  newEventsOnly,  componentListener,  focusListener,  hierarchyListener,  hierarchyBoundsListener,  keyListener,  mouseListener,  mouseMotionListener,  mouseWheelListener,  inputMethodListener,  windowClosingException,  actionListenerK,  adjustmentListenerK,  componentListenerK,  containerListenerK,  focusListenerK,  itemListenerK,  keyListenerK,  mouseListenerK,  mouseMotionListenerK,  mouseWheelListenerK,  textListenerK,  ownedWindowK,  windowListenerK,  inputMethodListenerK,  hierarchyListenerK,  hierarchyBoundsListenerK,  windowStateListenerK,  windowFocusListenerK,  eventMask,  isInc,  incRate,  TOP_ALIGNMENT,  CENTER_ALIGNMENT,  BOTTOM_ALIGNMENT,  LEFT_ALIGNMENT,  RIGHT_ALIGNMENT,  isPacked,  eventCache,  nativeInLightFixer,  accessibleContext,  $assertionsDisabled
Constructor:
 public AbstractVisualizer() 
Method from org.apache.jmeter.visualizers.gui.AbstractVisualizer Summary:
clearGui,   configure,   configureTestElement,   createTestElement,   getErrorLoggingCheckbox,   getFile,   getFilePanel,   getModel,   isStats,   makeTitlePanel,   modifyTestElement,   setFile,   setModel,   stateChanged
Methods from org.apache.jmeter.visualizers.gui.AbstractListenerGui:
createPopupMenu,   getMenuCategories
Methods from org.apache.jmeter.gui.AbstractJMeterGuiComponent:
clearGui,   configure,   configureTestElement,   createTitleLabel,   getComment,   getDocAnchor,   getName,   getNamePanel,   getNode,   getPrintableComponent,   getStaticLabel,   isEnabled,   makeBorder,   makeScrollPane,   makeScrollPane,   makeTitlePanel,   setComment,   setEnabled,   setName,   setNode
Methods from javax.swing.JPanel:
getAccessibleContext,   getUI,   getUIClassID,   paramString,   setUI,   updateUI
Methods from javax.swing.JComponent:
_paintImmediately,   access$100,   access$200,   addAncestorListener,   addNotify,   addVetoableChangeListener,   alwaysOnTop,   checkIfChildObscuredBySibling,   clientPropertyChanged,   compWriteObjectNotify,   componentInputMapChanged,   computeVisibleRect,   computeVisibleRect,   contains,   createToolTip,   disable,   dndDone,   dropLocationForPoint,   enable,   firePropertyChange,   firePropertyChange,   firePropertyChange,   fireVetoableChange,   getAccessibleContext,   getActionForKeyStroke,   getActionMap,   getActionMap,   getAlignmentX,   getAlignmentY,   getAncestorListeners,   getAutoscrolls,   getBaseline,   getBaselineResizeBehavior,   getBorder,   getBounds,   getClientProperty,   getComponentGraphics,   getComponentPopupMenu,   getConditionForKeyStroke,   getCreatedDoubleBuffer,   getDebugGraphicsOptions,   getDefaultLocale,   getFontMetrics,   getGraphics,   getGraphicsInvoked,   getHeight,   getInheritsPopupMenu,   getInputMap,   getInputMap,   getInputMap,   getInputVerifier,   getInsets,   getInsets,   getListeners,   getLocation,   getManagingFocusBackwardTraversalKeys,   getManagingFocusForwardTraversalKeys,   getMaximumSize,   getMinimumSize,   getNextFocusableComponent,   getPopupLocation,   getPreferredSize,   getRegisteredKeyStrokes,   getRootPane,   getSize,   getToolTipLocation,   getToolTipText,   getToolTipText,   getTopLevelAncestor,   getTransferHandler,   getUIClassID,   getVerifyInputWhenFocusTarget,   getVetoableChangeListeners,   getVisibleRect,   getWidth,   getWriteObjCounter,   getX,   getY,   grabFocus,   isDoubleBuffered,   isLightweightComponent,   isManagingFocus,   isOpaque,   isOptimizedDrawingEnabled,   isPainting,   isPaintingForPrint,   isPaintingOrigin,   isPaintingTile,   isRequestFocusEnabled,   isValidateRoot,   paint,   paintBorder,   paintChildren,   paintComponent,   paintForceDoubleBuffered,   paintImmediately,   paintImmediately,   paintToOffscreen,   paramString,   print,   printAll,   printBorder,   printChildren,   printComponent,   processComponentKeyEvent,   processKeyBinding,   processKeyBindings,   processKeyBindingsForAllComponents,   processKeyEvent,   processMouseEvent,   processMouseMotionEvent,   putClientProperty,   rectangleIsObscured,   registerKeyboardAction,   registerKeyboardAction,   removeAncestorListener,   removeNotify,   removeVetoableChangeListener,   repaint,   repaint,   requestDefaultFocus,   requestFocus,   requestFocus,   requestFocusInWindow,   requestFocusInWindow,   resetKeyboardActions,   reshape,   revalidate,   safelyGetGraphics,   safelyGetGraphics,   scrollRectToVisible,   setActionMap,   setAlignmentX,   setAlignmentY,   setAutoscrolls,   setBackground,   setBorder,   setComponentPopupMenu,   setCreatedDoubleBuffer,   setDebugGraphicsOptions,   setDefaultLocale,   setDoubleBuffered,   setDropLocation,   setEnabled,   setFocusTraversalKeys,   setFont,   setForeground,   setInheritsPopupMenu,   setInputMap,   setInputVerifier,   setMaximumSize,   setMinimumSize,   setNextFocusableComponent,   setOpaque,   setPaintingChild,   setPreferredSize,   setRequestFocusEnabled,   setToolTipText,   setTransferHandler,   setUI,   setUIProperty,   setVerifyInputWhenFocusTarget,   setVisible,   setWriteObjCounter,   shouldDebugGraphics,   superProcessMouseMotionEvent,   unregisterKeyboardAction,   update,   updateUI
Methods from java.awt.Container:
add,   add,   add,   add,   add,   addContainerListener,   addImpl,   addNotify,   addPropertyChangeListener,   addPropertyChangeListener,   adjustDecendantsOnParent,   adjustDescendants,   adjustListeningChildren,   applyComponentOrientation,   areFocusTraversalKeysSet,   canContainFocusOwner,   checkGD,   checkTreeLock,   clearCurrentFocusCycleRootOnHide,   clearMostRecentFocusOwnerOnHide,   containsFocus,   countComponents,   countHierarchyMembers,   createChildHierarchyEvents,   createHierarchyEvents,   deliverEvent,   dispatchEventImpl,   dispatchEventToSelf,   doLayout,   eventEnabled,   findComponentAt,   findComponentAt,   findComponentAt,   findComponentAtImpl,   getAccessibleAt,   getAccessibleChild,   getAccessibleChildrenCount,   getAlignmentX,   getAlignmentY,   getComponent,   getComponentAt,   getComponentAt,   getComponentCount,   getComponentZOrder,   getComponents,   getComponents_NoClientCode,   getContainerListeners,   getDropTargetEventTarget,   getFocusTraversalKeys,   getFocusTraversalPolicy,   getHeavyweightContainer,   getInsets,   getLayout,   getListeners,   getMaximumSize,   getMinimumSize,   getMouseEventTarget,   getMousePosition,   getPreferredSize,   initializeFocusTraversalKeys,   insets,   invalidate,   invalidateTree,   isAncestorOf,   isFocusCycleRoot,   isFocusCycleRoot,   isFocusTraversalPolicyProvider,   isFocusTraversalPolicySet,   isParentOf,   isSameOrAncestorOf,   layout,   lightweightPaint,   lightweightPrint,   list,   list,   locate,   minimumSize,   nextFocusHelper,   numListening,   paint,   paintComponents,   paintHeavyweightComponents,   paramString,   postProcessKeyEvent,   postsOldMouseEvents,   preProcessKeyEvent,   preferredSize,   print,   printComponents,   printHeavyweightComponents,   processContainerEvent,   processEvent,   proxyEnableEvents,   remove,   remove,   removeAll,   removeContainerListener,   removeNotify,   setComponentZOrder,   setFocusCycleRoot,   setFocusTraversalKeys,   setFocusTraversalPolicy,   setFocusTraversalPolicyProvider,   setFont,   setLayout,   transferFocusBackward,   transferFocusDownCycle,   update,   validate,   validateTree
Methods from java.awt.Component:
access$000,   access$100,   action,   add,   addComponentListener,   addFocusListener,   addHierarchyBoundsListener,   addHierarchyListener,   addInputMethodListener,   addKeyListener,   addMouseListener,   addMouseMotionListener,   addMouseWheelListener,   addNotify,   addPropertyChangeListener,   addPropertyChangeListener,   adjustListeningChildrenOnParent,   applyComponentOrientation,   areFocusTraversalKeysSet,   areInputMethodsEnabled,   autoProcessMouseWheel,   autoTransferFocus,   bounds,   canBeFocusOwner,   checkGD,   checkImage,   checkImage,   checkWindowClosingException,   clearCurrentFocusCycleRootOnHide,   clearMostRecentFocusOwnerOnHide,   coalesceEvents,   constructComponentName,   contains,   contains,   containsFocus,   countHierarchyMembers,   createBufferStrategy,   createBufferStrategy,   createHierarchyEvents,   createImage,   createImage,   createVolatileImage,   createVolatileImage,   deliverEvent,   disable,   disableEvents,   dispatchEvent,   dispatchEventImpl,   dispatchMouseWheelToAncestor,   doLayout,   enable,   enable,   enableEvents,   enableInputMethods,   eventEnabled,   eventTypeEnabled,   findUnderMouseInWindow,   firePropertyChange,   firePropertyChange,   firePropertyChange,   firePropertyChange,   firePropertyChange,   firePropertyChange,   firePropertyChange,   firePropertyChange,   firePropertyChange,   getAccessibleContext,   getAccessibleIndexInParent,   getAccessibleStateSet,   getAlignmentX,   getAlignmentY,   getBackBuffer,   getBackground,   getBaseline,   getBaselineResizeBehavior,   getBounds,   getBounds,   getBoundsOp,   getBufferStrategy,   getColorModel,   getComponentAt,   getComponentAt,   getComponentListeners,   getComponentOrientation,   getContainingWindow,   getContainingWindow,   getCursor,   getDropTarget,   getFocusCycleRootAncestor,   getFocusListeners,   getFocusTraversalKeys,   getFocusTraversalKeysEnabled,   getFocusTraversalKeys_NoIDCheck,   getFont,   getFontMetrics,   getFont_NoClientCode,   getForeground,   getGraphics,   getGraphicsConfiguration,   getGraphicsConfiguration_NoClientCode,   getGraphics_NoClientCode,   getHeight,   getHierarchyBoundsListeners,   getHierarchyListeners,   getIgnoreRepaint,   getInputContext,   getInputMethodListeners,   getInputMethodRequests,   getKeyListeners,   getListeners,   getLocale,   getLocation,   getLocation,   getLocationOnScreen,   getLocationOnScreen_NoTreeLock,   getMaximumSize,   getMinimumSize,   getMouseListeners,   getMouseMotionListeners,   getMousePosition,   getMouseWheelListeners,   getName,   getNativeContainer,   getParent,   getParent_NoClientCode,   getPeer,   getPreferredSize,   getPropertyChangeListeners,   getPropertyChangeListeners,   getSize,   getSize,   getToolkit,   getToolkitImpl,   getTreeLock,   getWidth,   getX,   getY,   gotFocus,   handleEvent,   hasFocus,   hide,   imageUpdate,   initializeFocusTraversalKeys,   inside,   invalidate,   isBackgroundSet,   isCoalescingEnabled,   isCursorSet,   isDisplayable,   isDoubleBuffered,   isEnabled,   isEnabledImpl,   isFocusCycleRoot,   isFocusOwner,   isFocusTraversable,   isFocusTraversableOverridden,   isFocusable,   isFontSet,   isForegroundSet,   isInstanceOf,   isLightweight,   isMaximumSizeSet,   isMinimumSizeSet,   isOpaque,   isPreferredSizeSet,   isRecursivelyVisible,   isSameOrAncestorOf,   isShowing,   isValid,   isVisible,   isVisible_NoClientCode,   keyDown,   keyUp,   layout,   lightweightPaint,   lightweightPrint,   list,   list,   list,   list,   list,   locate,   location,   lostFocus,   minimumSize,   mouseDown,   mouseDrag,   mouseEnter,   mouseExit,   mouseMove,   mouseUp,   move,   nextFocus,   nextFocusHelper,   numListening,   paint,   paintAll,   paintHeavyweightComponents,   paramString,   pointRelativeToComponent,   postEvent,   postNextFocusHelper,   postsOldMouseEvents,   preNextFocusHelper,   preferredSize,   prepareImage,   prepareImage,   print,   printAll,   printHeavyweightComponents,   processComponentEvent,   processEvent,   processFocusEvent,   processHierarchyBoundsEvent,   processHierarchyEvent,   processInputMethodEvent,   processKeyEvent,   processMouseEvent,   processMouseMotionEvent,   processMouseWheelEvent,   remove,   removeComponentListener,   removeFocusListener,   removeHierarchyBoundsListener,   removeHierarchyListener,   removeInputMethodListener,   removeKeyListener,   removeMouseListener,   removeMouseMotionListener,   removeMouseWheelListener,   removeNotify,   removePropertyChangeListener,   removePropertyChangeListener,   repaint,   repaint,   repaint,   repaint,   requestFocus,   requestFocus,   requestFocus,   requestFocus,   requestFocusHelper,   requestFocusHelper,   requestFocusInWindow,   requestFocusInWindow,   requestFocusInWindow,   requestFocusInWindow,   resetGC,   reshape,   resize,   resize,   setBackground,   setBounds,   setBounds,   setBoundsOp,   setComponentOrientation,   setCursor,   setDropTarget,   setEnabled,   setFocusTraversalKeys,   setFocusTraversalKeysEnabled,   setFocusTraversalKeys_NoIDCheck,   setFocusable,   setFont,   setForeground,   setGCFromPeer,   setIgnoreRepaint,   setLocale,   setLocation,   setLocation,   setMaximumSize,   setMinimumSize,   setName,   setPreferredSize,   setRequestFocusController,   setSize,   setSize,   setVisible,   show,   show,   size,   toString,   transferFocus,   transferFocusBackward,   transferFocusUpCycle,   update,   updateCursorImmediately,   validate
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.jmeter.visualizers.gui.AbstractVisualizer Detail:
 public  void clearGui() 
 public  void configure(TestElement el) 
 protected  void configureTestElement(AbstractListenerElement mc) 
    This provides a convenience for extenders when they implement the org.apache.jmeter.gui.JMeterGUIComponent#createTestElement() method. This method will set the name, gui class, and test class for the created Test Element. It should be called by every extending class when creating Test Elements, as that will best assure consistent behavior.
 public TestElement createTestElement() 
 protected JCheckBox getErrorLoggingCheckbox() 
    Gets the checkbox which selects whether or not only errors should be logged. Subclasses don't normally need to worry about this checkbox, because it is automatically added to the GUI in #makeTitlePanel() , and the behavior is handled in this base class.
 public String getFile() 
    Gets the filename which has been entered in the FilePanel. Subclasses don't normally need to call this method, because configuration of the FilePanel is handled in this base class.
 protected Component getFilePanel() 
    Gets the file panel which allows the user to save results to a file. Subclasses don't normally need to worry about this panel, because it is automatically added to the GUI in #makeTitlePanel() , and the behavior is handled in this base class.
 protected ResultCollector getModel() 
    Provides access to the ResultCollector model class for extending implementations. Using this method and setModel(ResultCollector) is only necessary if your visualizer requires a differently behaving ResultCollector. Using these methods will allow maximum reuse of the methods provided by AbstractVisualizer in this event.
 public boolean isStats() 
 protected Container makeTitlePanel() 
    Create a standard title section for JMeter components. This includes the title for the component and the Name Panel allowing the user to change the name for the component. The AbstractVisualizer also adds the FilePanel allowing the user to save the results, and the error logging checkbox, allowing the user to choose whether or not only errors should be logged.

    This method is typically added to the top of the component at the beginning of the component's init method.

 public  void modifyTestElement(TestElement c) 
 public  void setFile(String filename) 
    Sets the filename which results will be saved to. This will set the filename in the FilePanel. Subclasses don't normally need to call this method, because configuration of the FilePanel is handled in this base class.
 protected  void setModel(ResultCollector collector) 
    Provides extending classes the opportunity to set the ResultCollector model for the Visualizer. This is useful to allow maximum reuse of the methods from AbstractVisualizer.
 public  void stateChanged(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.