org.apache.jmeter.testbeans.gui

## Class TableEditor

- java.lang.Object
- - java.beans.PropertyEditorSupport
  - - org.apache.jmeter.testbeans.gui.TableEditor

- All Implemented Interfaces:
    java.awt.event.FocusListener, java.beans.PropertyEditor, java.util.EventListener, javax.swing.event.TableModelListener, ClearGui, TestBeanPropertyEditor

      public class TableEditor
      extends java.beans.PropertyEditorSupport
      implements java.awt.event.FocusListener, TestBeanPropertyEditor, javax.swing.event.TableModelListener, ClearGui

  Table editor for TestBean GUI properties. Currently only works for:
  - property type Collection of `String`s, where there is a single header entry

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.lang.String` | `CLASSNAME` attribute name for class name of a table row; value must be java.lang.String, or a class which supports set and get/is methods for the property name.
    `static java.lang.String` | `HEADERS` attribute name for table headers, value must be a String array.
    `static java.lang.String` | `OBJECT_PROPERTIES` attribute name for property names within the `CLASSNAME`, value must be String array

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `TableEditor()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `clearGui()` Clear the gui and return it to initial default values.
    `void` | `focusGained(java.awt.event.FocusEvent e)`
    `void` | `focusLost(java.awt.event.FocusEvent e)`
    `java.lang.String` | `getAsText()`
    `java.awt.Component` | `getCustomEditor()`
    `java.lang.Object` | `getValue()`
    `void` | `setAsText(java.lang.String text)`
    `void` | `setDescriptor(java.beans.PropertyDescriptor descriptor)` For the table editor, the CLASSNAME attribute must simply be the name of the class of object it will hold where each row holds one object.
    `void` | `setValue(java.lang.Object value)`
    `boolean` | `supportsCustomEditor()`
    `void` | `tableChanged(javax.swing.event.TableModelEvent e)`

    - ### Methods inherited from class java.beans.PropertyEditorSupport

      `addPropertyChangeListener, firePropertyChange, getJavaInitializationString, getSource, getTags, isPaintable, paintValue, removePropertyChangeListener, setSource`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface java.beans.PropertyEditor

      `addPropertyChangeListener, getJavaInitializationString, getTags, isPaintable, paintValue, removePropertyChangeListener`

- - ### Field Detail

    - #### CLASSNAME

          public static final java.lang.String CLASSNAME

      attribute name for class name of a table row; value must be java.lang.String, or a class which supports set and get/is methods for the property name.
      See Also:
        Constant Field Values

    - #### HEADERS

          public static final java.lang.String HEADERS

      attribute name for table headers, value must be a String array. If `CLASSNAME` is java.lang.String, there must be only a single entry.
      See Also:
        Constant Field Values

    - #### OBJECT_PROPERTIES

          public static final java.lang.String OBJECT_PROPERTIES

      attribute name for property names within the `CLASSNAME`, value must be String array
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### TableEditor

          public TableEditor()

  - ### Method Detail

    - #### getAsText

          public java.lang.String getAsText()

      Specified by:
        `getAsText` in interface `java.beans.PropertyEditor`
      Overrides:
        `getAsText` in class `java.beans.PropertyEditorSupport`

    - #### getCustomEditor

          public java.awt.Component getCustomEditor()

      Specified by:
        `getCustomEditor` in interface `java.beans.PropertyEditor`
      Overrides:
        `getCustomEditor` in class `java.beans.PropertyEditorSupport`

    - #### getValue

          public java.lang.Object getValue()

      Specified by:
        `getValue` in interface `java.beans.PropertyEditor`
      Overrides:
        `getValue` in class `java.beans.PropertyEditorSupport`

    - #### setAsText

          public void setAsText(java.lang.String text)
                         throws java.lang.IllegalArgumentException

      Specified by:
        `setAsText` in interface `java.beans.PropertyEditor`
      Overrides:
        `setAsText` in class `java.beans.PropertyEditorSupport`
      Throws:
        `java.lang.IllegalArgumentException`

    - #### setValue

          public void setValue(java.lang.Object value)

      Specified by:
        `setValue` in interface `java.beans.PropertyEditor`
      Overrides:
        `setValue` in class `java.beans.PropertyEditorSupport`

    - #### supportsCustomEditor

          public boolean supportsCustomEditor()

      Specified by:
        `supportsCustomEditor` in interface `java.beans.PropertyEditor`
      Overrides:
        `supportsCustomEditor` in class `java.beans.PropertyEditorSupport`

    - #### setDescriptor

          public void setDescriptor(java.beans.PropertyDescriptor descriptor)

      For the table editor, the CLASSNAME attribute must simply be the name of the class of object it will hold where each row holds one object.
      Specified by:
        `setDescriptor` in interface `TestBeanPropertyEditor`

    - #### tableChanged

          public void tableChanged(javax.swing.event.TableModelEvent e)

      Specified by:
        `tableChanged` in interface `javax.swing.event.TableModelListener`

    - #### focusGained

          public void focusGained(java.awt.event.FocusEvent e)

      Specified by:
        `focusGained` in interface `java.awt.event.FocusListener`

    - #### focusLost

          public void focusLost(java.awt.event.FocusEvent e)

      Specified by:
        `focusLost` in interface `java.awt.event.FocusListener`

    - #### clearGui

          public void clearGui()

      Description copied from interface: `ClearGui`
      Clear the gui and return it to initial default values. This is necessary because most gui classes are instantiated just once and re-used for multiple test element objects and thus they need to be cleared between uses.
      Specified by:
        `clearGui` in interface `ClearGui`

Copyright © 1998-2018 Apache Software Foundation. All Rights Reserved.