public class SelectDBObjectsPanel extends SkippingTraversable implements oracle.bali.ewt.shuttle.ShuttleListener
javax.swing.JPanel.AccessibleJPanel
javax.swing.JComponent.AccessibleJComponent
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
SELECTED_OBJECTS |
static java.lang.String |
SETTINGS_KEY |
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Constructor and Description |
---|
SelectDBObjectsPanel() |
Modifier and Type | Method and Description |
---|---|
protected boolean |
canAlwaysNext()
When used in a wizard this sets whether the wizard can always next regardless of the state of this step.
|
protected boolean |
canFinish()
When used in a wizard this sets whether the wizard can finish after this step.
|
protected boolean |
canRenameObjects()
Deprecated.
- rename is no longer supported. Override getNameController() to include an extra name field that can be used for entity naming.
|
protected void |
checkWizardButtons()
Checks that the wizard's buttons are appropriately enabled.
|
protected void |
commit(TraversableContext dataContext)
Default implementation of the commit calls
getSelectedObjects() and places what is returned into the context using the SELECTED_OBJECTS key. |
protected void |
fireQuery()
Fires the query on the DBObjectPicker (LHS of shuttle) given the appropriate selections for filter, schema and object types.
|
protected java.lang.String[] |
getAvailableTypes()
Returns the types available for querying in the from picker - override in subclasses as appropriate.
|
protected DBObjectSourcePicker |
getFromPicker()
Returns the picker for the left (from) side of the shuttle.
|
protected NameController |
getNameController()
Returns the name provider that will produce support for including another name in addition to the object's name itself.
|
protected java.lang.String |
getPanelName()
Returns the name that will be prepended to all component names for ui testability.
|
protected PropertyStorage |
getPropertyStorage()
Returns the PropertyStorage for this panel to save its query setting in.
|
protected DBObjectProvider |
getProvider()
Returns the provider we're selecting objects from.
|
protected DBObjectProvider |
getProvider(TraversableContext dataContext)
Get the DBObjectProvider.
|
protected java.lang.String |
getProviderKey()
Returns the key for the provider to use in the data context.
|
protected java.util.Collection<java.lang.String> |
getSelectableObjectTypes(DBObjectProvider pro)
Gets the object types from this provider that should be included in the selection list.
|
protected java.lang.Object |
getSelectedObjects()
Returns the selection of objects chosen.
|
protected java.lang.String |
getSettingsKey()
Returns the key for this panel's settings.
|
oracle.bali.ewt.shuttle.Shuttle |
getShuttle()
Gets the Shuttle component used for selecting the chosen objects in this panel.
|
protected oracle.bali.ewt.shuttle.ItemPicker |
getToPicker()
Returns the picker for the right (to) side of the shuttle.
|
protected java.lang.String |
getTraversableName()
Override this to provide a name for sub-classes which may be skipped.
|
protected WizardCallbacks |
getWizardCallbacks()
If this panel is being used in a Wizard this returns the WizardCallbacks for the Wizard.
|
protected void |
init(boolean providerChanged, TraversableContext dataContext)
Initialises the panel.
|
protected void |
layoutComponents() |
protected void |
loadSettings()
Load the IDE settings from a (dialog/wizard)-specific key.
|
void |
onEntry(TraversableContext dataContext)
Called on entry to the panel in the wizard.
|
void |
onExit(TraversableContext dataContext)
Called on panel exit.
|
protected void |
saveSettings()
Save the IDE settings from a (dialog/wizard)-specific key.
|
protected void |
setDefaultSettings()
If there are no settings saved in the J2EE preferences set with the key returned by
getSettingsKey() then this method is called to default any appropriate controls. |
void |
setIncludeDatabaseLinks(boolean inc)
Sets whether or not to include the database link support on the schema picker.
|
protected void |
setIncludePublicSchema(boolean inc) |
protected void |
setupQuery(DBObjectSourcePicker from, Schema schema, java.lang.String filter, java.lang.String[] types)
By default this sets the schema, types and filter on the given from picker.
|
void |
shuttleItemsMoved(oracle.bali.ewt.shuttle.ShuttleEvent event)
Called when items are shuttled to the underlying object selection picker.
|
void |
shuttleItemsRemoved(oracle.bali.ewt.shuttle.ShuttleEvent event)
Called when items are shuttled from the underlying object selection picker.
|
void |
shuttleItemsReordered(oracle.bali.ewt.shuttle.ShuttleEvent event)
Called when chosen items in underlying object selection picker are reordered.
|
isSkipping
gbc, gbc, getComponent, getDefaultTitle, getExitTransition, getHelpID, getText, setDefaultTitle, setHelpID
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTree
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
public static final java.lang.String SELECTED_OBJECTS
public static final java.lang.String SETTINGS_KEY
protected java.lang.String getPanelName()
protected void layoutComponents()
protected final DBObjectProvider getProvider()
protected NameController getNameController()
protected DBObjectSourcePicker getFromPicker()
protected oracle.bali.ewt.shuttle.ItemPicker getToPicker()
protected boolean canFinish()
protected boolean canAlwaysNext()
@Deprecated protected boolean canRenameObjects()
getNameController()
protected java.lang.String[] getAvailableTypes()
new String[]{Table.TYPE, View.TYPE};
protected java.util.Collection<java.lang.String> getSelectableObjectTypes(DBObjectProvider pro)
protected java.lang.String getProviderKey()
public final void onEntry(TraversableContext dataContext)
init(boolean,TraversableContext)
for custom behaviour.onEntry
in interface Traversable
onEntry
in class SkippingTraversable
dataContext
- The data wrapper where the Traversable
locates the data that it needs to populate the UI.Traversable.onEntry(TraversableContext)
public final void onExit(TraversableContext dataContext) throws TraversalException
commit(TraversableContext)
for custom behaviour.onExit
in interface Traversable
onExit
in class DefaultTraversablePanel
dataContext
- The data object where changes made in the UI should be copied so that the changes can be accessed by other Traversable
s.TraversalException
- if the user has entered either incomplete, invalid, or inconsistent data. This exception prevents the property dialog or wizard from continuing and forces the user to stay on the current Traversable
until the data entered is valid or the user cancels. The exception class itself is capable of carrying an error message that will be shown to the user. Refer to its javadoc for details.Traversable.onExit(TraversableContext)
protected DBObjectProvider getProvider(TraversableContext dataContext)
protected void commit(TraversableContext dataContext) throws TraversalException
getSelectedObjects()
and places what is returned into the context using the SELECTED_OBJECTS
key.TraversalException
protected java.lang.Object getSelectedObjects()
protected void setIncludePublicSchema(boolean inc)
public void setIncludeDatabaseLinks(boolean inc)
java.lang.IllegalStateException
- if called after first onEntry/init.protected void init(boolean providerChanged, TraversableContext dataContext)
onEntry(TraversableContext)
to the parent Traversable. The default implementation deals with auto-querying, spotting that the provider has changed, loading the settings and checking the wizard buttons if working in a wizard). It is recommended that subclasses still call this behaviour.providerChanged
- whether on entering the state has changed the provider.dataContext
- the traversable context containing all state dataprotected void fireQuery()
protected void setupQuery(DBObjectSourcePicker from, Schema schema, java.lang.String filter, java.lang.String[] types)
protected java.lang.String getSettingsKey()
getPropertyStorage()
protected PropertyStorage getPropertyStorage()
getSettingsKey()
protected void loadSettings()
getSettingsKey()
method. If no settings have yet been associated with this key, the default settings are loaded instead.protected void setDefaultSettings()
getSettingsKey()
then this method is called to default any appropriate controls. By default this sets autoQuery to be FALSE if the provider is a Database, and all types will be selected with no filter. Subclasses can override.protected void saveSettings()
getSettingsKey()
method.protected void checkWizardButtons()
canFinish()
and canAlwaysNext()
.protected java.lang.String getTraversableName()
getTraversableName
in class SkippingTraversable
public final oracle.bali.ewt.shuttle.Shuttle getShuttle()
protected final WizardCallbacks getWizardCallbacks()
public void shuttleItemsMoved(oracle.bali.ewt.shuttle.ShuttleEvent event)
shuttleItemsMoved
in interface oracle.bali.ewt.shuttle.ShuttleListener
public void shuttleItemsRemoved(oracle.bali.ewt.shuttle.ShuttleEvent event)
shuttleItemsRemoved
in interface oracle.bali.ewt.shuttle.ShuttleListener
public void shuttleItemsReordered(oracle.bali.ewt.shuttle.ShuttleEvent event)
shuttleItemsReordered
in interface oracle.bali.ewt.shuttle.ShuttleListener