|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.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 java.util.List<java.util.List<java.lang.Object>> |
data
|
protected java.util.List<?> |
header
|
Constructor Summary | |
---|---|
ObjectTableModel()
Empty constructor. |
|
ObjectTableModel(java.util.List<?> header)
Constructor with header. |
|
ObjectTableModel(java.util.List<java.util.List<java.lang.Object>> data,
java.util.List<?> header)
Constructor with data and header. |
Method Summary | |
---|---|
void |
addRow(java.util.List row)
Add a row at the bottom of tablemodel. |
void |
addTableModelListener(javax.swing.event.TableModelListener l)
This method does nothing. |
java.lang.Class<?> |
getColumnClass(int c)
Get the class of the column. |
int |
getColumnCount()
Get the amount of colums of the tablemodel. |
java.lang.Object |
getColumnHeader(int c)
Returns the header at column c. |
java.lang.String |
getColumnName(int c)
Get the name of the Column. |
java.util.List<java.util.List<java.lang.Object>> |
getData()
|
java.util.List<?> |
getHeader()
Return the header of the table model. |
int |
getRowCount()
Get amount of rows in the tablemodel. |
java.lang.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(javax.swing.event.TableModelListener l)
This method does nothing. |
void |
setHeader(java.util.List<?> header)
Set the header of the table model. |
void |
setValueAt(java.lang.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 java.util.List<?> header
protected java.util.List<java.util.List<java.lang.Object>> data
Constructor Detail |
---|
public ObjectTableModel()
public ObjectTableModel(java.util.List<?> header)
header
- public ObjectTableModel(java.util.List<java.util.List<java.lang.Object>> data, java.util.List<?> header)
header
- Method Detail |
---|
public int getRowCount()
getRowCount
in interface javax.swing.table.TableModel
public int getColumnCount()
getColumnCount
in interface javax.swing.table.TableModel
public java.lang.String getColumnName(int c)
getColumnName
in interface javax.swing.table.TableModel
c
- the column indexpublic java.lang.Class<?> getColumnClass(int c)
getColumnClass
in interface javax.swing.table.TableModel
public boolean isCellEditable(int r, int c)
isCellEditable
in interface javax.swing.table.TableModel
public java.lang.Object getValueAt(int r, int c)
getValueAt
in interface javax.swing.table.TableModel
r
- the row indexc
- the column indexpublic void setValueAt(java.lang.Object val, int r, int c)
setValueAt
in interface javax.swing.table.TableModel
r
- the row indexc
- the column indexval
- the objectpublic void addTableModelListener(javax.swing.event.TableModelListener l)
addTableModelListener
in interface javax.swing.table.TableModel
public void removeTableModelListener(javax.swing.event.TableModelListener l)
removeTableModelListener
in interface javax.swing.table.TableModel
public void setHeader(java.util.List<?> header)
header
- a list of objectspublic void addRow(java.util.List row)
row
- the new rowpublic java.lang.Object getColumnHeader(int c)
c
- the column index
public java.util.List<java.util.List<java.lang.Object>> getData()
public java.util.List<?> getHeader()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |