com.ibm.as400.vaccess

Class AS400DetailsModel

  • java.lang.Object
    • com.ibm.as400.vaccess.AS400DetailsModel
  • All Implemented Interfaces:
    java.io.Serializable, javax.swing.table.TableModel

    Deprecated. 
    Use Java Swing instead, along with the classes in package com.ibm.as400.access

    public class AS400DetailsModel
    extends java.lang.Object
    implements javax.swing.table.TableModel, java.io.Serializable
    The AS400DetailsModel class implements an underlying model for a table, where all information for the model is gathered from the contents of a system resource, known as the root. You must explicitly call load() to load the information from the system.

    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:

    • ErrorEvent
    • PropertyChangeEvent
    • TableModelEvent
    • WorkingEvent

    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));
    See Also:
    AS400DetailsPane, Serialized Form
    • Constructor Summary

      Constructors 
      Constructor and Description
      AS400DetailsModel()
      Deprecated. 
      Constructs an AS400DetailsModel object.
      AS400DetailsModel(VNode root)
      Deprecated. 
      Constructs an AS400DetailsModel object.
    • Method Summary

      Methods 
      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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • AS400DetailsModel

        public AS400DetailsModel()
        Deprecated. 
        Constructs an AS400DetailsModel object.
      • AS400DetailsModel

        public AS400DetailsModel(VNode root)
        Deprecated. 
        Constructs an AS400DetailsModel object.
        Parameters:
        root - The root, or the system resource, from which all information for the model is gathered.
    >
    • Method Detail

      • addErrorListener

        public void addErrorListener(ErrorListener listener)
        Deprecated. 
        Adds a listener to be notified when an error occurs.
        Parameters:
        listener - The listener.
      • addPropertyChangeListener

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

        public void addTableModelListener(javax.swing.event.TableModelListener listener)
        Deprecated. 
        Adds a listener to be notified when the contents of the table change.
        Specified by:
        addTableModelListener in interface javax.swing.table.TableModel
        Parameters:
        listener - The listener.
      • addVetoableChangeListener

        public void addVetoableChangeListener(java.beans.VetoableChangeListener listener)
        Deprecated. 
        Adds a listener to be notified when the value of any constrained property changes.
        Parameters:
        listener - The listener.
      • addWorkingListener

        public void addWorkingListener(WorkingListener listener)
        Deprecated. 
        Adds a listener to be notified when work starts and stops on potentially long-running operations.
        Parameters:
        listener - The listener.
      • getColumnClass

        public java.lang.Class getColumnClass(int columnIndex)
        Deprecated. 
        Returns the class for objects that are contained in a column.
        Specified by:
        getColumnClass in interface javax.swing.table.TableModel
        Parameters:
        columnIndex - The column index.
        Returns:
        The column class. It will be null if the column index is not valid or the root has not been set.
      • getColumnCount

        public int getColumnCount()
        Deprecated. 
        Returns the number of columns.
        Specified by:
        getColumnCount in interface javax.swing.table.TableModel
        Returns:
        The number of columns. This will be 0 if the root has not been set.
      • getColumnName

        public java.lang.String getColumnName(int columnIndex)
        Deprecated. 
        Returns the name of a column.
        Specified by:
        getColumnName in interface javax.swing.table.TableModel
        Parameters:
        columnIndex - The column index.
        Returns:
        The column name. It will be null if the column index is not valid or the root has not been set.
      • getObjectAt

        public VObject getObjectAt(int rowIndex)
        Deprecated. 
        Returns the object at the specifed row.
        Parameters:
        rowIndex - The row index.
        Returns:
        The object at the specified row. It will be null if the index is not valid or the root has not been set.
      • getRoot

        public VNode getRoot()
        Deprecated. 
        Returns the root, or the system resource, from which all information for the model is gathered.
        Returns:
        The root, or the system resource, from which all information for the model is gathered. It will be null if none has been set.
      • getRowCount

        public int getRowCount()
        Deprecated. 
        Returns the number of rows in the table.
        Specified by:
        getRowCount in interface javax.swing.table.TableModel
        Returns:
        The number of rows in the table, or 0 if the root has not been set.
      • getValueAt

        public java.lang.Object getValueAt(int rowIndex,
                                  int columnIndex)
        Deprecated. 
        Returns the value at the specifed row and column.
        Specified by:
        getValueAt in interface javax.swing.table.TableModel
        Parameters:
        rowIndex - The row index.
        columnIndex - The column index.
        Returns:
        The value at the specified row and column. It will be null if the column index is not valid or the root has not been set.
      • isCellEditable

        public boolean isCellEditable(int rowIndex,
                             int columnIndex)
        Deprecated. 
        Indicates if the cell is editable.
        Specified by:
        isCellEditable in interface javax.swing.table.TableModel
        Parameters:
        rowIndex - The row index.
        columnIndex - The column index.
        Returns:
        true if the cell is editable; false if the cell is not editable, the index is not valid, or the root has not been set.
      • load

        public void load()
        Deprecated. 
        Loads the information from the system.
      • removeErrorListener

        public void removeErrorListener(ErrorListener listener)
        Deprecated. 
        Removes an error listener.
        Parameters:
        listener - The listener.
      • removePropertyChangeListener

        public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
        Deprecated. 
        Removes a property change listener.
        Parameters:
        listener - The listener.
      • removeTableModelListener

        public void removeTableModelListener(javax.swing.event.TableModelListener listener)
        Deprecated. 
        Removes a table model listener.
        Specified by:
        removeTableModelListener in interface javax.swing.table.TableModel
        Parameters:
        listener - The listener.
      • removeVetoableChangeListener

        public void removeVetoableChangeListener(java.beans.VetoableChangeListener listener)
        Deprecated. 
        Removes a vetoable change listener.
        Parameters:
        listener - The listener.
      • removeWorkingListener

        public void removeWorkingListener(WorkingListener listener)
        Deprecated. 
        Removes a working listener.
        Parameters:
        listener - The listener.
      • setRoot

        public void setRoot(VNode root)
                     throws java.beans.PropertyVetoException
        Deprecated. 
        Sets the root, or the system 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 system resource, from which all information for the model is gathered.
        Throws:
        java.beans.PropertyVetoException - If the change is vetoed.
      • setValueAt

        public void setValueAt(java.lang.Object value,
                      int rowIndex,
                      int columnIndex)
        Deprecated. 
        Sets the value at the specifed row and column. This method has no effect, the value will not change.
        Specified by:
        setValueAt in interface javax.swing.table.TableModel
        Parameters:
        value - The value.
        rowIndex - The row index.
        columnIndex - The column index.
      • sort

        public void sort(java.lang.Object[] propertyIdentifiers,
                boolean[] orders)
        Deprecated. 
        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 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.