Package org.apache.jmeter.testbeans.gui
Class FileEditor
- java.lang.Object
-
- org.apache.jmeter.testbeans.gui.FileEditor
-
- All Implemented Interfaces:
ActionListener,PropertyEditor,EventListener
public class FileEditor extends Object implements PropertyEditor, 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 Description FileEditor()Deprecated.Only for use by test casesFileEditor(PropertyDescriptor descriptor)Construct aFileEditorusing the properties of the givenPropertyDescriptor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidactionPerformed(ActionEvent e)voidaddPropertyChangeListener(PropertyChangeListener listener)StringgetAsText()ComponentgetCustomEditor()StringgetJavaInitializationString()String[]getTags()ObjectgetValue()booleanisPaintable()voidpaintValue(Graphics gfx, Rectangle box)voidremovePropertyChangeListener(PropertyChangeListener listener)voidsetAsText(String text)voidsetValue(Object value)booleansupportsCustomEditor()
-
-
-
Constructor Detail
-
FileEditor
@Deprecated public FileEditor() throws IntrospectionException
Deprecated.Only for use by test cases- Throws:
IntrospectionException- when introspection fails while creating a dummy PropertyDescriptor
-
FileEditor
public FileEditor(PropertyDescriptor descriptor)
Construct aFileEditorusing the properties of the givenPropertyDescriptor- Parameters:
descriptor- thePropertyDescriptorto be used. Must not benull- Throws:
IllegalArgumentException- whendescriptorisnull
-
-
Method Detail
-
actionPerformed
public void actionPerformed(ActionEvent e)
- Specified by:
actionPerformedin interfaceActionListener
-
addPropertyChangeListener
public void addPropertyChangeListener(PropertyChangeListener listener)
- Specified by:
addPropertyChangeListenerin interfacePropertyEditor
-
getAsText
public String getAsText()
- Specified by:
getAsTextin interfacePropertyEditor- Returns:
- the text
-
getCustomEditor
public Component getCustomEditor()
- Specified by:
getCustomEditorin interfacePropertyEditor- Returns:
- custom editor panel
-
getJavaInitializationString
public String getJavaInitializationString()
- Specified by:
getJavaInitializationStringin interfacePropertyEditor- Returns:
- the Java initialisation string
-
getTags
public String[] getTags()
- Specified by:
getTagsin interfacePropertyEditor- Returns:
- the editor tags
-
getValue
public Object getValue()
- Specified by:
getValuein interfacePropertyEditor- Returns:
- the value
-
isPaintable
public boolean isPaintable()
- Specified by:
isPaintablein interfacePropertyEditor- Returns:
- true if the editor is paintable
-
paintValue
public void paintValue(Graphics gfx, Rectangle box)
- Specified by:
paintValuein interfacePropertyEditor
-
removePropertyChangeListener
public void removePropertyChangeListener(PropertyChangeListener listener)
- Specified by:
removePropertyChangeListenerin interfacePropertyEditor
-
setAsText
public void setAsText(String text) throws IllegalArgumentException
- Specified by:
setAsTextin interfacePropertyEditor- Throws:
IllegalArgumentException
-
setValue
public void setValue(Object value)
- Specified by:
setValuein interfacePropertyEditor
-
supportsCustomEditor
public boolean supportsCustomEditor()
- Specified by:
supportsCustomEditorin interfacePropertyEditor- Returns:
- true if supports a custom editor
-
-