Package org.apache.jmeter.testbeans.gui
Class TableEditor
java.lang.Object
java.beans.PropertyEditorSupport
org.apache.jmeter.testbeans.gui.TableEditor
- All Implemented Interfaces:
FocusListener
,PropertyEditor
,EventListener
,TableModelListener
,ClearGui
,TestBeanPropertyEditor
public class TableEditor
extends PropertyEditorSupport
implements FocusListener, TestBeanPropertyEditor, 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
Modifier and TypeFieldDescriptionstatic final String
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 final String
attribute name for table headers, value must be a String array.static final String
attribute name for property names within theCLASSNAME
, value must be String array -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
clearGui()
Clear the gui and return it to initial default values.void
void
getValue()
void
void
setDescriptor
(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
boolean
void
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 Details
-
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:
-
HEADERS
attribute name for table headers, value must be a String array. IfCLASSNAME
is java.lang.String, there must be only a single entry.- See Also:
-
OBJECT_PROPERTIES
attribute name for property names within theCLASSNAME
, value must be String array- See Also:
-
-
Constructor Details
-
TableEditor
public TableEditor()
-
-
Method Details
-
getAsText
- Specified by:
getAsText
in interfacePropertyEditor
- Overrides:
getAsText
in classPropertyEditorSupport
-
getCustomEditor
- Specified by:
getCustomEditor
in interfacePropertyEditor
- Overrides:
getCustomEditor
in classPropertyEditorSupport
-
getValue
- Specified by:
getValue
in interfacePropertyEditor
- Overrides:
getValue
in classPropertyEditorSupport
-
setAsText
- Specified by:
setAsText
in interfacePropertyEditor
- Overrides:
setAsText
in classPropertyEditorSupport
- Throws:
IllegalArgumentException
-
setValue
- Specified by:
setValue
in interfacePropertyEditor
- Overrides:
setValue
in classPropertyEditorSupport
-
supportsCustomEditor
public boolean supportsCustomEditor()- Specified by:
supportsCustomEditor
in interfacePropertyEditor
- Overrides:
supportsCustomEditor
in classPropertyEditorSupport
-
setDescriptor
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 interfaceTestBeanPropertyEditor
-
tableChanged
- Specified by:
tableChanged
in interfaceTableModelListener
-
focusGained
- Specified by:
focusGained
in interfaceFocusListener
-
focusLost
- Specified by:
focusLost
in interfaceFocusListener
-
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.
-