de.upb.swtpra05.group03.companycontrol
Class ShuttleTableModel

java.lang.Object
  extended byjavax.swing.table.AbstractTableModel
      extended byde.upb.swtpra05.group03.companycontrol.ShuttleTableModel
All Implemented Interfaces:
java.io.Serializable, javax.swing.table.TableModel

class ShuttleTableModel
extends javax.swing.table.AbstractTableModel

The Table Model for the Shuttle Table. It has 6 Columns : "ShuttleID", "Location", "Activity", "Orders","Margin", "Revenue"

Version:
$Revision: 1.3 $

Field Summary
private  java.lang.String[] columnNames
          the headers of the table columns
private  java.lang.Object[][] data
          an array for the data to be filled in the table
private  int rowCount
          counter for the number of rows
private static long serialVersionUID
          Comment for serialVersionUID
 
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
 
Constructor Summary
(package private) ShuttleTableModel()
           
 
Method Summary
 void emptyTable()
          empties the whole table
 java.lang.Class getColumnClass(int c)
          Accessor method for the class of the given column
 int getColumnCount()
          Accessor method for the number of columns of the table
 java.lang.String getColumnName(int col)
          Accessor method for the name the given column col of the table
 int getRowCount()
          Accessor method for the number of rows of the table
 java.lang.Object getValueAt(int row, int col)
          Accessor method for the content of the given table cell
 boolean isCellEditable(int row, int col)
          Don't need to implement this method unless your table's editable.
 void setData(java.lang.Object[][] data)
          This method causes the table to get filled with given data and updates the counter for the rows
 void setValueAt(java.lang.Object value, int row, int col)
          Don't need to implement this method unless your table's data can change.
 
Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, removeTableModelListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
Comment for serialVersionUID

See Also:
Constant Field Values

columnNames

private java.lang.String[] columnNames
the headers of the table columns


data

private java.lang.Object[][] data
an array for the data to be filled in the table


rowCount

private int rowCount
counter for the number of rows

Constructor Detail

ShuttleTableModel

ShuttleTableModel()
Method Detail

getColumnCount

public int getColumnCount()
Accessor method for the number of columns of the table

Returns:
the number of columns

getRowCount

public int getRowCount()
Accessor method for the number of rows of the table

Returns:
the number of rows

getColumnName

public java.lang.String getColumnName(int col)
Accessor method for the name the given column col of the table

Returns:
the name of the column

getValueAt

public java.lang.Object getValueAt(int row,
                                   int col)
Accessor method for the content of the given table cell

Returns:
the content of the cell

getColumnClass

public java.lang.Class getColumnClass(int c)
Accessor method for the class of the given column

Returns:
the class of column c

isCellEditable

public boolean isCellEditable(int row,
                              int col)
Don't need to implement this method unless your table's editable.


setData

public void setData(java.lang.Object[][] data)
This method causes the table to get filled with given data and updates the counter for the rows

Parameters:
data - the new data to be filled in the table

setValueAt

public void setValueAt(java.lang.Object value,
                       int row,
                       int col)
Don't need to implement this method unless your table's data can change.


emptyTable

public void emptyTable()
empties the whole table