public class ConnectionPanelUI extends AbstractConnectionPanelUI
This panel is specific to database connections. If a different use is required create a subclass that overrides listConnections() and runConnectionDialog().
javax.swing.JPanel.AccessibleJPaneljavax.swing.JComponent.AccessibleJComponentaccessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW| Constructor and Description | 
|---|
ConnectionPanelUI(boolean showDetails)  | 
ConnectionPanelUI(boolean oracleOnly,
                 boolean showDetails)  | 
ConnectionPanelUI(java.lang.String[] subTypes,
                 boolean showDetails)  | 
| Modifier and Type | Method and Description | 
|---|---|
void | 
actionPerformed(java.awt.event.ActionEvent ae)
Deprecated. 
 
ActionListener interface no longer implemented. Buttons
 handled internally. 
 | 
protected DatabaseConnectionEditorLauncher | 
createDatabaseConnectionEditorLauncher()
Creates a DatabaseConnectionEditorLauncher for creating/editing a
 connection. 
 | 
protected boolean | 
getCanAddNull()
Deprecated.  
 | 
protected java.lang.String | 
getComponentNamePrefix()
Gets a prefix for the names of the components for testability. 
 | 
javax.swing.JComboBox | 
getConnCombo()
Deprecated. 
 
- this breaks the encapsulation of this UI class. Use
  
getConnectionName() and setConnectionName(java.lang.String) to get/set the
 selection and
 addComboListener to
 add a listener for changes in the selection. | 
static java.lang.String | 
getConnection(java.lang.String title,
             java.lang.String prompt,
             java.lang.String connName,
             boolean oracleOnly)
Invokes a dialog for selecting a connection. 
 | 
ConnectionInfo | 
getConnectionInfo()
Gets the connection details for the currently chosen connection. 
 | 
java.lang.String | 
getConnectionName()
Gets the connection name that is currently selected. 
 | 
protected DatabaseConnections | 
getConnections()
Used by the default implementation of  
listConnections() to
 return the DatabaseConnections instance that contains the connections
 to choose from. | 
protected javax.swing.JComboBox | 
getPicker()
Gets the picker combo for the actual connection. 
 | 
protected PropertyStorage | 
getPropertyStorage()
Used by  
loadSettings() and saveSettings() for
 remembering the last chosen connection. | 
protected java.lang.String | 
getSettingsKey()
The settings key is used to store the last selected connection in the
 property storage returned by  
getPropertyStorage(). | 
protected java.lang.String | 
getStoreName()
Gets the name of the connection store from which the connections are
 to be listed. 
 | 
void | 
itemStateChanged(java.awt.event.ItemEvent e)
Deprecated.  
 | 
protected void | 
launchConnectionDialog(boolean edit)
Launches the dialog for creating a new connection, or editing the currently
 selected connection. 
 | 
protected java.util.Collection<java.lang.String> | 
listConnections()
By default this lists the connections on the DatabaseConnections
 instance returned by  
getConnections(). | 
void | 
loadSettings()
Sets the current selection to that which is stored in the PropertyStorage
 returned by  
getPropertyStorage() under the key returned by
 getSettingsKey(). | 
int | 
resetConnections()
Resets the list of connections ( using  
listConnections() ) and
 returns the total number of connections in the newly populated list. | 
protected java.lang.String | 
runConnectionDialog(java.lang.String conn)
This method is called as a result of the New or Edit button being pressed. 
 | 
void | 
saveSettings()
Saves the current selection to the PropertyStorage returned by
  
getPropertyStorage() under the key returned by
 getSettingsKey(). | 
void | 
setCanAddNull(boolean boo)
Deprecated. 
 
- replaced by
  
setNoConnectionString | 
void | 
setConnectionInfo(ConnectionInfo info)
Sets the details for the currently chosen connection. 
 | 
boolean | 
setConnectionName(java.lang.String name)
Sets the name of the selected connection and returns true if the connection
 was in the list (i.e. 
 | 
addButton, addButtons, addComboListener, addNotify, checkConnection, checkFocus, clearLastShownInfo, disableDetails, enableActiveComponents, enableButtons, fireSelectionChanged, getConnection, getContext, getDefaultFocusComponent, getDetailsPanel, getListeners, getNoConnectionString, getOracleSubType, getPromptText, getResourceHelper, getSubTypes, initialise, isListening, populateDetails, removeComboListener, setAddButtons, setConnectionLabel, setConnectionPrompt, setContext, setEnabled, setListening, setNoConnectionString, setShowDetailsgetAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUIaddAncestorListener, 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, updateadd, 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, validateTreeaction, 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, transferFocusUpCyclepublic ConnectionPanelUI(boolean showDetails)
public ConnectionPanelUI(boolean oracleOnly,
                 boolean showDetails)
public ConnectionPanelUI(java.lang.String[] subTypes,
                 boolean showDetails)
protected java.lang.String getComponentNamePrefix()
AbstractConnectionPanelUIgetComponentNamePrefix in class AbstractConnectionPanelUIprotected javax.swing.JComboBox getPicker()
AbstractConnectionPanelUIgetPicker in class AbstractConnectionPanelUIpublic java.lang.String getConnectionName()
public boolean setConnectionName(java.lang.String name)
name - the name of the connection to selectprotected DatabaseConnections getConnections()
listConnections() to
 return the DatabaseConnections instance that contains the connections
 to choose from.protected java.lang.String getStoreName()
protected java.util.Collection<java.lang.String> listConnections()
getConnections().
 Subclasses can override to provide any list of connection names
 required.public int resetConnections()
listConnections() ) and
 returns the total number of connections in the newly populated list.resetConnections in class AbstractConnectionPanelUIpublic final ConnectionInfo getConnectionInfo()
AbstractConnectionPanelUIgetConnectionInfo in class AbstractConnectionPanelUIpublic final void setConnectionInfo(ConnectionInfo info)
AbstractConnectionPanelUIsetConnectionInfo in class AbstractConnectionPanelUIprotected java.lang.String getSettingsKey()
getPropertyStorage(). For the save
 to occur, saveSettings() must be called.protected PropertyStorage getPropertyStorage()
loadSettings() and saveSettings() for
 remembering the last chosen connection.public void loadSettings()
getPropertyStorage() under the key returned by
 getSettingsKey().public void saveSettings()
getPropertyStorage() under the key returned by
 getSettingsKey().protected java.lang.String runConnectionDialog(java.lang.String conn)
conn - the connection name to edit in the dialog, if null invoke a
 "new" dialog.protected DatabaseConnectionEditorLauncher createDatabaseConnectionEditorLauncher()
runConnectionDialog(String) when
 the add/edit button is pressed.protected void launchConnectionDialog(boolean edit)
AbstractConnectionPanelUIlaunchConnectionDialog in class AbstractConnectionPanelUI@Deprecated public void itemStateChanged(java.awt.event.ItemEvent e)
checkConnection.@Deprecated public javax.swing.JComboBox getConnCombo()
getConnectionName() and setConnectionName(java.lang.String) to get/set the
 selection and
 addComboListener to
 add a listener for changes in the selection.@Deprecated protected boolean getCanAddNull()
@Deprecated public void setCanAddNull(boolean boo)
setNoConnectionString@Deprecated public void actionPerformed(java.awt.event.ActionEvent ae)
public static java.lang.String getConnection(java.lang.String title,
                             java.lang.String prompt,
                             java.lang.String connName,
                             boolean oracleOnly)
AppConnectionPanelUI.title - the dialog titleprompt - the prompt string for the dialogconnName - the initially selected connection name, or
 null to use the defaultoracleOnly - whether to only display Oracle connections.