com.ibm.as400.vaccess
Class ResourceListPane

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by com.ibm.as400.vaccess.ResourceListPane
All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable

Deprecated. Use Java Swing instead, along with the classes in package com.ibm.as400.access

public class ResourceListPane
extends JComponent
implements Serializable

The ResourceListPane class represents a graphical user interface that presents the contents of a ResourceList in a list. Every item represents a Resource from the list. You must explicitly call load() to load the information from the resource list.

Pop-up menus are enabled by default. The pop-up menus will contain a single "Properties" menu item which, when selected, presents one of the following Properties dialogs:

Most errors are reported as ErrorEvents rather than throwing exceptions. Users should listen for ErrorEvents in order to diagnose and recover from error conditions.

ResourceListPane objects generate the following events:

The following example creates a list pane filled with the list of messages in a message queue.

// Create the resource list.  This example creates
// a list of all messages in a message queue.
AS400 system = new AS400("MYSYSTEM", "MYUSERID", "MYPASSWORD");
RMessageQueue mq = new RMessageQueue(system, "/QSYS.LIB/MYLIB.LIB/MYMQ.MSGQ");

// Create the ResourceListPane. ResourceListPane listPane = new ResourceListPane(); listPane.setResourceList(mq);
// Add the ResourceListPane to a JFrame and show it. JFrame frame = new JFrame("My Window"); frame.getContentPane().add(listPane); frame.pack(); frame.show();
// The ResourceListPane will appear empty until we // load it. This gives us control of when the list // of messages is retrieved from the system. listPane.load();

See Also:
ResourceListModel, Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
 
Nested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
 
Field Summary
 
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
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
ResourceListPane()
          Deprecated. Constructs a ResourceListPane object.
ResourceListPane(ResourceList resourceList, ResourceProperties resourceProperties)
          Deprecated. Constructs a ResourceListPane object.
 
Method Summary
 void addErrorListener(ErrorListener listener)
          Deprecated. Adds a listener to be notified when an error occurs.
 void addListSelectionListener(ListSelectionListener listener)
          Deprecated. Adds a listener to be notified when a list selection occurs.
 void addPropertyChangeListener(PropertyChangeListener listener)
          Deprecated. Adds a listener to be notified when the value of any bound property changes.
 boolean getAllowActions()
          Deprecated. Indicates if pop-up menus are enabled.
 ListModel getModel()
          Deprecated. Returns the list model.
 Resource getResourceAtPoint(Point point)
          Deprecated. Returns the resource that corresponds to the row located at the specified point.
 ResourceList getResourceList()
          Deprecated. Returns the resource list from which all information for the model is gathered.
 ResourceProperties getResourceProperties()
          Deprecated. Returns the resource properties.
 Resource getSelectedResource()
          Deprecated. Returns the first selected resource.
 Resource[] getSelectedResources()
          Deprecated. Returns the selected resources.
 ListSelectionModel getSelectionModel()
          Deprecated. Returns the selection model that is used to maintain selection state.
 int getVisibleRowCount()
          Deprecated. Returns the preferred number of visible rows.
 boolean isSelected(Resource resource)
          Deprecated. Indicates if the resource is selected.
 void load()
          Deprecated. Loads the information from the resource list.
 void removeErrorListener(ErrorListener listener)
          Deprecated. Removes an error listener.
 void removeListSelectionListener(ListSelectionListener listener)
          Deprecated. Removes a list selection listener.
 void removePropertyChangeListener(PropertyChangeListener listener)
          Deprecated. Removes a property change listener.
 void setAllowActions(boolean allowActions)
          Deprecated. Sets whether pop-up menus are enabled.
 void setResourceList(ResourceList resourceList)
          Deprecated. Sets the resource list from which all information for the model is gathered.
 void setResourceProperties(ResourceProperties resourceProperties)
          Deprecated. Sets the resource properties.
 void setSelectionModel(ListSelectionModel selectionModel)
          Deprecated. Sets the selection model that is used to maintain selection state.
 void setVisibleRowCount(int visibleRowCount)
          Deprecated. Sets the preferred number of visible rows.
 
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, 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, transferFocusBackward, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ResourceListPane

public ResourceListPane()
Deprecated. 
Constructs a ResourceListPane object.


ResourceListPane

public ResourceListPane(ResourceList resourceList,
                        ResourceProperties resourceProperties)
Deprecated. 
Constructs a ResourceListPane object.

Parameters:
resourceList - The resource list.
resourceProperties - The resource properties.
Method Detail

addErrorListener

public void addErrorListener(ErrorListener listener)
Deprecated. 
Adds a listener to be notified when an error occurs.

Parameters:
listener - The listener.

addListSelectionListener

public void addListSelectionListener(ListSelectionListener listener)
Deprecated. 
Adds a listener to be notified when a list selection occurs.

Parameters:
listener - The listener.

addPropertyChangeListener

public void addPropertyChangeListener(PropertyChangeListener listener)
Deprecated. 
Adds a listener to be notified when the value of any bound property changes.

Overrides:
addPropertyChangeListener in class Container
Parameters:
listener - The listener.

getAllowActions

public boolean getAllowActions()
Deprecated. 
Indicates if pop-up menus are enabled.

Returns:
true if pop-up menus are enabled, false otherwise.

getModel

public ListModel getModel()
Deprecated. 
Returns the list model.

Returns:
The list model.

getResourceAtPoint

public Resource getResourceAtPoint(Point point)
Deprecated. 
Returns the resource that corresponds to the row located at the specified point. This can be useful for present customized pop-up menus.

Parameters:
point - The point.
Returns:
The resource that corresponds to the row located at the point, or null if no such resource exists.

getResourceList

public ResourceList getResourceList()
Deprecated. 
Returns the resource list from which all information for the model is gathered.

Returns:
The resource list from which all information for the model is gathered. This will be null if none has been set.

getResourceProperties

public ResourceProperties getResourceProperties()
Deprecated. 
Returns the resource properties. The resource properties object describes the arrangement of the Properties dialog that is presented when the user right clicks on a list item and selects "Properties".


getSelectedResource

public Resource getSelectedResource()
Deprecated. 
Returns the first selected resource.

Returns:
The first selected resource, or null if none are selected.
See Also:
getSelectionModel(), setSelectionModel(javax.swing.ListSelectionModel)

getSelectedResources

public Resource[] getSelectedResources()
Deprecated. 
Returns the selected resources.

Returns:
The selected resources. The array is empty if no resources are selected.
See Also:
getSelectionModel(), setSelectionModel(javax.swing.ListSelectionModel)

getSelectionModel

public ListSelectionModel getSelectionModel()
Deprecated. 
Returns the selection model that is used to maintain selection state. This provides the ability to programmatically select and deselect resources.

Returns:
The selection model.

getVisibleRowCount

public int getVisibleRowCount()
Deprecated. 
Returns the preferred number of visible rows.

Returns:
The preferred number of visible rows.

isSelected

public boolean isSelected(Resource resource)
Deprecated. 
Indicates if the resource is selected.

Parameters:
resource - The resource.
Returns:
true if the resource is selected; false otherwise.
See Also:
getSelectionModel(), setSelectionModel(javax.swing.ListSelectionModel)

load

public void load()
Deprecated. 
Loads the information from the resource list.


removeErrorListener

public void removeErrorListener(ErrorListener listener)
Deprecated. 
Removes an error listener.

Parameters:
listener - The listener.

removeListSelectionListener

public void removeListSelectionListener(ListSelectionListener listener)
Deprecated. 
Removes a list selection listener.

Parameters:
listener - The listener.

removePropertyChangeListener

public void removePropertyChangeListener(PropertyChangeListener listener)
Deprecated. 
Removes a property change listener.

Overrides:
removePropertyChangeListener in class Component
Parameters:
listener - The listener.

setAllowActions

public void setAllowActions(boolean allowActions)
Deprecated. 
Sets whether pop-up menus are enabled.

Parameters:
allowActions - true to enable pop-up menus, false otherwise. The default is true.

setResourceList

public void setResourceList(ResourceList resourceList)
Deprecated. 
Sets the resource list from which all information for the model is gathered.

Parameters:
resourceList - The resource list from which all information for the model is gathered.

setResourceProperties

public void setResourceProperties(ResourceProperties resourceProperties)
Deprecated. 
Sets the resource properties. The resource properties object describes the arrangement of the Properties dialog that is presented when the user right clicks on a list item and selects "Properties".

Parameters:
resourceProperties - The resource properties.

setSelectionModel

public void setSelectionModel(ListSelectionModel selectionModel)
Deprecated. 
Sets the selection model that is used to maintain selection state. This provides the ability to programmatically select and deselect resources.

Parameters:
selectionModel - The selection model.

setVisibleRowCount

public void setVisibleRowCount(int visibleRowCount)
Deprecated. 
Sets the preferred number of visible rows.

Parameters:
visibleRowCount - The preferred number of visible rows.