public class TableData
extends javax.swing.table.AbstractTableModel
Constructor and Description |
---|
TableData() |
Modifier and Type | Method and Description |
---|---|
void |
appendRow(java.lang.Object obj)
Appends a row to this table.
|
void |
clear()
Clear the data
|
int |
getColumnCount()
Gets the number of columns.
|
java.text.DecimalFormat |
getColumnFormat(int column)
Gets the column decimal format.
|
java.lang.String |
getColumnName(int column)
Gets the name of the specified column.
|
int |
getRowCount()
Gets the number of rows.
|
java.lang.Object |
getValueAt(int row,
int column)
Gets the value at the given cell.
|
void |
setColumnFormat(int column,
java.lang.String format)
Sets the column decimal format.
|
void |
setColumnNames(int column,
java.lang.String name)
Sets the column names in a JTable.
|
void |
setColumnVisible(int columnIndex,
boolean visible)
Method setColumnVisible
|
void |
setMaxPoints(int max)
Sets the maximum number of rows the data can hold
|
void |
setRowNumberVisible(boolean vis)
Sets the display row number flag.
|
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getColumnClass, getListeners, getTableModelListeners, isCellEditable, removeTableModelListener, setValueAt
public void setMaxPoints(int max)
public void clear()
public void appendRow(java.lang.Object obj) throws java.lang.IllegalArgumentException
obj
- Objectjava.lang.IllegalArgumentException
public void setColumnVisible(int columnIndex, boolean visible)
columnIndex
- visible
- public void setRowNumberVisible(boolean vis)
vis
- true<\code> if table display row number
public void setColumnNames(int column, java.lang.String name)
column
- the column indexname
- public void setColumnFormat(int column, java.lang.String format)
column
- the column indexformat
- the formatpublic java.text.DecimalFormat getColumnFormat(int column)
public int getColumnCount()
public java.lang.String getColumnName(int column)
getColumnName
in interface javax.swing.table.TableModel
getColumnName
in class javax.swing.table.AbstractTableModel
column
- the column indexpublic int getRowCount()
public java.lang.Object getValueAt(int row, int column)
row
- the row indexcolumn
- the column index