|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
com.ibm.as400.vaccess.ResourceListDetailsPane
The ResourceListDetailsPane class represents a graphical user interface
that presents the contents of a
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 server. detailsPane.load();
ResourceListDetailsModel
,
Serialized FormNested Class Summary |
---|
Nested classes inherited from class javax.swing.JComponent |
---|
JComponent.AccessibleJComponent |
Nested classes inherited from class java.awt.Container |
---|
Container.AccessibleAWTContainer |
Nested classes inherited from class java.awt.Component |
---|
Component.AccessibleAWTComponent, 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 | |
---|---|
ResourceListDetailsPane()
Deprecated. Constructs a ResourceListDetailsPane object. |
|
ResourceListDetailsPane(ResourceList resourceList,
Object[] columnAttributeIDs,
ResourceProperties resourceProperties)
Deprecated. Constructs a ResourceListDetailsPane 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. |
Object[] |
getColumnAttributeIDs()
Deprecated. Returns the column attribute IDs. |
TableColumnModel |
getColumnModel()
Deprecated. Returns the column model that is used to maintain the columns. |
TableModel |
getModel()
Deprecated. Returns the model that contains data for the table. |
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 resources which are represented by the selected rows. |
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(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 |
setColumnAttributeIDs(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(ListSelectionModel selectionModel)
Deprecated. Sets the selection model that is used to maintain selection state. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public ResourceListDetailsPane()
public ResourceListDetailsPane(ResourceList resourceList, 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.Method Detail |
public void addErrorListener(ErrorListener listener)
listener
- The listener.public void addListSelectionListener(ListSelectionListener listener)
listener
- The listener.public void addPropertyChangeListener(PropertyChangeListener listener)
listener
- The listener.public boolean getAllowActions()
public Object[] getColumnAttributeIDs()
public TableColumnModel getColumnModel()
public TableModel getModel()
public Resource getResourceAtPoint(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 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(ListSelectionListener listener)
listener
- The listener.public void removePropertyChangeListener(PropertyChangeListener listener)
listener
- The listener.public void setAllowActions(boolean allowActions)
allowActions
- true to enable pop-up menus, false otherwise.
The default is true.public void setColumnAttributeIDs(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(ListSelectionModel selectionModel)
selectionModel
- The selection model.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |