com.adventnet.snmp.ui
Class BrowserDataModel

java.lang.Object
  extended by javax.swing.table.AbstractTableModel
      extended by com.adventnet.snmp.ui.BrowserDataModel
All Implemented Interfaces:
java.io.Serializable, javax.swing.table.TableModel

 class BrowserDataModel
extends javax.swing.table.AbstractTableModel

The BrowserDataModel class handles processing for SNMP traps. It implements the trap model to support the Model/View/Controller design of swing applications.

To use the trap class, instantiate, and identify the SNMP trap to be used. Then perform operations onthe trap, or register for trap change events.

This class implements the methods needed by the swing JTable.


Field Summary
(package private)  java.lang.String[] columnNames
           
 
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
 
Constructor Summary
BrowserDataModel(javax.swing.JComponent b)
          This is a contructor with a component in which the TrapBrowser Table is displayed
 
Method Summary
 void addRow(java.lang.Object[] newRow, java.awt.Image[] imagees, java.awt.Color inRowColor)
          This method is used to add trap details into tableData
 void deleteRow(int index1)
           
 int getColumnCount()
          returns the number of column in TrapBrowser
 java.lang.String getColumnName(int colIndex)
          Used to display the Column header names by TrapBrowser
 int getRowCount()
          returns the number of rows in TrapBrowser
protected  java.util.Vector getTableDataVec()
           
 java.lang.Object getValueAt(int i, int j)
          This method returns the value to be displayed in TrapBrowser JTable
 void setColumnNames(java.lang.String[] arr)
          used to set the Columns Header Names
protected  void setTableDataVec(java.util.Vector vec)
           
 
Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getColumnClass, getListeners, getTableModelListeners, isCellEditable, removeTableModelListener, setValueAt
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

columnNames

java.lang.String[] columnNames
Constructor Detail

BrowserDataModel

public BrowserDataModel(javax.swing.JComponent b)
This is a contructor with a component in which the TrapBrowser Table is displayed

Method Detail

getTableDataVec

protected java.util.Vector getTableDataVec()

setTableDataVec

protected void setTableDataVec(java.util.Vector vec)

getRowCount

public int getRowCount()
returns the number of rows in TrapBrowser


getColumnCount

public int getColumnCount()
returns the number of column in TrapBrowser


getColumnName

public java.lang.String getColumnName(int colIndex)
Used to display the Column header names by TrapBrowser

Specified by:
getColumnName in interface javax.swing.table.TableModel
Overrides:
getColumnName in class javax.swing.table.AbstractTableModel

setColumnNames

public void setColumnNames(java.lang.String[] arr)
used to set the Columns Header Names


getValueAt

public java.lang.Object getValueAt(int i,
                                   int j)
This method returns the value to be displayed in TrapBrowser JTable


addRow

public void addRow(java.lang.Object[] newRow,
                   java.awt.Image[] imagees,
                   java.awt.Color inRowColor)
This method is used to add trap details into tableData


deleteRow

public void deleteRow(int index1)