public static class PanelLibrary.DelegatePanelLibrary<T extends DBObject> extends PanelLibrary<T>
PanelLibrary.DelegatePanelLibrary<T extends DBObject>, PanelLibrary.HeaderPanel, PanelLibrary.HeaderPanelListener, PanelLibrary.PanelSetChanger, PanelLibrary.PanelSetChangeValidatorCOMMIT_TO_PROVIDER_KEY, KEY| Constructor and Description |
|---|
DelegatePanelLibrary(PanelLibrary<T> delegate) |
| Modifier and Type | Method and Description |
|---|---|
void |
commitToProvider(DBEditorConfig config)
The config must have a result of SUCCCESS set by this method for the dialog
to be disposed of.
|
protected Traversable |
createMainPanel(Traversable header,
Navigable[] navs,
java.lang.String startPage)
Gets the main panel that contains all the navigable for the dialog.
|
protected java.lang.Class<? extends Traversable> |
getDDLPanel() |
protected java.lang.String |
getGeneralHelpID()
Gets the help ID for the general panel.
|
java.util.Collection<java.lang.String> |
getGeneralTitles()
Given the list of available titles, this method returns the subset of
those titles that should be included on the "General" page of a flat
editor, rather than appearing on pages of their own.
|
protected java.lang.Class<? extends Traversable> |
getHeader()
Returns the traversable class to use for the header component.
|
protected java.util.List<java.lang.String> |
getSimpleTitles()
Returns the titles for simple editing.
|
java.awt.Dimension |
getSize(boolean edit)
Returns a size for the edit dialog to take by default.
|
java.lang.String |
getStartPage(DBEditorConfig config)
Returns the page of the editor to start from.
|
protected java.util.List<java.lang.String> |
getTitles(T obj,
DBObjectProvider pro,
boolean editing)
Returns the titles of the panels needed to create or edit the given object
as appropriate.
|
protected java.util.Map<java.lang.String,java.lang.Class> |
getVerifiers(boolean editing) |
protected T |
newDBObject(DBObjectProvider pro,
Schema schema,
DBObject parent)
Returns a new DBObject instance for the type of object this library
supports.
|
boolean |
prepareEditorInBackground(DBEditorConfig config)
Called by the DBEditorFactory implementation to test whether the
prepare of the editor should be done in the background, rather than on
the EDT.
|
void |
prepareObjectForEditor(DBEditorConfig config,
java.util.List<Navigable> navs)
Called just before the editor for the given config will be shown.
|
protected void |
prepareObjectForNavigable(DBEditorConfig config,
Navigable nav)
Called to ensure that the given object is built sufficiently for
display of the given Navigable.
|
boolean |
showEditorAfterCommit()
Tests whether the IDE Editor for the object should be shown after any
commit.
|
addDefaultPanels, addNavigable, addPanel, addPanel, addSupportedTitle, addSupportedTitle, canEditObject, canReplaceByDefault, checkPrivilege, ensurePanels, ensureSimplePanels, getCreateNavigables, getCreateText, getCreateTitle, getCreateVerifiers, getDDLNavigable, getDefaultPanels, getEditNavigables, getEditTitle, getEditVerifiers, getErrorTitle, getGeneralNavigable, getHeaderHelpID, getInitialFocus, getLogger, getMainDialogPanel, getMainDialogPanel, getNamesToExclude, getNavigables, getNavigables, getObjectForCreate, getSimpleNavigables, getSkipGeneralForNewObject, getStartPage, getType, getUniqueName, getValidationLevel, includePanelHeaders, makeNameUnique, setContextObject, setDefaultPanels, setDefaultPanels, shouldResetObjectBeforeEdit, shouldValidateOnExitpublic DelegatePanelLibrary(PanelLibrary<T> delegate)
protected java.util.List<java.lang.String> getTitles(T obj, DBObjectProvider pro, boolean editing)
PanelLibrarygetTitles in class PanelLibrary<T extends DBObject>protected Traversable createMainPanel(Traversable header, Navigable[] navs, java.lang.String startPage)
PanelLibrarycreateMainPanel in class PanelLibrary<T extends DBObject>protected java.lang.Class<? extends Traversable> getHeader()
PanelLibrarygetHeader in class PanelLibrary<T extends DBObject>protected java.util.List<java.lang.String> getSimpleTitles()
PanelLibraryReturns null by default (no simple edit).
getSimpleTitles in class PanelLibrary<T extends DBObject>public java.awt.Dimension getSize(boolean edit)
PanelLibrarygetSize in class PanelLibrary<T extends DBObject>public boolean showEditorAfterCommit()
PanelLibraryshowEditorAfterCommit in class PanelLibrary<T extends DBObject>public void commitToProvider(DBEditorConfig config)
PanelLibrarycommitToProvider in class PanelLibrary<T extends DBObject>public java.lang.String getStartPage(DBEditorConfig config)
PanelLibrarygetStartPage in class PanelLibrary<T extends DBObject>protected java.util.Map<java.lang.String,java.lang.Class> getVerifiers(boolean editing)
getVerifiers in class PanelLibrary<T extends DBObject>protected T newDBObject(DBObjectProvider pro, Schema schema, DBObject parent)
PanelLibrarynewDBObject in class PanelLibrary<T extends DBObject>pro - The providerschema - The owing schema if the new object is a SchemaObjectparent - The parent of a ChildDBObject, or where applicable, the
context SystemObject (for example, the Table for an Index or Trigger)protected java.lang.String getGeneralHelpID()
PanelLibrarygetGeneralHelpID in class PanelLibrary<T extends DBObject>#getGeneralTraversable()public java.util.Collection<java.lang.String> getGeneralTitles()
PanelLibraryThe default implementation will return
getGeneralTitles in class PanelLibrary<T extends DBObject>protected java.lang.Class<? extends Traversable> getDDLPanel()
getDDLPanel in class PanelLibrary<T extends DBObject>public boolean prepareEditorInBackground(DBEditorConfig config)
PanelLibraryThis is called on the EDT, so it is important that any checks on the config done by this method do not cause any db hits.
prepareEditorInBackground in class PanelLibrary<T extends DBObject>config - the config for the editor we are going to preparepublic void prepareObjectForEditor(DBEditorConfig config, java.util.List<Navigable> navs) throws DBException
PanelLibraryPanelLibrary.prepareEditorInBackground(oracle.ide.db.dialogs.DBEditorConfig) returns true.
This mechanism should be used to ensure that any properties required for the default editor state (e.g. start page) are built.
prepareObjectForEditor in class PanelLibrary<T extends DBObject>config - the editor config we are about to launch the editor fornavs - the navigables that have been chosen already for the editor
by this panel library.CancelledException - if the prepare is
interruptedDBException - if the object cannot be prepared. This will stop
the editor being shown and the exception message will be shown to
the user.protected void prepareObjectForNavigable(DBEditorConfig config, Navigable nav) throws DBException
PanelLibrary#isCallPrepareObjectForNavigable returns true (default is edit
only) and is called on a background Thread if
PanelLibrary.prepareEditorInBackground(oracle.ide.db.dialogs.DBEditorConfig) returns true.prepareObjectForNavigable in class PanelLibrary<T extends DBObject>config - the editor confignav - the navigable that is about to showCancelledException - if the prepare is
interruptedDBException - if the object cannot be prepared. This will stop
the editor being shown and the exception message will be shown to
the user.