|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.swing.table.AbstractTableModel
org.vizzini.ui.table.DescribedTableModel
public class DescribedTableModel
Provides a table model for a DescribedTable. Uses
TableDescriptor and ColumnDescriptor to provide behavior
to the table.
DescribedTable,
TableDescriptor,
ColumnDescriptor,
Serialized Form| Field Summary |
|---|
| Fields inherited from class javax.swing.table.AbstractTableModel |
|---|
listenerList |
| Constructor Summary | |
|---|---|
DescribedTableModel(TableDescriptor tableDescriptor)
Construct this object. |
|
| Method Summary | |
|---|---|
void |
addData(Object data)
Add the given data object. |
Class |
getColumnClass(int columnIndex)
Return the class of the given column. |
int |
getColumnCount()
Return the number of columns. |
String |
getColumnName(int columnIndex)
Return the name of the given column. |
List |
getData()
Return the collection of data. |
int |
getRowCount()
Return the number of rows. |
TableDescriptor |
getTableDescriptor()
Return the table descriptor. |
Object |
getValueAt(int rowIndex)
Return the data object in the given row. |
Object |
getValueAt(int rowIndex,
int columnIndex)
Return the object in the given cell. |
int |
indexOf(Object data)
Return the index of the given data object. |
boolean |
isCellEditable(int rowIndex,
int columnIndex)
Return true if the given cell is editable. |
boolean |
isEditMode()
Return true if this is in edit mode. |
void |
removeAll()
Remove all the data. |
void |
removeRows(int[] rows)
Remove the given rows. |
void |
setData(List data)
Set the model data. |
void |
setData(Object[] data)
Set the model data. |
void |
setEditMode(boolean isEditMode)
Set the edit mode flag. |
void |
setValueAt(Object obj,
int rowIndex,
int columnIndex)
Set the value of the given cell. |
| Methods inherited from class javax.swing.table.AbstractTableModel |
|---|
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, removeTableModelListener |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DescribedTableModel(TableDescriptor tableDescriptor)
tableDescriptor - The table descriptor.| Method Detail |
|---|
public void addData(Object data)
data - The new data to add.public Class getColumnClass(int columnIndex)
getColumnClass in interface TableModelgetColumnClass in class AbstractTableModelcolumnIndex - The index of the column of interest.public int getColumnCount()
public String getColumnName(int columnIndex)
getColumnName in interface TableModelgetColumnName in class AbstractTableModelcolumnIndex - The index of the column of interest.public List getData()
public int getRowCount()
public TableDescriptor getTableDescriptor()
public Object getValueAt(int rowIndex)
rowIndex - The index of the row of interest.
public Object getValueAt(int rowIndex,
int columnIndex)
rowIndex - The index of the row of interest.columnIndex - The index of the column of interest.public int indexOf(Object data)
data - The data object of interest.
public boolean isCellEditable(int rowIndex,
int columnIndex)
isCellEditable in interface TableModelisCellEditable in class AbstractTableModelrowIndex - The index of the row of interest.columnIndex - The index of the column of interest.public boolean isEditMode()
public void removeAll()
public void removeRows(int[] rows)
rows - The indices of the rows to remove.public void setData(List data)
data - The new model data.public void setData(Object[] data)
data - The new model data.public void setEditMode(boolean isEditMode)
public void setValueAt(Object obj,
int rowIndex,
int columnIndex)
setValueAt in interface TableModelsetValueAt in class AbstractTableModelobj - The new value.rowIndex - The index of the row of interest.columnIndex - The index of the column of interest.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
| Copyright © 2007 Vizzini.org. All Rights Reserved. | 2007.12.25.03.00.02 |