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

All Implemented Interfaces:
    JMeterGUIComponent, Printable, Accessible, TransferHandler$HasGetTransferHandler, Serializable, MenuContainer, ImageObserver

This abstract class takes care of the most basic functions necessary to create a viable JMeter GUI component. It extends JPanel and implements JMeterGUIComponent. This abstract class is, in turn, extended by several other abstract classes that create different classes of GUI components for JMeter (Visualizers, Timers, Samplers, Modifiers, Controllers, etc).
Field Summary
protected  NamePanel namePanel    A GUI panel containing the name of this component. 
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 AbstractJMeterGuiComponent() 
Method from org.apache.jmeter.gui.AbstractJMeterGuiComponent Summary:
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.gui.AbstractJMeterGuiComponent Detail:
 public  void clearGui() 
    Provides a default implementation that resets the name field to the value of getStaticLabel(), reset comment and sets enabled to true. Your GUI may need more things cleared, in which case you should override, clear the extra fields, and still call super.clearGui().
 public  void configure(TestElement element) 
    A newly created gui component can be initialized with the contents of a Test Element object by calling this method. The component is responsible for querying the Test Element object for the relevant information to display in its GUI.

    AbstractJMeterGuiComponent provides a partial implementation of this method, setting the name of the component and its enabled status. Subclasses should override this method, performing their own configuration as needed, but also calling this super-implementation.

 protected  void configureTestElement(TestElement mc) 
    This provides a convenience for extenders when they implement the JMeterGUIComponent#modifyTestElement(TestElement) 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/modifying Test Elements, as that will best assure consistent behavior.
 protected Component createTitleLabel() 
    Provides a label containing the title for the component. Subclasses typically place this label at the top of their GUI. The title is set to the name returned from the component's getStaticLabel() method. Most components place this label automatically by calling #makeTitlePanel() instead of directly calling this method.
 public String getComment() 
    Provides a default implementation for the comment property. It's unlikely developers will need to override.
 public String getDocAnchor() 
 public String getName() 
    Provides a default implementation for the name property. It's unlikely developers will need to override.
 protected NamePanel getNamePanel() 
    Provides the Name Panel for extending classes. Extending classes are free to place it as desired within the component, or not at all. Most components place the NamePanel automatically by calling #makeTitlePanel() instead of directly calling this method.
 protected TreeNode getNode() 
    Provides a default implementation for the node property. It is unlikely developers would need to override this method.
 public JComponent getPrintableComponent() 
    Subclasses need to over-ride this method, if they wish to return something other than the Visualizer itself.
 public String getStaticLabel() 
 public boolean isEnabled() 
    Provides a default implementation for the enabled property. It's unlikely developers will need to override.
 protected Border makeBorder() 
    Create a top-level Border which can be added to JMeter components. Components typically set this as their border in their init method. It simply provides a nice spacing between the GUI components used and the edges of the window in which they appear.
 protected JScrollPane makeScrollPane(Component comp) 
    Create a scroll panel that sets it's preferred size to it's minimum size. Explicitly for scroll panes that live inside other scroll panes, or within containers that stretch components to fill the area they exist in. Use this for any component you would put in a scroll pane (such as TextAreas, tables, JLists, etc). It is here for convenience and to avoid duplicate code. JMeter displays best if you follow this custom.
 protected JScrollPane makeScrollPane(Component comp,
    int verticalPolicy,
    int horizontalPolicy) 
    Create a scroll panel that sets it's preferred size to it's minimum size. Explicitly for scroll panes that live inside other scroll panes, or within containers that stretch components to fill the area they exist in. Use this for any component you would put in a scroll pane (such as TextAreas, tables, JLists, etc). It is here for convenience and to avoid duplicate code. JMeter displays best if you follow this custom.
 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. This method is typically added to the top of the component at the beginning of the component's init method.
 public  void setComment(String comment) 
    Provides a default implementation for setting the comment property. It's unlikely developers will need to override.
 public  void setEnabled(boolean e) 
    Provides a default implementation for the enabled property. It's unlikely developers will need to override.
 public  void setName(String name) 
    Provides a default implementation for setting the name property. It's unlikely developers will need to override.
 public  void setNode(TreeNode node) 
    Provides a default implementation for the node property. It is unlikely developers would need to override this method.