Package adams.gui.goe
Class AbstractDatabaseConnectionAwarePropertyEditorSupport
- java.lang.Object
-
- java.beans.PropertyEditorSupport
-
- adams.gui.goe.AbstractPropertyEditorSupport
-
- adams.gui.goe.AbstractDatabaseConnectionAwarePropertyEditorSupport
-
- All Implemented Interfaces:
HelpProvider
,DatabaseConnectionHandler
,DatabaseConnectionProvider
,DatabaseConnectionUser
,PropertyEditor
public abstract class AbstractDatabaseConnectionAwarePropertyEditorSupport extends AbstractPropertyEditorSupport implements DatabaseConnectionHandler
Ancestor for GOE editors that are DatabaseConnectionChangeListeners and need to de-register correctly.- Version:
- $Revision$
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
-
-
Field Summary
Fields Modifier and Type Field Description protected AbstractDatabaseConnection
m_DatabaseConnection
the database connection.-
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 AbstractDatabaseConnectionAwarePropertyEditorSupport()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected void
cleanUp()
Cleans up when the dialog is closed.AbstractDatabaseConnection
getDatabaseConnection()
Returns the currently used database connection object, can be null.protected abstract DatabaseConnectionChangeListener
getDatabaseConnectionChangeListener()
Returns the change listener that needs to be de-registered.protected abstract AbstractDatabaseConnection
getDefaultDatabaseConnection()
Returns the default database connection.protected void
initialize()
For initializing members.void
setDatabaseConnection(AbstractDatabaseConnection value)
Sets the database connection object to use.-
Methods inherited from class adams.gui.goe.AbstractPropertyEditorSupport
addWindowAdapter, closeDialog, createCustomEditor, createPopup, createTipText, createWindowAdapter, getChosenOption, getCustomEditor, getHelpDescription, getHelpIcon, getHelpTitle, getHelpURL, getParentDialog, getParentFrame, initForDisplay, isPaintable, resetChosenOption, setValue, supportsCustomEditor
-
Methods inherited from class java.beans.PropertyEditorSupport
addPropertyChangeListener, firePropertyChange, getAsText, getJavaInitializationString, getSource, getTags, getValue, paintValue, removePropertyChangeListener, setAsText, setSource
-
-
-
-
Field Detail
-
m_DatabaseConnection
protected AbstractDatabaseConnection m_DatabaseConnection
the database connection.
-
-
Method Detail
-
initialize
protected void initialize()
For initializing members.- Overrides:
initialize
in classAbstractPropertyEditorSupport
-
getDefaultDatabaseConnection
protected abstract AbstractDatabaseConnection getDefaultDatabaseConnection()
Returns the default database connection.- Returns:
- the connection
-
getDatabaseConnectionChangeListener
protected abstract DatabaseConnectionChangeListener getDatabaseConnectionChangeListener()
Returns the change listener that needs to be de-registered.- Returns:
- the listener
-
getDatabaseConnection
public AbstractDatabaseConnection getDatabaseConnection()
Returns the currently used database connection object, can be null.- Specified by:
getDatabaseConnection
in interfaceDatabaseConnectionProvider
- Returns:
- the current object
-
setDatabaseConnection
public void setDatabaseConnection(AbstractDatabaseConnection value)
Sets the database connection object to use.- Specified by:
setDatabaseConnection
in interfaceDatabaseConnectionHandler
- Parameters:
value
- the object to use
-
cleanUp
protected void cleanUp()
Cleans up when the dialog is closed.- Overrides:
cleanUp
in classAbstractPropertyEditorSupport
-
-