|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.groiss.ds.ObjectTableModel
public class ObjectTableModel
A table model implementation that allows objects as column names. This class is used for presenting tables in HTML using the TableRenderer.
| Field Summary | |
|---|---|
protected List<List<Object>> |
data
|
protected List<?> |
header
|
| Constructor Summary | |
|---|---|
ObjectTableModel()
Empty constructor. |
|
ObjectTableModel(List<?> header)
Constructor with header. |
|
ObjectTableModel(List<List<Object>> data,
List<?> header)
Constructor with data and header. |
|
| Method Summary | |
|---|---|
void |
addRow(List row)
Add a row at the bottom of tablemodel. |
void |
addTableModelListener(TableModelListener l)
This method does nothing. |
Class<?> |
getColumnClass(int c)
Get the class of the column. |
int |
getColumnCount()
Get the amount of colums of the tablemodel. |
Object |
getColumnHeader(int c)
Returns the header at column c. |
String |
getColumnName(int c)
Get the name of the Column. |
List<List<Object>> |
getData()
|
List<?> |
getHeader()
Return the header of the table model. |
int |
getRowCount()
Get amount of rows in the tablemodel. |
Object |
getValueAt(int r,
int c)
Returns the value for the cell at columnIndex and rowIndex. |
boolean |
isCellEditable(int r,
int c)
This method returns always true. |
void |
removeTableModelListener(TableModelListener l)
This method does nothing. |
void |
setHeader(List<?> header)
Set the header of the table model. |
void |
setValueAt(Object val,
int r,
int c)
Sets a cell value in the table model. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected List<?> header
protected List<List<Object>> data
| Constructor Detail |
|---|
public ObjectTableModel()
public ObjectTableModel(List<?> header)
header -
public ObjectTableModel(List<List<Object>> data,
List<?> header)
header - | Method Detail |
|---|
public int getRowCount()
getRowCount in interface TableModelpublic int getColumnCount()
getColumnCount in interface TableModelpublic String getColumnName(int c)
getColumnName in interface TableModelc - the column indexpublic Class<?> getColumnClass(int c)
getColumnClass in interface TableModel
public boolean isCellEditable(int r,
int c)
isCellEditable in interface TableModel
public Object getValueAt(int r,
int c)
getValueAt in interface TableModelr - the row indexc - the column index
public void setValueAt(Object val,
int r,
int c)
setValueAt in interface TableModelr - the row indexc - the column indexval - the objectpublic void addTableModelListener(TableModelListener l)
addTableModelListener in interface TableModelpublic void removeTableModelListener(TableModelListener l)
removeTableModelListener in interface TableModelpublic void setHeader(List<?> header)
header - a list of objectspublic void addRow(List row)
row - the new rowpublic Object getColumnHeader(int c)
c - the column index
public List<List<Object>> getData()
public List<?> getHeader()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||