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,TestBeanPropertyEditor
public class TableEditor extends PropertyEditorSupport implements FocusListener, TestBeanPropertyEditor, TableModelListener
Table editor for TestBean GUI properties. Currently only works for:- property type Collection of
Strings, where there is a single header entry
-
-
Field Summary
Fields Modifier and Type Field Description static StringCLASSNAMEattribute 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 StringHEADERSattribute name for table headers, value must be a String array.static StringOBJECT_PROPERTIESattribute name for property names within theCLASSNAME, value must be String array
-
Constructor Summary
Constructors Constructor Description TableEditor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidfocusGained(FocusEvent e)voidfocusLost(FocusEvent e)StringgetAsText()ComponentgetCustomEditor()ObjectgetValue()voidsetAsText(String text)voidsetDescriptor(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.voidsetValue(Object value)booleansupportsCustomEditor()voidtableChanged(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 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 String 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:
- Constant Field Values
-
OBJECT_PROPERTIES
public static final String OBJECT_PROPERTIES
attribute name for property names within theCLASSNAME, value must be String array- See Also:
- Constant Field Values
-
-
Method Detail
-
getAsText
public String getAsText()
- Specified by:
getAsTextin interfacePropertyEditor- Overrides:
getAsTextin classPropertyEditorSupport
-
getCustomEditor
public Component getCustomEditor()
- Specified by:
getCustomEditorin interfacePropertyEditor- Overrides:
getCustomEditorin classPropertyEditorSupport
-
getValue
public Object getValue()
- Specified by:
getValuein interfacePropertyEditor- Overrides:
getValuein classPropertyEditorSupport
-
setAsText
public void setAsText(String text) throws IllegalArgumentException
- Specified by:
setAsTextin interfacePropertyEditor- Overrides:
setAsTextin classPropertyEditorSupport- Throws:
IllegalArgumentException
-
setValue
public void setValue(Object value)
- Specified by:
setValuein interfacePropertyEditor- Overrides:
setValuein classPropertyEditorSupport
-
supportsCustomEditor
public boolean supportsCustomEditor()
- Specified by:
supportsCustomEditorin interfacePropertyEditor- Overrides:
supportsCustomEditorin classPropertyEditorSupport
-
setDescriptor
public 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.- Specified by:
setDescriptorin interfaceTestBeanPropertyEditor
-
tableChanged
public void tableChanged(TableModelEvent e)
- Specified by:
tableChangedin interfaceTableModelListener
-
focusGained
public void focusGained(FocusEvent e)
- Specified by:
focusGainedin interfaceFocusListener
-
focusLost
public void focusLost(FocusEvent e)
- Specified by:
focusLostin interfaceFocusListener
-
-