Package adams.gui.goe
Class EmailAddressEditor
- java.lang.Object
-
- java.beans.PropertyEditorSupport
-
- adams.gui.goe.AbstractPropertyEditorSupport
-
- adams.gui.goe.EmailAddressEditor
-
- All Implemented Interfaces:
HelpProvider,CustomStringRepresentationHandler,MultiSelectionEditor,PropertyEditor
public class EmailAddressEditor extends AbstractPropertyEditorSupport implements CustomStringRepresentationHandler, MultiSelectionEditor
A PropertyEditor for EmailAddress objects.- Author:
- FracPete (fracpete at waikato dot ac dot nz)
- See Also:
EmailAddress
-
-
Field Summary
Fields Modifier and Type Field Description protected BaseButtonm_ButtonClosethe close button.protected BaseButtonm_ButtonOKthe OK button.protected SelectEmailAddressPanelm_SelectPanelThe panel used for selecting fields.-
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 EmailAddressEditor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected JComponentcreateCustomEditor()Gets the custom editor component.ObjectfromCustomStringRepresentation(String str)Returns an object created from the custom string representation.StringgetJavaInitializationString()Returns a representation of the current property value as java source.Object[]getSelectedObjects(Container parent)Returns the selected objects.protected voidinitForDisplay()Initializes the display of the value.voidpaintValue(Graphics gfx, Rectangle box)Paints a representation of the current Object.StringtoCustomStringRepresentation(Object obj)Returns a custom string representation of the object.-
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
-
-
-
-
Field Detail
-
m_SelectPanel
protected SelectEmailAddressPanel m_SelectPanel
The panel used for selecting fields.
-
m_ButtonOK
protected BaseButton m_ButtonOK
the OK button.
-
m_ButtonClose
protected BaseButton m_ButtonClose
the close button.
-
-
Method Detail
-
toCustomStringRepresentation
public String toCustomStringRepresentation(Object obj)
Returns a custom string representation of the object.- Specified by:
toCustomStringRepresentationin interfaceCustomStringRepresentationHandler- 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:
fromCustomStringRepresentationin interfaceCustomStringRepresentationHandler- 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:
getJavaInitializationStringin interfacePropertyEditor- Overrides:
getJavaInitializationStringin classPropertyEditorSupport- Returns:
- a value of type 'String'
-
createCustomEditor
protected JComponent createCustomEditor()
Gets the custom editor component.- Specified by:
createCustomEditorin classAbstractPropertyEditorSupport- Returns:
- the editor
-
initForDisplay
protected void initForDisplay()
Initializes the display of the value.- Overrides:
initForDisplayin classAbstractPropertyEditorSupport
-
paintValue
public void paintValue(Graphics gfx, Rectangle box)
Paints a representation of the current Object.- Specified by:
paintValuein interfacePropertyEditor- Overrides:
paintValuein classPropertyEditorSupport- Parameters:
gfx- the graphics context to usebox- the area we are allowed to paint into
-
getSelectedObjects
public Object[] getSelectedObjects(Container parent)
Returns the selected objects.- Specified by:
getSelectedObjectsin interfaceMultiSelectionEditor- Parameters:
parent- the parent container- Returns:
- the objects
-
-