public class RecordListFormPane
extends javax.swing.JComponent
implements java.io.Serializable
The data in the form is retrieved from the system (and the GUI fields for the data are created) when load() is called. If load() is not called, the form will be empty.
Users must call close() to ensure that the system resources are properly freed when this form is no longer needed.
Most errors are reported by firing ErrorEvents, rather than throwing exceptions. Users should listen for ErrorEvents in order to diagnose and recover from error conditions.
RecordListFormPane objects generate the following events:
// Set up table for file contents. AS400 system = new AS400("MySystem", "Userid", "Password"); String file = "/QSYS.LIB/QGPL.LIB/MyFile.FILE"; final RecordListFormPane pane = new RecordListFormPane(system, file); // Set up window to hold table JFrame frame = new JFrame ("My Window"); WindowListener l = new WindowAdapter() { // Close the model when window is closed. public void windowClosing(WindowEvent e) { pane.close(); } }; frame.addWindowListener(l); // Set up the error dialog adapter. pane.addErrorListener (new ErrorDialogAdapter (frame)); // Add the component and get data from system. frame.getContentPane().add(pane); pane.load(); // Display the window frame.setVisible(true)
javax.swing.JComponent.AccessibleJComponent
Modifier and Type | Field and Description |
---|---|
static int |
KEY_EQ
Deprecated.
Constant indicating search type of equal.
|
static int |
KEY_GE
Deprecated.
Constant indicating search type of greater than or equal.
|
static int |
KEY_GT
Deprecated.
Constant indicating search type of greater than.
|
static int |
KEY_LE
Deprecated.
Constant indicating search type of less than or equal.
|
static int |
KEY_LT
Deprecated.
Constant indicating search type of less than.
|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Constructor and Description |
---|
RecordListFormPane()
Deprecated.
Constructs a RecordListFormPane object.
|
RecordListFormPane(AS400 system,
java.lang.String fileName)
Deprecated.
Constructs a RecordListFormPane object.
|
RecordListFormPane(AS400 system,
java.lang.String fileName,
java.lang.Object[] key,
int searchType)
Deprecated.
Constructs a RecordListFormPane object.
|
Modifier and Type | Method and Description |
---|---|
void |
addActionCompletedListener(ActionCompletedListener listener)
Deprecated.
Adds a listener to be notified when a new record is displayed.
|
void |
addErrorListener(ErrorListener listener)
Deprecated.
Adds a listener to be notified when an error occurs.
|
void |
close()
Deprecated.
Closes the file this form represents.
|
void |
displayFirst()
Deprecated.
Displays the first record of the record list.
|
void |
displayLast()
Deprecated.
Displays the last record of the record list.
|
void |
displayNext()
Deprecated.
Displays the next record of the record list.
|
void |
displayPrevious()
Deprecated.
Displays the previous record of the record list.
|
int |
getCurrentRecord()
Deprecated.
Returns the index of the record currently being displayed.
|
java.lang.String |
getFileName()
Deprecated.
Returns the file name.
|
java.lang.Object[] |
getKey()
Deprecated.
Returns the key.
|
boolean |
getKeyed()
Deprecated.
Returns whether the file will be accessed in key or sequential order.
|
java.lang.String |
getLabelText(int index)
Deprecated.
Returns the text of the label at the given index.
|
int |
getSearchType()
Deprecated.
Returns the search type.
|
java.lang.String |
getStringValueAt(int index)
Deprecated.
Returns the string value of the current record at the given index.
|
AS400 |
getSystem()
Deprecated.
Returns the system where the file is located.
|
java.lang.Object |
getValueAt(int index)
Deprecated.
Returns the value of the current record at the given index.
|
void |
load()
Deprecated.
Refreshes the view based on the state of the system.
|
void |
removeActionCompletedListener(ActionCompletedListener listener)
Deprecated.
Removes a listener from being notified when a new record is displayed.
|
void |
removeErrorListener(ErrorListener listener)
Deprecated.
Removes a listener from being notified when an error occurs.
|
void |
setFileName(java.lang.String fileName)
Deprecated.
Sets the name of the file.
|
void |
setKey(java.lang.Object[] key)
Deprecated.
Sets the key.
|
void |
setKeyed(boolean keyed)
Deprecated.
Sets whether the file will be accessed in key or sequential order.
|
void |
setLabelText(int index,
java.lang.String text)
Deprecated.
Sets the text of the label at the given index.
|
void |
setSearchType(int searchType)
Deprecated.
Sets the search type.
|
void |
setSystem(AS400 system)
Deprecated.
Sets the system where the file is located.
|
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
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, transferFocusBackward, 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, transferFocusUpCycle
public static final int KEY_EQ
public static final int KEY_GT
public static final int KEY_GE
public static final int KEY_LT
public static final int KEY_LE
public RecordListFormPane()
public RecordListFormPane(AS400 system, java.lang.String fileName)
system
- The system where the file is located.fileName
- The file name.
The name is specified as a fully qualified path name in the library file system.public RecordListFormPane(AS400 system, java.lang.String fileName, java.lang.Object[] key, int searchType)
system
- The system where the file is located.fileName
- The file name.
The name is specified as a fully qualified path name in the library file system.key
- The values which make up the key with which
to find the record.
This value may be null.searchType
- Constant indicating the type of match required.public void addActionCompletedListener(ActionCompletedListener listener)
listener
- The listener.public void addErrorListener(ErrorListener listener)
listener
- The listener.public void close()
public void displayFirst()
public void displayLast()
public void displayNext()
public void displayPrevious()
public int getCurrentRecord()
public java.lang.String getFileName()
public java.lang.Object[] getKey()
public boolean getKeyed()
public java.lang.String getLabelText(int index)
index
- The index of the label. Indices start at 0.public int getSearchType()
public AS400 getSystem()
public java.lang.String getStringValueAt(int index)
index
- The index of the value. Indices start at 0.public java.lang.Object getValueAt(int index)
index
- Index of the value. Indices start at 0.public void load()
public void removeActionCompletedListener(ActionCompletedListener listener)
listener
- The listener.public void removeErrorListener(ErrorListener listener)
listener
- The listener.public void setFileName(java.lang.String fileName) throws java.beans.PropertyVetoException
fileName
- The file name.
The name is specified as a fully qualified path name in the library file system.java.beans.PropertyVetoException
- If the change is vetoed.public void setKey(java.lang.Object[] key) throws java.beans.PropertyVetoException
key
- The values which make up the key with which
to find the record.
This value may be null.java.beans.PropertyVetoException
- If the change is vetoed.public void setKeyed(boolean keyed) throws java.beans.PropertyVetoException
keyed
- true if the file will be accessed in key order; false
if the file will be accessed in sequential order.java.beans.PropertyVetoException
- If the change is vetoed.public void setLabelText(int index, java.lang.String text)
index
- The index of the label. Indices start at 0.text
- The text of the label.public void setSearchType(int searchType) throws java.beans.PropertyVetoException
searchType
- Constant indicating the type of match required.java.beans.PropertyVetoException
- If the change is vetoed.public void setSystem(AS400 system) throws java.beans.PropertyVetoException
system
- The system where the file is located.java.beans.PropertyVetoException
- If the change is vetoed.