com.ibm.as400.vaccess
Class AS400JDBCDataSourcePane
- java.lang.Object
-
- java.awt.Component
-
- java.awt.Container
-
- javax.swing.JComponent
-
- com.ibm.as400.vaccess.AS400JDBCDataSourcePane
-
- All Implemented Interfaces:
- java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable
Deprecated.Use Java Swing instead, along with the classes in package com.ibm.as400.access
public class AS400JDBCDataSourcePane extends javax.swing.JComponent implements java.io.Serializable
The AS400JDBCDataSourcePane class represents a set of tabs that contain property values for a JDBC data source. Changes made to the pane are applied to the data source when applyChanges() is called.For example:
import com.ibm.as400.access.*; import com.ibm.as400.vaccess.*; import javax.swing.*; import java.awt.*; import java.awt.event.*; public class DataSourceGUIExample { static AS400JDBCDataSourcePane dataSourcePane = null; static AS400JDBCDataSource myDataSource = null; public static void main(String[] args) { // Like other Java classes the Toolbox classes throw // exceptions when something goes wrong. These must be // caught by programs that use the Toolbox. try { // Create a data source. myDataSource = new AS400JDBCDataSource(); // Create a window to hold the pane and an OK button. JFrame frame = new JFrame ("JDBC Data Source Properties"); // Create a data source pane. dataSourcePane = new AS400JDBCDataSourcePane(myDataSource); // Create an OK button JButton okButton = new JButton("OK"); // Add an ActionListener to the OK button. When OK is // pressed, applyChanges() will be called to commit any // changes to the data source. okButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent ev) { // Copy all changes made on the data source pane // to the data source. if (dataSourcePane.applyChanges()) { System.out.println("ok pressed"); myDataSource = dataSourcePane.getDataSource(); System.out.println(myDataSource.getServerName()); } } } ); // Setup the frame to show the pane and OK button. frame.getContentPane ().setLayout (new BorderLayout ()); frame.getContentPane ().add ("Center", dataSourcePane); frame.getContentPane ().add ("South", okButton); // Pack the frame. frame.pack (); //Display the pane and OK button. frame.show (); } catch (Exception e) { e.printStackTrace(); } } }
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
-
-
Field Summary
Fields Modifier and Type Field and Description static int
TAB_CONNECTIONOPTIONS
Deprecated.The index of the Connection Options tab.static int
TAB_FORMAT
Deprecated.The index of the Format tab.static int
TAB_GENERAL
Deprecated.The index of the General tab.static int
TAB_LANGUAGE
Deprecated.The index of the Language tab.static int
TAB_OTHER
Deprecated.The index of the Other tab.static int
TAB_PACKAGE
Deprecated.The index of the Package tab.static int
TAB_PERFORMANCE
Deprecated.The index of the Performance tab.static int
TAB_SERVER
Deprecated.The index of the Server tab.static int
TAB_TRANSLATION
Deprecated.The index of the Translation tab.-
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
-
-
Constructor Summary
Constructors Constructor and Description AS400JDBCDataSourcePane()
Deprecated.Constructs an AS400JDBCDataSourcePane object.AS400JDBCDataSourcePane(AS400JDBCDataSource dataSource)
Deprecated.Constructs an AS400JDBCDataSourcePane object.
-
Method Summary
Methods Modifier and Type Method and Description void
addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Deprecated.boolean
applyChanges()
Deprecated.Commits the JDBC property values being displayed to the data source.AS400JDBCDataSource
getDataSource()
Deprecated.Returns the data source currently being displayed.void
removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Deprecated.void
removeTabAt(int tabNumber)
Deprecated.Removes the specified tab from the pane.void
setDataSource(AS400JDBCDataSource dataSource)
Deprecated.Sets the data source to be displayed.-
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getAccessibleContext, 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, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, paramString, 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, updateUI
-
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, 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, transferFocusBackward, transferFocusDownCycle, validate, validateTree
-
Methods inherited from class java.awt.Component
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, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
-
-
-
-
Field Detail
-
TAB_GENERAL
public static final int TAB_GENERAL
Deprecated.The index of the General tab.- See Also:
- Constant Field Values
-
TAB_SERVER
public static final int TAB_SERVER
Deprecated.The index of the Server tab.- See Also:
- Constant Field Values
-
TAB_PACKAGE
public static final int TAB_PACKAGE
Deprecated.The index of the Package tab.- See Also:
- Constant Field Values
-
TAB_PERFORMANCE
public static final int TAB_PERFORMANCE
Deprecated.The index of the Performance tab.- See Also:
- Constant Field Values
-
TAB_LANGUAGE
public static final int TAB_LANGUAGE
Deprecated.The index of the Language tab.- See Also:
- Constant Field Values
-
TAB_OTHER
public static final int TAB_OTHER
Deprecated.The index of the Other tab.- See Also:
- Constant Field Values
-
TAB_TRANSLATION
public static final int TAB_TRANSLATION
Deprecated.The index of the Translation tab.- See Also:
- Constant Field Values
-
TAB_FORMAT
public static final int TAB_FORMAT
Deprecated.The index of the Format tab.- See Also:
- Constant Field Values
-
TAB_CONNECTIONOPTIONS
public static final int TAB_CONNECTIONOPTIONS
Deprecated.The index of the Connection Options tab.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
AS400JDBCDataSourcePane
public AS400JDBCDataSourcePane()
Deprecated.Constructs an AS400JDBCDataSourcePane object. A default data source will be displayed.
-
AS400JDBCDataSourcePane
public AS400JDBCDataSourcePane(AS400JDBCDataSource dataSource)
Deprecated.Constructs an AS400JDBCDataSourcePane object.- Parameters:
dataSource
- The JDBC data source to display.
-
-
Method Detail
-
getDataSource
public AS400JDBCDataSource getDataSource()
Deprecated.Returns the data source currently being displayed.- Returns:
- Data source for this pane.
-
setDataSource
public void setDataSource(AS400JDBCDataSource dataSource)
Deprecated.Sets the data source to be displayed.- Parameters:
dataSource
- The JDBC data source to display.
-
applyChanges
public boolean applyChanges()
Deprecated.Commits the JDBC property values being displayed to the data source.- Returns:
- true if changes were applied successfully; false otherwise.
-
removeTabAt
public void removeTabAt(int tabNumber)
Deprecated.Removes the specified tab from the pane. The following constants should be used to specify the tab number:- TAB_GENERAL
- TAB_SERVER
- TAB_PACKAGE
- TAB_PERFORMANCE
- TAB_LANGUAGE
- TAB_OTHER
- TAB_TRANSLATION
- TAB_FORMAT
- TAB_CONNECTIONOPTIONS
-
addPropertyChangeListener
public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Deprecated.- Overrides:
addPropertyChangeListener
in classjava.awt.Container
-
removePropertyChangeListener
public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Deprecated.- Overrides:
removePropertyChangeListener
in classjava.awt.Component
-
-