public class ResourceListDetailsPane
extends javax.swing.JComponent
implements java.io.Serializable
ResourceList
in a table. Every row in the table represents a
Resource
from the
list. You must explicitly call load()
to load the information from the resource list.
The table columns are specified as an array of column attribute IDs. The table will contain a column for each element of the array. The following can be specified as column attribute IDs:
Presentation
object are presented in the column.
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.
ResourceListDetailsPane objects generate the following events:
The following example creates a details pane which presents a list of users.
// Create the resource list. This example creates // a list of all users on the system. AS400 system = new AS400("MYSYSTEM", "MYUSERID", "MYPASSWORD"); RUserList userList = new RUserList(system);
// Create the ResourceListDetailsPane. In this example, // there are two columns in the table. The first column // contains the icons and names for each user. The // second column contains the text description for each // user. Object[] columnAttributeIDs = new Object[] { null, RUser.TEXT_DESCRIPTION }; ResourceListDetailsPane detailsPane = new ResourceListDetailsPane(); detailsPane.setResourceList(userList); detailsPane.setColumnAttributeIDs(columnAttributeIDs);
// Add the ResourceListDetailsPane to a JFrame and show it. JFrame frame = new JFrame("My Window"); frame.getContentPane().add(detailsPane); frame.pack(); frame.show();
// The ResourceListDetailsPane will appear empty until // we load it. This gives us control of when the list // of users is retrieved from the system. detailsPane.load();
ResourceListDetailsModel
,
Serialized Formjavax.swing.JComponent.AccessibleJComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Constructor and Description |
---|
ResourceListDetailsPane()
Deprecated.
Constructs a ResourceListDetailsPane object.
|
ResourceListDetailsPane(ResourceList resourceList,
java.lang.Object[] columnAttributeIDs,
ResourceProperties resourceProperties)
Deprecated.
Constructs a ResourceListDetailsPane object.
|
Modifier and Type | Method and Description |
---|---|
void |
addErrorListener(ErrorListener listener)
Deprecated.
Adds a listener to be notified when an error occurs.
|
void |
addListSelectionListener(javax.swing.event.ListSelectionListener listener)
Deprecated.
Adds a listener to be notified when a list selection occurs.
|
void |
addPropertyChangeListener(java.beans.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.
|
java.lang.Object[] |
getColumnAttributeIDs()
Deprecated.
Returns the column attribute IDs.
|
javax.swing.table.TableColumnModel |
getColumnModel()
Deprecated.
Returns the column model that is used to maintain the columns.
|
javax.swing.table.TableModel |
getModel()
Deprecated.
Returns the model that contains data for the table.
|
Resource |
getResourceAtPoint(java.awt.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 resources which are represented by the selected rows.
|
javax.swing.ListSelectionModel |
getSelectionModel()
Deprecated.
Returns the selection model that is used to maintain row
selection state.
|
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(javax.swing.event.ListSelectionListener listener)
Deprecated.
Removes a list selection listener.
|
void |
removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Deprecated.
Removes a property change listener.
|
void |
setAllowActions(boolean allowActions)
Deprecated.
Sets whether pop-up menus are enabled.
|
void |
setColumnAttributeIDs(java.lang.Object[] columnAttributeIDs)
Deprecated.
Sets the column attribute IDs.
|
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(javax.swing.ListSelectionModel selectionModel)
Deprecated.
Sets the selection model that is used to maintain selection
state.
|
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, 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, 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 ResourceListDetailsPane()
public ResourceListDetailsPane(ResourceList resourceList, java.lang.Object[] columnAttributeIDs, ResourceProperties resourceProperties)
resourceList
- The resource list from which all information for the model is gathered.columnAttributeIDs
- The column attribute IDs.resourceProperties
- The resource properties.public void addErrorListener(ErrorListener listener)
listener
- The listener.public void addListSelectionListener(javax.swing.event.ListSelectionListener listener)
listener
- The listener.public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
addPropertyChangeListener
in class java.awt.Container
listener
- The listener.public boolean getAllowActions()
public java.lang.Object[] getColumnAttributeIDs()
public javax.swing.table.TableColumnModel getColumnModel()
public javax.swing.table.TableModel getModel()
public Resource getResourceAtPoint(java.awt.Point point)
point
- The point.public ResourceList getResourceList()
public ResourceProperties getResourceProperties()
public Resource getSelectedResource()
getSelectionModel()
,
setSelectionModel(javax.swing.ListSelectionModel)
public Resource[] getSelectedResources()
getSelectionModel()
,
setSelectionModel(javax.swing.ListSelectionModel)
public javax.swing.ListSelectionModel getSelectionModel()
public boolean isSelected(Resource resource)
resource
- The resource.getSelectionModel()
,
setSelectionModel(javax.swing.ListSelectionModel)
public void load()
public void removeErrorListener(ErrorListener listener)
listener
- The listener.public void removeListSelectionListener(javax.swing.event.ListSelectionListener listener)
listener
- The listener.public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
removePropertyChangeListener
in class java.awt.Component
listener
- The listener.public void setAllowActions(boolean allowActions)
allowActions
- true to enable pop-up menus, false otherwise.
The default is true.public void setColumnAttributeIDs(java.lang.Object[] columnAttributeIDs)
columnAttributeIDs
- The column attribute IDs.public void setResourceList(ResourceList resourceList)
resourceList
- The resource list from which all information for the model is gathered.public void setResourceProperties(ResourceProperties resourceProperties)
resourceProperties
- The resource properties.public void setSelectionModel(javax.swing.ListSelectionModel selectionModel)
selectionModel
- The selection model.