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
Strings, where there is a single header entry
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringattribute 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 Stringattribute name for table headers, value must be a String array.static final Stringattribute name for property names within theCLASSNAME, value must be String array -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclearGui()Clear the gui and return it to initial default values.voidvoidgetValue()voidvoidsetDescriptor(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.voidbooleanvoidMethods inherited from class java.beans.PropertyEditorSupport
addPropertyChangeListener, firePropertyChange, getJavaInitializationString, getSource, getTags, isPaintable, paintValue, removePropertyChangeListener, setSourceMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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. IfCLASSNAMEis 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:
getAsTextin interfacePropertyEditor- Overrides:
getAsTextin classPropertyEditorSupport
-
getCustomEditor
- Specified by:
getCustomEditorin interfacePropertyEditor- Overrides:
getCustomEditorin classPropertyEditorSupport
-
getValue
- Specified by:
getValuein interfacePropertyEditor- Overrides:
getValuein classPropertyEditorSupport
-
setAsText
- Specified by:
setAsTextin interfacePropertyEditor- Overrides:
setAsTextin classPropertyEditorSupport- Throws:
IllegalArgumentException
-
setValue
- Specified by:
setValuein interfacePropertyEditor- Overrides:
setValuein classPropertyEditorSupport
-
supportsCustomEditor
public boolean supportsCustomEditor()- Specified by:
supportsCustomEditorin interfacePropertyEditor- Overrides:
supportsCustomEditorin 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:
setDescriptorin interfaceTestBeanPropertyEditor
-
tableChanged
- Specified by:
tableChangedin interfaceTableModelListener
-
focusGained
- Specified by:
focusGainedin interfaceFocusListener
-
focusLost
- Specified by:
focusLostin interfaceFocusListener
-
clearGui
public void clearGui()Description copied from interface:ClearGuiClear 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.
-