org.apache.jmeter.testbeans.gui

## Class FileEditor

- java.lang.Object
- - org.apache.jmeter.testbeans.gui.FileEditor

- All Implemented Interfaces:
    java.awt.event.ActionListener, java.beans.PropertyEditor, java.util.EventListener

      public class FileEditor
      extends java.lang.Object
      implements java.beans.PropertyEditor, java.awt.event.ActionListener

  A property editor for File properties.

  Note that it never gives out File objects, but always Strings. This is because JMeter is now too dumb to handle File objects (there's no FileProperty).

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `FileEditor()` Deprecated. Only for use by test cases
    `FileEditor(java.beans.PropertyDescriptor descriptor)` Construct a `FileEditor` using the properties of the given `PropertyDescriptor`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `actionPerformed(java.awt.event.ActionEvent e)`
    `void` | `addPropertyChangeListener(java.beans.PropertyChangeListener listener)`
    `java.lang.String` | `getAsText()`
    `java.awt.Component` | `getCustomEditor()`
    `java.lang.String` | `getJavaInitializationString()`
    `java.lang.String[]` | `getTags()`
    `java.lang.Object` | `getValue()`
    `boolean` | `isPaintable()`
    `void` | `paintValue(java.awt.Graphics gfx, java.awt.Rectangle box)`
    `void` | `removePropertyChangeListener(java.beans.PropertyChangeListener listener)`
    `void` | `setAsText(java.lang.String text)`
    `void` | `setValue(java.lang.Object value)`
    `boolean` | `supportsCustomEditor()`

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

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

- - ### Constructor Detail

    - #### FileEditor

          @Deprecated
          public FileEditor()
                                 throws java.beans.IntrospectionException

      Deprecated. Only for use by test cases
      Throws:
        `java.beans.IntrospectionException` - when introspection fails while creating a dummy PropertyDescriptor

    - #### FileEditor

          public FileEditor(java.beans.PropertyDescriptor descriptor)

      Construct a `FileEditor` using the properties of the given `PropertyDescriptor`
      Parameters:
        `descriptor` - the `PropertyDescriptor` to be used. Must not be `null`
      Throws:
        `java.lang.IllegalArgumentException` - when `descriptor` is `null`

  - ### Method Detail

    - #### actionPerformed

          public void actionPerformed(java.awt.event.ActionEvent e)

      Specified by:
        `actionPerformed` in interface `java.awt.event.ActionListener`

    - #### addPropertyChangeListener

          public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)

      Specified by:
        `addPropertyChangeListener` in interface `java.beans.PropertyEditor`

    - #### getAsText

          public java.lang.String getAsText()

      Specified by:
        `getAsText` in interface `java.beans.PropertyEditor`
      Returns:
        the text

    - #### getCustomEditor

          public java.awt.Component getCustomEditor()

      Specified by:
        `getCustomEditor` in interface `java.beans.PropertyEditor`
      Returns:
        custom editor panel

    - #### getJavaInitializationString

          public java.lang.String getJavaInitializationString()

      Specified by:
        `getJavaInitializationString` in interface `java.beans.PropertyEditor`
      Returns:
        the Java initialisation string

    - #### getTags

          public java.lang.String[] getTags()

      Specified by:
        `getTags` in interface `java.beans.PropertyEditor`
      Returns:
        the editor tags

    - #### getValue

          public java.lang.Object getValue()

      Specified by:
        `getValue` in interface `java.beans.PropertyEditor`
      Returns:
        the value

    - #### isPaintable

          public boolean isPaintable()

      Specified by:
        `isPaintable` in interface `java.beans.PropertyEditor`
      Returns:
        true if the editor is paintable

    - #### paintValue

          public void paintValue(java.awt.Graphics gfx,
                                 java.awt.Rectangle box)

      Specified by:
        `paintValue` in interface `java.beans.PropertyEditor`

    - #### removePropertyChangeListener

          public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)

      Specified by:
        `removePropertyChangeListener` in interface `java.beans.PropertyEditor`

    - #### setAsText

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

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

    - #### setValue

          public void setValue(java.lang.Object value)

      Specified by:
        `setValue` in interface `java.beans.PropertyEditor`

    - #### supportsCustomEditor

          public boolean supportsCustomEditor()

      Specified by:
        `supportsCustomEditor` in interface `java.beans.PropertyEditor`
      Returns:
        true if supports a custom editor

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