public class DefaultConnectionEditorLauncher extends DatabaseConnectionEditorLauncher
DatabaseConnectionEditorLauncher.StoreChoice
Constructor and Description |
---|
DefaultConnectionEditorLauncher() |
Modifier and Type | Method and Description |
---|---|
protected java.util.Properties |
convertInvalidSubtype(java.lang.String subtype,
DatabaseProvider referenceable)
Gets a set of Properties for the given connection that are supported
by this launcher.
|
static oracle.bali.ewt.dialog.DialogHeader |
createDialogHeader(java.lang.String text)
Creates a header for a JEWTDialog that has the given prompt text and
contains the standard dialog header icon for connection dialogs.
|
protected Traversable |
createPanel()
Creates a Traversable that is the connection editor panel to show in
the dialog.
|
protected void |
doCommit(DatabaseConnections conns,
java.lang.String originalName,
java.lang.String newName,
java.util.Properties props,
Namespace data)
Called by a VetoableChangeListener that is attached to the dialog to
commit the connection changes made by the user.
|
protected DatabaseConnections |
getConnections()
Gets the DatabaseConnections store that the connection will be created
or edited in.
|
protected java.awt.Component |
getDefaultFocusComponent(Traversable panel)
Gets the Component that should have the default focus when the dialog
is first shown.
|
protected java.lang.String |
getDefaultSubtype()
Gets the default connection subtype that should be selected in the
dialog.
|
protected javax.swing.Icon |
getHeaderIcon(boolean edit)
Gets the icon that should be used in the dialog header.
|
protected java.lang.String |
getHeaderText(boolean edit)
Gets the instructional header text that should appear at the top of
the dialog.
|
protected java.util.logging.Logger |
getLogger()
Gets a Logger for logging messages related to the connection editor.
|
protected java.lang.String |
getTitle(boolean edit)
Gets the title for the dialog.
|
ConnectionInfo |
launchEditor(DatabaseConnections conns,
java.lang.String connName)
Launches the connection editor.
|
protected void |
setupNamespace(Namespace data)
Allows subclasses to customise the Namespace that is used for the
TraversableContext that the Traversable will be entered using.
|
getAllowedSubTypes, getAllowRename, getConnectionBaseName, getContext, getDefaultProperties, getEnsureVisible, getStoreChoice, isAllowedSubType, launchEditor, launchEditor, launchEditor, setAllowedSubTypes, setAllowRename, setConnectionBaseName, setContext, setDefautProperties, setEnsureVisible, setStoreChoice
protected java.util.logging.Logger getLogger()
protected DatabaseConnections getConnections()
protected java.lang.String getDefaultSubtype()
protected Traversable createPanel()
getConnections()
).protected java.awt.Component getDefaultFocusComponent(Traversable panel)
protected java.lang.String getTitle(boolean edit)
edit
- whether it is an edit (true
) or create (false
) dialogprotected java.lang.String getHeaderText(boolean edit)
edit
- whether it is an edit (true
) or create (false
) dialogprotected javax.swing.Icon getHeaderIcon(boolean edit)
edit
- whether it is an edit (true
) or create (false
) dialogDialogHeader
protected void setupNamespace(Namespace data)
data
- the initial data for the Traversablepublic final ConnectionInfo launchEditor(DatabaseConnections conns, java.lang.String connName)
launchEditor
in class DatabaseConnectionEditorLauncher
conns
- the connection store that the connection is in, or that is
the default for the new connection. If null the IDE context will be used
to determine the default store.connName
- the name of the connection to edit (or null to create a new
connection).java.lang.IllegalStateException
- if an attempt is made to edit a
connection that is not supported by this launcher.protected java.util.Properties convertInvalidSubtype(java.lang.String subtype, DatabaseProvider referenceable)
The default implementation converts the connection into "Generic JDBC".
subtype
- a connection subtype that is not validreferenceable
- the connectionjava.lang.IllegalStateException
- if "Generic JDBC" is not supported by
this launcher.protected void doCommit(DatabaseConnections conns, java.lang.String originalName, java.lang.String newName, java.util.Properties props, Namespace data) throws ConnectionException
conns
- the connections to commit tooriginalName
- the original name of the connection (null if
creating)newName
- the name of the connection to saveprops
- the properties for the connectiondata
- the complete data from the TraversableConnectionException
- if the connection cannot be saved - this
will be displayed to the user and the dialog will not close.public static oracle.bali.ewt.dialog.DialogHeader createDialogHeader(java.lang.String text)