edu.iastate.metnet.model
Class AbbreviationRulesModel

java.lang.Object
  extended by javax.swing.table.AbstractTableModel
      extended by edu.iastate.metnet.model.AbbreviationRulesModel
All Implemented Interfaces:
java.io.Serializable, javax.swing.table.TableModel

public class AbbreviationRulesModel
extends javax.swing.table.AbstractTableModel

Table model for the entitywithcontext list table

Author:
Jie Li
See Also:
Serialized Form

Field Summary
(package private)  java.lang.String[] columnHeader
          store the list of the map, which contain the tuples (ruleid, shortterm, longterm)
(package private) static org.apache.log4j.Logger logger
           
(package private)  java.util.Vector rulevec
           
 
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
 
Constructor Summary
AbbreviationRulesModel()
           
 
Method Summary
 int getColumnCount()
          get the number of the columns of the table model
 java.lang.String getColumnName(int columnIndex)
          get the column name of the table model
 java.lang.String getLongTerm(int rowIndex)
           
 int getRowCount()
          get the total number of the entitywithcontext
 java.lang.String getShortTerm(int rowIndex)
           
 java.lang.Object getValueAt(int rowIndex, int columnIndex)
          get the value object of the specified cell
 boolean isCellEditable(int rowIndex, int columnIndex)
           
 void refresh()
           
 void setValueAt(java.lang.Object arg0, int rowIndex, int columnIndex)
           
 void updateDatabase()
           
 
Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getColumnClass, getListeners, getTableModelListeners, removeTableModelListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

static org.apache.log4j.Logger logger

columnHeader

java.lang.String[] columnHeader
store the list of the map, which contain the tuples (ruleid, shortterm, longterm)


rulevec

java.util.Vector rulevec
Constructor Detail

AbbreviationRulesModel

public AbbreviationRulesModel()
Method Detail

refresh

public void refresh()

getShortTerm

public java.lang.String getShortTerm(int rowIndex)

getLongTerm

public java.lang.String getLongTerm(int rowIndex)

updateDatabase

public void updateDatabase()

getColumnName

public java.lang.String getColumnName(int columnIndex)
get the column name of the table model

Specified by:
getColumnName in interface javax.swing.table.TableModel
Overrides:
getColumnName in class javax.swing.table.AbstractTableModel
Parameters:
columnIndex - the index of the column
Returns:
the header of the column

getRowCount

public int getRowCount()
get the total number of the entitywithcontext

Returns:
the number of the entiywithcontext

getColumnCount

public int getColumnCount()
get the number of the columns of the table model

Returns:
the number of the columns

setValueAt

public void setValueAt(java.lang.Object arg0,
                       int rowIndex,
                       int columnIndex)
Specified by:
setValueAt in interface javax.swing.table.TableModel
Overrides:
setValueAt in class javax.swing.table.AbstractTableModel

isCellEditable

public boolean isCellEditable(int rowIndex,
                              int columnIndex)
Specified by:
isCellEditable in interface javax.swing.table.TableModel
Overrides:
isCellEditable in class javax.swing.table.AbstractTableModel

getValueAt

public java.lang.Object getValueAt(int rowIndex,
                                   int columnIndex)
get the value object of the specified cell

Parameters:
rowIndex - the row index of the cell
columnIndex - the column index of the cell
Returns:
the value object in the specified cell