eu.keep.uphec.emulatorpackages
Class EmulatorsTableModel

Object
  extended by javax.swing.table.AbstractTableModel
      extended by EmulatorsTableModel
All Implemented Interfaces:
Serializable, javax.swing.table.TableModel

public class EmulatorsTableModel
extends javax.swing.table.AbstractTableModel

The EmulatorsTableModel class is responsible for specifying the methods that EmulatorTable in the ExternalEmulatorListDialog and in the InternalEmulatorListDialog will use to interrogate a tabular data model

Author:
Antonio Ciuffreda
See Also:
Serialized Form

Field Summary
 
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
 
Constructor Summary
EmulatorsTableModel(Object[][] content, int rows)
          Default constructor for EmulatorsTableModel
 
Method Summary
 Class getColumnClass(int column)
          This method returns the class type of a specific column in EmulatorTable
 int getColumnCount()
          This method returns the number of existing columns in EmulatorTable
 String getColumnName(int column)
          This method provides the title of each column in EmulatorTable
 int getRowCount()
          This method returns the number of existing rows in EmulatorTable
 Object getValueAt(int row, int column)
          This method returns the value of a specific cell in EmulatorTable
 boolean isCellEditable(int row, int col)
          This method defines the editability of each cell in EmulatorTable
 void setValueAt(Object aValue, int row, int column)
          This method enables to set the value in a specific cell in EmulatorTable
 
Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, removeTableModelListener
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EmulatorsTableModel

public EmulatorsTableModel(Object[][] content,
                           int rows)
Default constructor for EmulatorsTableModel

Parameters:
content - instance of 2D Object Array
cols - instance of int
Method Detail

getColumnCount

public int getColumnCount()
This method returns the number of existing columns in EmulatorTable


getRowCount

public int getRowCount()
This method returns the number of existing rows in EmulatorTable


isCellEditable

public boolean isCellEditable(int row,
                              int col)
This method defines the editability of each cell in EmulatorTable

Specified by:
isCellEditable in interface javax.swing.table.TableModel
Overrides:
isCellEditable in class javax.swing.table.AbstractTableModel
Parameters:
row - instance of int
col - instance of int

getColumnName

public String getColumnName(int column)
This method provides the title of each column in EmulatorTable

Specified by:
getColumnName in interface javax.swing.table.TableModel
Overrides:
getColumnName in class javax.swing.table.AbstractTableModel
Parameters:
column - instance of int

getValueAt

public Object getValueAt(int row,
                         int column)
This method returns the value of a specific cell in EmulatorTable

Parameters:
row - instance of int
column - instance of int

getColumnClass

public Class getColumnClass(int column)
This method returns the class type of a specific column in EmulatorTable

Specified by:
getColumnClass in interface javax.swing.table.TableModel
Overrides:
getColumnClass in class javax.swing.table.AbstractTableModel
Parameters:
column - instance of int

setValueAt

public void setValueAt(Object aValue,
                       int row,
                       int column)
This method enables to set the value in a specific cell in EmulatorTable

Specified by:
setValueAt in interface javax.swing.table.TableModel
Overrides:
setValueAt in class javax.swing.table.AbstractTableModel
Parameters:
aValue - instance of Object
row - instance of int
column - instance of int