Algernon Software

org.algernon.app.j2p
Class AdviceTable

java.lang.Object
  extended byjavax.swing.table.AbstractTableModel
      extended byjavax.swing.table.DefaultTableModel
          extended byorg.algernon.app.j2p.AdviceTable
All Implemented Interfaces:
Serializable, TableModel

public class AdviceTable
extends DefaultTableModel
implements TableModel

AdviceTable stores information about slots and serves as the Data Model for displaying them in a JTable.

See Also:
Serialized Form

Field Summary
(package private) static int DEFAULT_ROWS
           
private  Advice f_advice
           
private  Java2Protege f_app
           
private  Vector f_columnNames
           
 
Fields inherited from class javax.swing.table.DefaultTableModel
columnIdentifiers, dataVector
 
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
 
Constructor Summary
AdviceTable(Java2Protege app, Object[] columnNames)
           
 
Method Summary
 void addAdvice(String command, String type, String framename, String replacement)
           
 void deleteAdvice(String command, String type, String framename, String replacement)
           
 Advice getAdvice()
           
 Vector getValueAt(int row)
          Returns an attribute Vector for the cell at row.
 boolean isCellEditable(int row, int col)
           
 void setAdviceFile(String adviceFile)
           
 
Methods inherited from class javax.swing.table.DefaultTableModel
addColumn, addColumn, addColumn, addRow, addRow, convertToVector, convertToVector, getColumnCount, getColumnName, getDataVector, getRowCount, getValueAt, insertRow, insertRow, moveRow, newDataAvailable, newRowsAdded, removeRow, rowsRemoved, setColumnCount, setColumnIdentifiers, setColumnIdentifiers, setDataVector, setDataVector, setNumRows, setRowCount, setValueAt
 
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
 
Methods inherited from interface javax.swing.table.TableModel
addTableModelListener, getColumnClass, getColumnCount, getColumnName, getRowCount, getValueAt, removeTableModelListener, setValueAt
 

Field Detail

DEFAULT_ROWS

static int DEFAULT_ROWS

f_app

private Java2Protege f_app

f_advice

private Advice f_advice

f_columnNames

private Vector f_columnNames
Constructor Detail

AdviceTable

public AdviceTable(Java2Protege app,
                   Object[] columnNames)
Method Detail

isCellEditable

public boolean isCellEditable(int row,
                              int col)
Specified by:
isCellEditable in interface TableModel

getValueAt

public Vector getValueAt(int row)
Returns an attribute Vector for the cell at row.

Parameters:
row - the row whose value is to be queried
Returns:
the set of values in the row at the specified cell.
Throws:
ArrayIndexOutOfBoundsException - if an invalid row or column was given

addAdvice

public void addAdvice(String command,
                      String type,
                      String framename,
                      String replacement)

deleteAdvice

public void deleteAdvice(String command,
                         String type,
                         String framename,
                         String replacement)

setAdviceFile

public void setAdviceFile(String adviceFile)

getAdvice

public Advice getAdvice()

Algernon Software