All Packages Class Hierarchy This Package Previous Next Index
Class com.ibm.as400.vaccess.AS400DetailsPane
java.lang.Object
|
+----java.awt.Component
|
+----java.awt.Container
|
+----javax.swing.JComponent
|
+----com.ibm.as400.vaccess.AS400DetailsPane
- public class AS400DetailsPane
- extends JComponent
- implements Serializable
The AS400DetailsPane class represents a graphical user interface
that displays the details regarding 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.
AS400DetailsPane objects generate the following events:
- ErrorEvent
- ListSelectionEvent
- PropertyChangeEvent
The following example creates a details pane.
// Set up the details pane.
AS400 system = new AS400 ("MySystem", "Userid", "Password");
VPrinterOutput printerOutput = new VPrinterOutput (system);
AS400DetailsPane detailsPane = new AS400DetailsPane (printerOutput);
detailsPane.load ();
// Add the details pane to a frame.
JFrame frame = new JFrame ("My Window");
frame.getContentPane().add (detailsPane);
- See Also:
- AS400DetailsModel
-
AS400DetailsPane()
- Constructs an AS400DetailsPane object.
-
AS400DetailsPane(VNode)
- Constructs an AS400DetailsPane object.
-
addErrorListener(ErrorListener)
- Adds a listener to be notified when an error occurs.
-
addListSelectionListener(ListSelectionListener)
- Adds a listener to be notified when a list selection occurs.
-
addPropertyChangeListener(PropertyChangeListener)
- Adds a listener to be notified when the value of any
bound property changes.
-
addVetoableChangeListener(VetoableChangeListener)
- Adds a listener to be notified when the value of any
constrained property changes.
-
getActionContext()
- Returns the context in which actions will be performed.
-
getAllowActions()
- Indicates if actions can be invoked on objects.
-
getColumnModel()
- Returns the column model that is used to maintain the columns.
-
getConfirm()
- Indicates if certain actions are confirmed with the user.
-
getModel()
- Returns the model that contains data for the table.
-
getRoot()
- Returns the root, or the AS/400 resource, from which all information for the model is gathered.
-
getRowSelectionAllowed()
- Returns the indicator for whether the rows can be selected.
-
getSelectedObject()
- Returns the first selected object.
-
getSelectedObjects()
- Returns the objects which are represented by the selected rows.
-
getSelectionModel()
- Returns the selection model that is used to maintain row
selection state.
-
isSelected(VObject)
- Indicates if the object is selected.
-
load()
- Loads the information from the AS/400.
-
removeErrorListener(ErrorListener)
- Removes an error listener.
-
removeListSelectionListener(ListSelectionListener)
- Removes a list selection listener.
-
removePropertyChangeListener(PropertyChangeListener)
- Removes a property change listener.
-
removeVetoableChangeListener(VetoableChangeListener)
- Removes a vetoable change listener.
-
setAllowActions(boolean)
- Sets whether actions are allowed.
-
setConfirm(boolean)
- Sets whether certain actions are confirmed with the user.
-
setRoot(VNode)
- Sets the root, or the AS/400 resource, from which all information for the model is gathered.
-
setRowSelectionAllowed(boolean)
- Sets the indicator for whether the rows can be selected.
-
setSelectionModel(ListSelectionModel)
- Sets the selection model that is used to maintain selection
state.
-
sort(Object[], boolean[])
- Sorts the contents.The propertyIdentifer[0], orders[0] combination is used to do the sort.
AS400DetailsPane
public AS400DetailsPane()
- Constructs an AS400DetailsPane object.
AS400DetailsPane
public AS400DetailsPane(VNode root)
- Constructs an AS400DetailsPane object.
- Parameters:
- root - The root, or the AS/400 resource, from which all information for the model is gathered.
addErrorListener
public void addErrorListener(ErrorListener listener)
- Adds a listener to be notified when an error occurs.
- Parameters:
- listener - The listener.
addListSelectionListener
public void addListSelectionListener(ListSelectionListener listener)
- Adds a listener to be notified when a list selection occurs.
- Parameters:
- listener - The listener.
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
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
getActionContext
public VActionContext getActionContext()
- Returns the context in which actions will be performed.
- Returns:
- The action context.
getAllowActions
public boolean getAllowActions()
- Indicates if actions can be invoked on objects.
- Returns:
- true if a actions can be invoked; false otherwise.
getColumnModel
public TableColumnModel getColumnModel()
- Returns the column model that is used to maintain the columns.
This provides the ability to programmatically add and remove
columns.
- Returns:
- The column model.
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.
getModel
public TableModel getModel()
- Returns the model that contains data for the table.
- Returns:
- The model that contains data for the table.
getRoot
public VNode getRoot()
- Returns the root, or the AS/400 resource, from which all information for the model is gathered.
- Returns:
- The parent root, or null if none.
getRowSelectionAllowed
public boolean getRowSelectionAllowed()
- Returns the indicator for whether the rows can be selected.
- Returns:
- true if rows can be selected; false otherwise.
getSelectedObject
public VObject getSelectedObject()
- Returns the first selected object.
- Returns:
- The first selected object, or null if none are
selected.
getSelectedObjects
public VObject[] getSelectedObjects()
- Returns the objects which are represented by the selected rows.
- Returns:
- The objects which are represented by the selected rows.
getSelectionModel
public ListSelectionModel getSelectionModel()
- Returns the selection model that is used to maintain row
selection state. This provides the ability to programmatically
select and deselect objects.
- Returns:
- The selection model.
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.
load
public void load()
- Loads the information from the AS/400.
removeErrorListener
public void removeErrorListener(ErrorListener listener)
- Removes an error listener.
- Parameters:
- listener - The listener.
removeListSelectionListener
public void removeListSelectionListener(ListSelectionListener listener)
- Removes a list selection listener.
- Parameters:
- listener - The listener.
removePropertyChangeListener
public void removePropertyChangeListener(PropertyChangeListener listener)
- Removes a property change listener.
- Parameters:
- listener - The listener.
- Overrides:
- removePropertyChangeListener in class JComponent
removeVetoableChangeListener
public void removeVetoableChangeListener(VetoableChangeListener listener)
- Removes a vetoable change listener.
- Parameters:
- listener - The listener.
- Overrides:
- removeVetoableChangeListener in class JComponent
setAllowActions
public void setAllowActions(boolean allowActions)
- Sets whether actions are allowed. The following are enabled only when
actions are allowed:
- popup menu on selected object
- double clicking on a object sets the root object
The default is true.
- Parameters:
- allowActions - true if actions are allowed; false otherwise.
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.
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.
- 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.
setRowSelectionAllowed
public void setRowSelectionAllowed(boolean selectable)
- Sets the indicator for whether the rows can be selected.
- Parameters:
- selectable - The value indicating if the rows can be selected.
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.
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