de.uni_paderborn.robots.gui
Class StatisticPanel.MyTableModel
java.lang.Object
|
+--javax.swing.table.AbstractTableModel
|
+--de.uni_paderborn.robots.gui.StatisticPanel.MyTableModel
- All Implemented Interfaces:
- java.io.Serializable, javax.swing.table.TableModel
- Enclosing class:
- StatisticPanel
- class StatisticPanel.MyTableModel
- extends javax.swing.table.AbstractTableModel
inner class which creates and manages the two tables
- See Also:
- Serialized Form
|
Field Summary |
(package private) java.lang.String[] |
columnNames
array which contains the names of the columns |
(package private) java.lang.Object[][] |
data
array which contains the initial data of the table |
| Fields inherited from class javax.swing.table.AbstractTableModel |
listenerList |
|
Method Summary |
java.lang.Class |
getColumnClass(int col)
JTable uses this method to determine the default renderer
editor for each cell. |
int |
getColumnCount()
function which returns the number of columns in the table |
java.lang.String |
getColumnName(int col)
function which returns the name of a column |
int |
getRowCount()
function which returns the number of rows in the table |
java.lang.Object |
getValueAt(int row,
int col)
function which returns the reference to the table-entry |
void |
setValueAt(java.lang.Object value,
int row,
int col)
This method is called to change the data of a table |
| Methods inherited from class javax.swing.table.AbstractTableModel |
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, isCellEditable, removeTableModelListener |
| Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait |
columnNames
final java.lang.String[] columnNames
- array which contains the names of the columns
data
final java.lang.Object[][] data
- array which contains the initial data of the table
StatisticPanel.MyTableModel
StatisticPanel.MyTableModel()
getColumnCount
public int getColumnCount()
- function which returns the number of columns in the table
- Overrides:
getColumnCount in class javax.swing.table.AbstractTableModel
- Returns:
- number of columns
getRowCount
public int getRowCount()
- function which returns the number of rows in the table
- Overrides:
getRowCount in class javax.swing.table.AbstractTableModel
- Returns:
- number of rows
getColumnName
public java.lang.String getColumnName(int col)
- function which returns the name of a column
- Overrides:
getColumnName in class javax.swing.table.AbstractTableModel
- Parameters:
col - the no of the column- Returns:
- the name the column
getValueAt
public java.lang.Object getValueAt(int row,
int col)
- function which returns the reference to the table-entry
- Overrides:
getValueAt in class javax.swing.table.AbstractTableModel
- Parameters:
row - the number of the rowcol - the number of the column- Returns:
- reference to the object which contains the data
getColumnClass
public java.lang.Class getColumnClass(int col)
- JTable uses this method to determine the default renderer
editor for each cell.
- Overrides:
getColumnClass in class javax.swing.table.AbstractTableModel
- Parameters:
col - the number of the column- Returns:
- the Class of the column
setValueAt
public void setValueAt(java.lang.Object value,
int row,
int col)
- This method is called to change the data of a table
- Overrides:
setValueAt in class javax.swing.table.AbstractTableModel
- Parameters:
value - a reference to the object which should be placed in the tablerow - the row where it should be placedcol - the column where it should be placed