|
|||||||||||
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.ResourceListPane
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 server. listPane.load();
ResourceListModel
,
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 | |
---|---|
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 java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public ResourceListPane()
public ResourceListPane(ResourceList resourceList, ResourceProperties resourceProperties)
resourceList
- The resource list.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 ListModel 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 int getVisibleRowCount()
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 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.public void setVisibleRowCount(int visibleRowCount)
visibleRowCount
- The preferred number of visible rows.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |