public class AS400DetailsModel
extends java.lang.Object
implements javax.swing.table.TableModel, java.io.Serializable
Use this class if you want to customize the graphical user interface that presents a table. If you do not need to customize the interface, then use AS400DetailsPane instead.
Most errors are reported as ErrorEvents rather than throwing exceptions. Users should listen for ErrorEvents in order to diagnose and recover from error conditions.
AS400DetailsModel objects generate the following events:
The following example creates a details model filled with details about the jobs running on a system. It then presents the table in a JTable object.
// Set up the details model and JTable. AS400 system = new AS400 ("MySystem", "Userid", "Password"); VJobList jobList = new VJobList (system); AS400DetailsModel detailsModel = new AS400DetailsModel (jobList); detailsModel.load (); JTable table = new JTable (detailsModel);
// Add the JTable to a frame. JFrame frame = new JFrame ("My Window"); frame.getContentPane().add(new JScrollPane(table));
AS400DetailsPane
,
Serialized FormConstructor and Description |
---|
AS400DetailsModel()
Deprecated.
Constructs an AS400DetailsModel object.
|
AS400DetailsModel(VNode root)
Deprecated.
Constructs an AS400DetailsModel object.
|
Modifier and Type | Method and Description |
---|---|
void |
addErrorListener(ErrorListener listener)
Deprecated.
Adds a listener to be notified when an error occurs.
|
void |
addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Deprecated.
Adds a listener to be notified when the value of any
bound property changes.
|
void |
addTableModelListener(javax.swing.event.TableModelListener listener)
Deprecated.
Adds a listener to be notified when the contents of the
table change.
|
void |
addVetoableChangeListener(java.beans.VetoableChangeListener listener)
Deprecated.
Adds a listener to be notified when the value of any
constrained property changes.
|
void |
addWorkingListener(WorkingListener listener)
Deprecated.
Adds a listener to be notified when work starts and stops
on potentially long-running operations.
|
java.lang.Class |
getColumnClass(int columnIndex)
Deprecated.
Returns the class for objects that are contained in
a column.
|
int |
getColumnCount()
Deprecated.
Returns the number of columns.
|
java.lang.String |
getColumnName(int columnIndex)
Deprecated.
Returns the name of a column.
|
VObject |
getObjectAt(int rowIndex)
Deprecated.
Returns the object at the specifed row.
|
VNode |
getRoot()
Deprecated.
Returns the root, or the system resource, from which all information for the model is gathered.
|
int |
getRowCount()
Deprecated.
Returns the number of rows in the table.
|
java.lang.Object |
getValueAt(int rowIndex,
int columnIndex)
Deprecated.
Returns the value at the specifed row and column.
|
boolean |
isCellEditable(int rowIndex,
int columnIndex)
Deprecated.
Indicates if the cell is editable.
|
void |
load()
Deprecated.
Loads the information from the system.
|
void |
removeErrorListener(ErrorListener listener)
Deprecated.
Removes an error listener.
|
void |
removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Deprecated.
Removes a property change listener.
|
void |
removeTableModelListener(javax.swing.event.TableModelListener listener)
Deprecated.
Removes a table model listener.
|
void |
removeVetoableChangeListener(java.beans.VetoableChangeListener listener)
Deprecated.
Removes a vetoable change listener.
|
void |
removeWorkingListener(WorkingListener listener)
Deprecated.
Removes a working listener.
|
void |
setRoot(VNode root)
Deprecated.
Sets the root, or the system resource, from which all information for the model is gathered.
|
void |
setValueAt(java.lang.Object value,
int rowIndex,
int columnIndex)
Deprecated.
Sets the value at the specifed row and column.
|
void |
sort(java.lang.Object[] propertyIdentifiers,
boolean[] orders)
Deprecated.
Sorts the contents.
|
public AS400DetailsModel()
public AS400DetailsModel(VNode root)
root
- The root, or the system resource, from which all information for the model is gathered.public void addErrorListener(ErrorListener listener)
listener
- The listener.public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
listener
- The listener.public void addTableModelListener(javax.swing.event.TableModelListener listener)
addTableModelListener
in interface javax.swing.table.TableModel
listener
- The listener.public void addVetoableChangeListener(java.beans.VetoableChangeListener listener)
listener
- The listener.public void addWorkingListener(WorkingListener listener)
listener
- The listener.public java.lang.Class getColumnClass(int columnIndex)
getColumnClass
in interface javax.swing.table.TableModel
columnIndex
- The column index.public int getColumnCount()
getColumnCount
in interface javax.swing.table.TableModel
public java.lang.String getColumnName(int columnIndex)
getColumnName
in interface javax.swing.table.TableModel
columnIndex
- The column index.public VObject getObjectAt(int rowIndex)
rowIndex
- The row index.public VNode getRoot()
public int getRowCount()
getRowCount
in interface javax.swing.table.TableModel
public java.lang.Object getValueAt(int rowIndex, int columnIndex)
getValueAt
in interface javax.swing.table.TableModel
rowIndex
- The row index.columnIndex
- The column index.public boolean isCellEditable(int rowIndex, int columnIndex)
isCellEditable
in interface javax.swing.table.TableModel
rowIndex
- The row index.columnIndex
- The column index.public void load()
public void removeErrorListener(ErrorListener listener)
listener
- The listener.public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
listener
- The listener.public void removeTableModelListener(javax.swing.event.TableModelListener listener)
removeTableModelListener
in interface javax.swing.table.TableModel
listener
- The listener.public void removeVetoableChangeListener(java.beans.VetoableChangeListener listener)
listener
- The listener.public void removeWorkingListener(WorkingListener listener)
listener
- The listener.public void setRoot(VNode root) throws java.beans.PropertyVetoException
root
- The root, or the system resource, from which all information for the model is gathered.java.beans.PropertyVetoException
- If the change is vetoed.public void setValueAt(java.lang.Object value, int rowIndex, int columnIndex)
setValueAt
in interface javax.swing.table.TableModel
value
- The value.rowIndex
- The row index.columnIndex
- The column index.public void sort(java.lang.Object[] propertyIdentifiers, boolean[] orders)
propertyIdentifiers
- The property identifiers. If any of
the property identifiers are null, it
indicates 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.