All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.ibm.as400.vaccess.AS400ListPane

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----com.sun.java.swing.JComponent
                           |
                           +----com.ibm.as400.vaccess.AS400ListPane

public class AS400ListPane
extends JComponent
implements Serializable
The AS400ListPane class represents a graphical user interface that presents a list of the contents of an AS/400 resource, known as the root. You must explicitly call load() to load the information from the AS/400.

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

AS400ListPane objects generate the following events:

The following example creates a list pane filled with the list of printers on an AS/400.

// Set up the list pane.
AS400 system = new AS400 ("MySystem", "Userid", "Password");
VPrinters printers = new VPrinters (system);
AS400ListPane listPane = new AS400ListPane (printers);
listPane.load ();

// Add the list pane to a frame. JFrame frame = new JFrame ("My Window"); frame.getContentPane().add (listPane);

See Also:
AS400ListModel

Constructor Index

 o AS400ListPane()
Constructs an AS400ListPane object.
 o AS400ListPane(VNode)
Constructs an AS400ListPane object.

Method Index

 o addErrorListener(ErrorListener)
Adds a listener to be notified when an error occurs.
 o addListSelectionListener(ListSelectionListener)
Adds a listener to be notified when a list selection occurs.
 o addPropertyChangeListener(PropertyChangeListener)
Adds a listener to be notified when the value of any bound property changes.
 o addVetoableChangeListener(VetoableChangeListener)
Adds a listener to be notified when the value of any constrained property changes.
 o getActionContext()
Returns the context in which actions will be performed.
 o getAllowActions()
Indicates if actions can be invoked on objects.
 o getConfirm()
Indicates if certain actions are confirmed with the user.
 o getModel()
Returns the list model.
 o getRoot()
Returns the root, or the AS/400 resource, from which all information for the model is gathered.
 o getSelectedObject()
Returns the first selected object.
 o getSelectedObjects()
Returns the selected objects.
 o getSelectionModel()
Returns the selection model that is used to maintain selection state.
 o getVisibleRowCount()
Returns the preferred number of visible rows.
 o isSelected(VObject)
Indicates if the object is selected.
 o load()
Loads the information from the AS/400.
 o removeErrorListener(ErrorListener)
Removes an error listener.
 o removeListSelectionListener(ListSelectionListener)
Removes a list selection listener.
 o removePropertyChangeListener(PropertyChangeListener)
Removes a property change listener.
 o removeVetoableChangeListener(VetoableChangeListener)
Removes a vetoable change listener.
 o setAllowActions(boolean)
Sets whether actions are allowed.
 o setConfirm(boolean)
Sets whether certain actions are confirmed with the user.
 o setRoot(VNode)
Sets the root, or the AS/400 resource, from which all information for the model is gathered.
 o setSelectionModel(ListSelectionModel)
Sets the selection model that is used to maintain selection state.
 o setVisibleRowCount(int)
Sets the preferred number of visible rows.
 o sort(Object[], boolean[])
Sorts the contents.

Constructors

 o AS400ListPane
 public AS400ListPane()
Constructs an AS400ListPane object.

 o AS400ListPane
 public AS400ListPane(VNode root)
Constructs an AS400ListPane object.

Parameters:
root - The root, or the AS/400 resource, from which all information for the model is gathered.

Methods

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

Parameters:
listener - The listener.
 o addListSelectionListener
 public void addListSelectionListener(ListSelectionListener listener)
Adds a listener to be notified when a list selection occurs.

Parameters:
listener - The listener.
 o addPropertyChangeListener
 public void addPropertyChangeListener(PropertyChangeListener listener)
Adds a listener to be notified when the value of any bound property changes.

Parameters:
listener - The listener.
Overrides:
addPropertyChangeListener in class JComponent
 o addVetoableChangeListener
 public void addVetoableChangeListener(VetoableChangeListener listener)
Adds a listener to be notified when the value of any constrained property changes.

Parameters:
listener - The listener.
Overrides:
addVetoableChangeListener in class JComponent
 o getActionContext
 public VActionContext getActionContext()
Returns the context in which actions will be performed.

Returns:
The action context.
 o getAllowActions
 public boolean getAllowActions()
Indicates if actions can be invoked on objects.

Returns:
true if actions can be invoked; false otherwise.
 o getConfirm
 public boolean getConfirm()
Indicates if certain actions are confirmed with the user.

Returns:
true if certain actions are confirmed with the user; false otherwise.
 o getModel
 public ListModel getModel()
Returns the list model.

Returns:
The list model.
 o getRoot
 public VNode getRoot()
Returns the root, or the AS/400 resource, from which all information for the model is gathered.

Returns:
The root, or the AS/400 resource, from which all information for the model is gathered. It will be null if none has been set.
 o getSelectedObject
 public VObject getSelectedObject()
Returns the first selected object.

Returns:
The first selected object, or null if none are selected.
 o getSelectedObjects
 public VObject[] getSelectedObjects()
Returns the selected objects.

Returns:
The selected objects.
 o getSelectionModel
 public ListSelectionModel getSelectionModel()
Returns the selection model that is used to maintain selection state. This provides the ability to programmatically select and deselect objects.

Returns:
The selection model.
 o getVisibleRowCount
 public int getVisibleRowCount()
Returns the preferred number of visible rows.

Returns:
The preferred number of visible rows.
 o isSelected
 public boolean isSelected(VObject object)
Indicates if the object is selected.

Parameters:
object - The object.
Returns:
true if the object is selected; false otherwise.
 o load
 public void load()
Loads the information from the AS/400.

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

Parameters:
listener - The listener.
 o removeListSelectionListener
 public void removeListSelectionListener(ListSelectionListener listener)
Removes a list selection listener.

Parameters:
listener - The listener.
 o removePropertyChangeListener
 public void removePropertyChangeListener(PropertyChangeListener listener)
Removes a property change listener.

Parameters:
listener - The listener.
Overrides:
removePropertyChangeListener in class JComponent
 o removeVetoableChangeListener
 public void removeVetoableChangeListener(VetoableChangeListener listener)
Removes a vetoable change listener.

Parameters:
listener - The listener.
Overrides:
removeVetoableChangeListener in class JComponent
 o setAllowActions
 public void setAllowActions(boolean allowActions)
Sets whether actions are allowed. The following are enabled only when actions are allowed:

The default is false.

Parameters:
allowActions - true if actions are allowed; false otherwise.
 o setConfirm
 public void setConfirm(boolean confirm)
Sets whether certain actions are confirmed with the user. The default is true.

Parameters:
confirm - true if certain actions are confirmed with the user; false otherwise.
 o setRoot
 public void setRoot(VNode root) throws PropertyVetoException
Sets the root, or the AS/400 resource, from which all information for the model is gathered. It will not take effect until load() is done.

Parameters:
root - The root, or the AS/400 resource, from which all information for the model is gathered.
Throws: PropertyVetoException
If the change is vetoed.
 o setSelectionModel
 public void setSelectionModel(ListSelectionModel selectionModel)
Sets the selection model that is used to maintain selection state. This provides the ability to programmatically select and deselect objects.

Parameters:
selectionModel - The selection model.
 o setVisibleRowCount
 public void setVisibleRowCount(int visibleRowCount)
Sets the preferred number of visible rows.

Parameters:
visibleRowCount - The preferred number of visible rows.
 o sort
 public void sort(Object propertyIdentifiers[],
                  boolean orders[])
Sorts the contents. The propertyIdentifer[0], orders[0] combination is used to do the sort. If the values are equal, propertyIdentifier[1], orders[1] is used to break the tie, and so forth.

Parameters:
propertyIdentifiers - The property identifiers. If any of the property identifiers are null, it means to sort using the string representation of the object.
orders - The sort orders for each property identifier; true for ascending order, false for descending order.

All Packages  Class Hierarchy  This Package  Previous  Next  Index