public class OfflineDBChooserPanel extends DefaultTraversablePanel
By default the panel will place the chosen provider under the key
UIConstants.PROVIDER_KEY
when onExit
is called.
Modifier and Type | Class and Description |
---|---|
static class |
OfflineDBChooserPanel.InfoListener
Custom listener class for being notified of changes in the panel to the
selected offline database.
|
class |
OfflineDBChooserPanel.OfflineDatabaseInfo
Encapsulates the information about the chosen offline database in this
panel.
|
javax.swing.JPanel.AccessibleJPanel
javax.swing.JComponent.AccessibleJComponent
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 |
---|
OfflineDBChooserPanel()
Constructs a new panel for choosing offline databases.
|
Modifier and Type | Method and Description |
---|---|
void |
addOfflineDatabaseListener(java.awt.event.ItemListener il)
Deprecated.
replaced by
addOfflineDatabaseListener(InfoListener) |
void |
addOfflineDatabaseListener(OfflineDBChooserPanel.InfoListener l)
Add a listener to be informed of changes to the selected offline database.
|
java.awt.Component |
getComponent()
Gets the Component to include in any layout.
|
java.awt.Component |
getDefaultFocusComponent()
This panels choice for default focus.
|
OfflineDBChooserPanel.OfflineDatabaseInfo |
getOfflineDatabaseInfo()
Gets the current information from this panel.
|
OfflineDBObjectProvider |
getOrCreateProvider()
Gets the chosen provider.
|
protected java.lang.String |
getProviderDataKey()
Gets the key that the OfflineDBObjectProvider will be put under in the
TraversableContext passed to onExit.
|
boolean |
isAllowNull()
Tests whether the offlinedb chooser contains a null entry
|
void |
onEntry(TraversableContext data)
Enter/initialises the panel with a chosen offline database and
project/application if the extra pickers are shown.
|
void |
onExit(TraversableContext data)
Gets (or creates) the chosen offline database and puts it in the
TravserableContext under the panel's
data
key . |
void |
removeOfflineDatabaseListener(java.awt.event.ItemListener il)
Deprecated.
replaced by
removeOfflineDatabaseListener(InfoListener) |
void |
removeOfflineDatabaseListener(OfflineDBChooserPanel.InfoListener l)
Add a listener to be informed of changes to the selected offline database.
|
void |
setAllowApplicationCreate(boolean createApp)
Sets whether to allow a new application to be created.
|
void |
setAllowNull(boolean allowNull)
Sets whether a null entry should appear in the picker for the
offlinedb.
|
void |
setAllowOfflineDatabaseCreate(boolean createOfflineDB)
Sets whether to allow the user to create a new offline database in the
current project.
|
void |
setAllowOfflineDatabaseEdit(boolean editOfflineDB)
Sets whether to allow the user to edit an offline database in the
current project.
|
void |
setAllowProjectCreate(boolean createProj)
Sets whether to allow a new project to be created in the current
application.
|
void |
setDefaultSelection(OfflineDBObjectProvider defaultSelection) |
void |
setEditingProvider(java.net.URL url)
Indicates that we are in the process of editing the given provider and
therefore it should not appear in the picklist.
|
void |
setEnabled(boolean enable) |
void |
setIncludeOfflineDatabasesFromDependentProjects(boolean incProjDeps)
If ths project selector is not shown, this controls whether offline
databases from dependent projects are shown in the offline database
selector.
|
void |
setIncludeProjectDependencies(boolean incProjDeps)
Deprecated.
this was badly named and has been replaced with
setOnlyShowProjectDependencies(boolean) |
void |
setOnlineDatabase(Database db)
Deprecated.
|
void |
setOnlyShowProjectDependencies(boolean onlyShowProjDeps)
Sets whether to only include dependent projects in the project picker.
|
void |
setOtherOfflineProvider(OfflineDBObjectProvider otherOfflineProvider)
Deprecated.
no longer used.
|
void |
setOtherProvider(DBObjectProvider pro)
Sets another provider that this chooser will use to match if it creates
a new offline database.
|
void |
setProvider(OfflineDBObjectProvider provider) |
void |
setProviderLike(ProviderSettings likePro)
Sets a provider to filter the provider list by.
|
void |
setShowApplications(boolean showApp)
Sets whether to show the applications available in jdev.
|
void |
setShowOfflineDatabaseDetail(boolean showOfflineDBDetail)
Sets whether to include a component under the offline database picker to
show the details of the selected offline database.
|
void |
setShowProjects(boolean showProj)
Set whether to show the projects available in the current application.
|
gbc, gbc, 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, hide, 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, 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, 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 OfflineDBChooserPanel()
getComponent()
.@Deprecated public final void addOfflineDatabaseListener(java.awt.event.ItemListener il)
addOfflineDatabaseListener(InfoListener)
public final void addOfflineDatabaseListener(OfflineDBChooserPanel.InfoListener l)
@Deprecated public final void removeOfflineDatabaseListener(java.awt.event.ItemListener il)
removeOfflineDatabaseListener(InfoListener)
public final void removeOfflineDatabaseListener(OfflineDBChooserPanel.InfoListener l)
public final void setDefaultSelection(OfflineDBObjectProvider defaultSelection)
public final void setProvider(OfflineDBObjectProvider provider)
public final void setShowApplications(boolean showApp)
public final void setAllowApplicationCreate(boolean createApp)
public final void setShowProjects(boolean showProj)
public final void setOnlyShowProjectDependencies(boolean onlyShowProjDeps)
@Deprecated public final void setIncludeProjectDependencies(boolean incProjDeps)
setOnlyShowProjectDependencies(boolean)
public final void setIncludeOfflineDatabasesFromDependentProjects(boolean incProjDeps)
public final void setProviderLike(ProviderSettings likePro)
public final void setEditingProvider(java.net.URL url)
@Deprecated public final void setOnlineDatabase(Database db)
setOtherProvider(DBObjectProvider)
public final void setOtherProvider(DBObjectProvider pro)
public final void setAllowProjectCreate(boolean createProj)
public final void setAllowOfflineDatabaseCreate(boolean createOfflineDB)
public final void setAllowOfflineDatabaseEdit(boolean editOfflineDB)
public final void setShowOfflineDatabaseDetail(boolean showOfflineDBDetail)
public void setEnabled(boolean enable)
setEnabled
in class javax.swing.JComponent
public final java.awt.Component getComponent()
getComponent
in interface Traversable
getComponent
in class DefaultTraversablePanel
Component
that the user interacts with
for creating or editing an object.Traversable.getComponent()
public void onEntry(TraversableContext data)
onEntry
in interface Traversable
onEntry
in class DefaultTraversablePanel
data
- the wizard's traversable contextTraversable.onEntry(TraversableContext)
public final OfflineDBChooserPanel.OfflineDatabaseInfo getOfflineDatabaseInfo()
public final OfflineDBObjectProvider getOrCreateProvider() throws TraversalException
can create
then a new OfflineDBObjectProvider will be created on disk.TraversalException
- if no provider has been chosen and a new
provider cannot be created.public void onExit(TraversableContext data) throws TraversalException
data
key
.onExit
in interface Traversable
onExit
in class DefaultTraversablePanel
data
- the wizard traversable contextTraversalException
- if a provider must be created and it failsTraversable.onExit(TraversableContext)
protected java.lang.String getProviderDataKey()
UIConstants.PROVIDER_KEY
, override if required.@Deprecated public final void setOtherOfflineProvider(OfflineDBObjectProvider otherOfflineProvider)
public final java.awt.Component getDefaultFocusComponent()
public final void setAllowNull(boolean allowNull)
allowNull
- whether the user can choose nullpublic final boolean isAllowNull()