Package adams.gui.goe
Class PrefixFieldEditor
- java.lang.Object
-
- java.beans.PropertyEditorSupport
-
- adams.gui.goe.AbstractPropertyEditorSupport
-
- adams.gui.goe.FieldEditor
-
- adams.gui.goe.PrefixFieldEditor
-
- All Implemented Interfaces:
HelpProvider
,CustomStringRepresentationHandler
,InlineEditorSupport
,MultiSelectionEditor
,PropertyEditor
public class PrefixFieldEditor extends FieldEditor
A PropertyEditor for PrefixField objects that lets the user select a field.- Author:
- FracPete (fracpete at waikato dot ac dot nz)
- See Also:
PrefixField
-
-
Field Summary
-
Fields inherited from class adams.gui.goe.FieldEditor
m_ButtonClose, m_ButtonOK, m_SelectFieldPanel
-
Fields inherited from class adams.gui.goe.AbstractPropertyEditorSupport
APPROVE_OPTION, CANCEL_OPTION, EMPTY, m_ChosenOption, m_CustomEditor, m_WindowAdapter, NULL
-
-
Constructor Summary
Constructors Constructor Description PrefixFieldEditor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected JComponent
createCustomEditor()
Gets the custom editor component.Object
fromCustomStringRepresentation(String str)
Returns an object created from the custom string representation.String
getJavaInitializationString()
Returns a representation of the current property value as java source.protected AbstractField[]
newArray(Vector<String> fields, DataType type)
Creates a new array of prefix field objects from the strings.String
toCustomStringRepresentation(Object obj)
Returns a custom string representation of the object.-
Methods inherited from class adams.gui.goe.FieldEditor
getInlineValue, getSelectedObjects, initForDisplay, isInlineEditingAvailable, isInlineValueValid, newArray, paintValue, setInlineValue
-
Methods inherited from class adams.gui.goe.AbstractPropertyEditorSupport
addWindowAdapter, cleanUp, closeDialog, createPopup, createTipText, createWindowAdapter, getChosenOption, getCustomEditor, getHelpDescription, getHelpIcon, getHelpTitle, getHelpURL, getParentDialog, getParentFrame, initialize, isPaintable, resetChosenOption, setValue, supportsCustomEditor
-
Methods inherited from class java.beans.PropertyEditorSupport
addPropertyChangeListener, firePropertyChange, getAsText, getSource, getTags, getValue, removePropertyChangeListener, setAsText, setSource
-
-
-
-
Method Detail
-
toCustomStringRepresentation
public String toCustomStringRepresentation(Object obj)
Returns a custom string representation of the object.- Specified by:
toCustomStringRepresentation
in interfaceCustomStringRepresentationHandler
- Overrides:
toCustomStringRepresentation
in classFieldEditor
- Parameters:
obj
- the object to turn into a string- Returns:
- the string representation
-
fromCustomStringRepresentation
public Object fromCustomStringRepresentation(String str)
Returns an object created from the custom string representation.- Specified by:
fromCustomStringRepresentation
in interfaceCustomStringRepresentationHandler
- Overrides:
fromCustomStringRepresentation
in classFieldEditor
- Parameters:
str
- the string to turn into an object- Returns:
- the object
-
getJavaInitializationString
public String getJavaInitializationString()
Returns a representation of the current property value as java source.- Specified by:
getJavaInitializationString
in interfacePropertyEditor
- Overrides:
getJavaInitializationString
in classFieldEditor
- Returns:
- a value of type 'String'
-
createCustomEditor
protected JComponent createCustomEditor()
Gets the custom editor component.- Overrides:
createCustomEditor
in classFieldEditor
- Returns:
- the editor
-
newArray
protected AbstractField[] newArray(Vector<String> fields, DataType type)
Creates a new array of prefix field objects from the strings.- Parameters:
fields
- the field names to usetype
- the type of the fields- Returns:
- the prefix field array
-
-