|
Jadex 0.96-beta1 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.swing.table.AbstractTableModel
jadex.util.jtable.ObjectTableModel
public class ObjectTableModel
The object table model has associated an object with each row.
Constructor Summary | |
---|---|
ObjectTableModel()
Create a new object table model. |
|
ObjectTableModel(String[] colnames)
Create a new object table model. |
Method Summary | |
---|---|
void |
addRow(ArrayList row,
Object object)
Add a row to the model. |
void |
addRow(Object[] row,
Object object)
Add a row to the model. |
void |
addRow(Object row,
Object object)
Add a row to the model. |
Class |
getColumnClass(int idx)
Get the class of the column. |
int |
getColumnCount()
|
String |
getColumnName(int column)
Get a column name |
Object |
getObjectForRow(int rowcnt)
Get the associated object for a row. |
int |
getRowCount()
|
Object |
getValueAt(int row,
int column)
Get the value from a field. |
void |
insertRow(int rowcnt,
List row,
Object object)
Insert a row at a position. |
void |
insertRow(int rowcnt,
Object[] row,
Object object)
Insert a row at a position. |
boolean |
isCellEditable(int rowIndex,
int columnIndex)
Returns false. |
void |
modifyData(Object val,
int rowcnt,
int columncnt)
Modify a row at a position. |
void |
removeAllRows()
Remove all rows from the model. |
void |
removeRow(int cnt)
Remove a row from the model. |
void |
removeRow(Object object)
Remove a row from the model. |
void |
setColumnClass(Class clazz,
int idx)
Set the class of the column. |
void |
setColumnEditable(boolean editable,
int col)
Set if a column is editable. |
Methods inherited from class javax.swing.table.AbstractTableModel |
---|
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, removeTableModelListener, setValueAt |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ObjectTableModel()
public ObjectTableModel(String[] colnames)
Method Detail |
---|
public void addRow(Object row, Object object)
row
- The row data.object
- The associated object.public void addRow(ArrayList row, Object object)
row
- The row data.object
- The associated object.public void addRow(Object[] row, Object object)
row
- The row data.object
- The associated object.public void insertRow(int rowcnt, Object[] row, Object object)
rowcnt
- The row cnt.row
- The row data.object
- The object.public void insertRow(int rowcnt, List row, Object object)
rowcnt
- The row cnt.row
- The row data.object
- The object.public void removeRow(Object object)
object
- The associated object.public void removeRow(int cnt)
cnt
- The row number.public void removeAllRows()
public void modifyData(Object val, int rowcnt, int columncnt)
val
- The value.rowcnt
- The row.columncnt
- The column.public Object getObjectForRow(int rowcnt)
rowcnt
- The row ccount.
public String getColumnName(int column)
getColumnName
in interface TableModel
getColumnName
in class AbstractTableModel
column
- The number of the column.
public Class getColumnClass(int idx)
getColumnClass
in interface TableModel
getColumnClass
in class AbstractTableModel
idx
- the column being queried
public void setColumnClass(Class clazz, int idx)
clazz
- The class.idx
- the column being queriedpublic void setColumnEditable(boolean editable, int col)
editable
- True, for editable.col
- The column.public boolean isCellEditable(int rowIndex, int columnIndex)
isCellEditable
in interface TableModel
isCellEditable
in class AbstractTableModel
rowIndex
- the row being queriedcolumnIndex
- the column being queried
public int getRowCount()
public int getColumnCount()
public Object getValueAt(int row, int column)
row
- The row index.column
- The column index.
|
Jadex 0.96-beta1 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright (C) 2002-2007 Lars Braubach, Alexander Pokahr - University of Hamburg. Use is subject to license terms.