|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.Component | +--java.awt.Container | +--javax.swing.JComponent | +--com.ibm.as400.vaccess.AS400JDBCDataSourcePane
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.
// Create a data source. AS400JDBCDataSource 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) { // Apply all changes made on the data source pane // to the data source. If all changes are applied // successfully, get the data source from the pane. if (AS400JDBCDataSourcePaneTest.myPane.applyChanges()) myDataSource = myPane.getDataSource(); } });
// 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 ();
Inner classes inherited from class javax.swing.JComponent |
javax.swing.JComponent.AccessibleJComponent |
Field Summary | |
static int |
TAB_CONNECTIONOPTIONS
The index of the Connection Options tab. |
static int |
TAB_FORMAT
The index of the Format tab. |
static int |
TAB_GENERAL
The index of the General tab. |
static int |
TAB_LANGUAGE
The index of the Language tab. |
static int |
TAB_OTHER
The index of the Other tab. |
static int |
TAB_PACKAGE
The index of the Package tab. |
static int |
TAB_PERFORMANCE
The index of the Performance tab. |
static int |
TAB_SERVER
The index of the Server tab. |
static int |
TAB_TRANSLATION
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 |
Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT,
CENTER_ALIGNMENT,
LEFT_ALIGNMENT,
RIGHT_ALIGNMENT,
TOP_ALIGNMENT |
Constructor Summary | |
AS400JDBCDataSourcePane()
Constructs an AS400JDBCDataSourcePane object. |
|
AS400JDBCDataSourcePane(AS400JDBCDataSource dataSource)
Constructs an AS400JDBCDataSourcePane object. |
Method Summary | |
void |
addPropertyChangeListener(java.beans.PropertyChangeListener listener)
|
boolean |
applyChanges()
Commits the JDBC property values being displayed to the data source. |
AS400JDBCDataSource |
getDataSource()
Returns the data source currently being displayed. |
void |
removePropertyChangeListener(java.beans.PropertyChangeListener listener)
|
void |
removeTabAt(int tabNumber)
Removes the specified tab from the pane. |
void |
setDataSource(AS400JDBCDataSource dataSource)
Sets the data source to be displayed. |
Methods inherited from class javax.swing.JComponent |
addAncestorListener,
addNotify,
addPropertyChangeListener,
addVetoableChangeListener,
computeVisibleRect,
contains,
createToolTip,
firePropertyChange,
firePropertyChange,
firePropertyChange,
firePropertyChange,
firePropertyChange,
firePropertyChange,
firePropertyChange,
firePropertyChange,
firePropertyChange,
fireVetoableChange,
getAccessibleContext,
getActionForKeyStroke,
getAlignmentX,
getAlignmentY,
getAutoscrolls,
getBorder,
getBounds,
getClientProperty,
getComponentGraphics,
getConditionForKeyStroke,
getDebugGraphicsOptions,
getGraphics,
getHeight,
getInsets,
getInsets,
getLocation,
getMaximumSize,
getMinimumSize,
getNextFocusableComponent,
getPreferredSize,
getRegisteredKeyStrokes,
getRootPane,
getSize,
getToolTipLocation,
getToolTipText,
getToolTipText,
getTopLevelAncestor,
getUIClassID,
getVisibleRect,
getWidth,
getX,
getY,
grabFocus,
hasFocus,
isDoubleBuffered,
isFocusCycleRoot,
isFocusTraversable,
isLightweightComponent,
isManagingFocus,
isOpaque,
isOptimizedDrawingEnabled,
isPaintingTile,
isRequestFocusEnabled,
isValidateRoot,
paint,
paintBorder,
paintChildren,
paintComponent,
paintImmediately,
paintImmediately,
paramString,
processComponentKeyEvent,
processFocusEvent,
processKeyEvent,
processMouseMotionEvent,
putClientProperty,
registerKeyboardAction,
registerKeyboardAction,
removeAncestorListener,
removeNotify,
removePropertyChangeListener,
removeVetoableChangeListener,
repaint,
repaint,
requestDefaultFocus,
requestFocus,
resetKeyboardActions,
reshape,
revalidate,
scrollRectToVisible,
setAlignmentX,
setAlignmentY,
setAutoscrolls,
setBackground,
setBorder,
setDebugGraphicsOptions,
setDoubleBuffered,
setEnabled,
setFont,
setForeground,
setMaximumSize,
setMinimumSize,
setNextFocusableComponent,
setOpaque,
setPreferredSize,
setRequestFocusEnabled,
setToolTipText,
setUI,
setVisible,
unregisterKeyboardAction,
update,
updateUI |
Methods inherited from class java.awt.Container |
add,
add,
add,
add,
add,
addContainerListener,
addImpl,
countComponents,
deliverEvent,
doLayout,
findComponentAt,
findComponentAt,
getComponent,
getComponentAt,
getComponentAt,
getComponentCount,
getComponents,
getLayout,
insets,
invalidate,
isAncestorOf,
layout,
list,
list,
locate,
minimumSize,
paintComponents,
preferredSize,
print,
printComponents,
processContainerEvent,
processEvent,
remove,
remove,
removeAll,
removeContainerListener,
setCursor,
setLayout,
validate,
validateTree |
Methods inherited from class java.awt.Component |
action,
add,
addComponentListener,
addFocusListener,
addInputMethodListener,
addKeyListener,
addMouseListener,
addMouseMotionListener,
bounds,
checkImage,
checkImage,
coalesceEvents,
contains,
createImage,
createImage,
disable,
disableEvents,
dispatchEvent,
enable,
enable,
enableEvents,
enableInputMethods,
getBackground,
getBounds,
getColorModel,
getComponentOrientation,
getCursor,
getDropTarget,
getFont,
getFontMetrics,
getForeground,
getInputContext,
getInputMethodRequests,
getLocale,
getLocation,
getLocationOnScreen,
getName,
getParent,
getPeer,
getSize,
getToolkit,
getTreeLock,
gotFocus,
handleEvent,
hide,
imageUpdate,
inside,
isDisplayable,
isEnabled,
isLightweight,
isShowing,
isValid,
isVisible,
keyDown,
keyUp,
list,
list,
list,
location,
lostFocus,
mouseDown,
mouseDrag,
mouseEnter,
mouseExit,
mouseMove,
mouseUp,
move,
nextFocus,
paintAll,
postEvent,
prepareImage,
prepareImage,
printAll,
processComponentEvent,
processInputMethodEvent,
processMouseEvent,
remove,
removeComponentListener,
removeFocusListener,
removeInputMethodListener,
removeKeyListener,
removeMouseListener,
removeMouseMotionListener,
repaint,
repaint,
repaint,
resize,
resize,
setBounds,
setBounds,
setComponentOrientation,
setDropTarget,
setLocale,
setLocation,
setLocation,
setName,
setSize,
setSize,
show,
show,
size,
toString,
transferFocus |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Field Detail |
public static final int TAB_GENERAL
public static final int TAB_SERVER
public static final int TAB_PACKAGE
public static final int TAB_PERFORMANCE
public static final int TAB_LANGUAGE
public static final int TAB_OTHER
public static final int TAB_TRANSLATION
public static final int TAB_FORMAT
public static final int TAB_CONNECTIONOPTIONS
Constructor Detail |
public AS400JDBCDataSourcePane()
public AS400JDBCDataSourcePane(AS400JDBCDataSource dataSource)
dataSource
- The JDBC data source to display.Method Detail |
public AS400JDBCDataSource getDataSource()
public void setDataSource(AS400JDBCDataSource dataSource)
dataSource
- The JDBC data source to display.public boolean applyChanges()
public void removeTabAt(int tabNumber)
public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |