|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.swing.table.AbstractTableModel com.cosylab.gui.components.table.TableModelRows com.cosylab.gui.components.table.MutableTableModelRows
public class MutableTableModelRows
MutableTableModelRows
is implementation of
TableModelRows
which acts as mutable
TabmeRowModel
in the same time. User can set this model to
JTable
and then add or remove rows directly from this model.
Field Summary |
---|
Fields inherited from class javax.swing.table.AbstractTableModel |
---|
listenerList |
Constructor Summary | |
---|---|
MutableTableModelRows()
Creates new instance. |
Method Summary | |
---|---|
void |
addRow(int index,
TableRow row)
Inserts row at the specified index. |
void |
addRow(TableRow row)
Adds row to the end of the row list. |
java.util.Comparator |
getComparator()
|
TableRow |
getRow(int index)
Returns row at given index, |
void |
removeAllRows()
Removes all rows from this model. |
TableRow |
removeRow(int index)
Removes row from this model. |
void |
removeRow(TableRow row)
Removes row from this model. |
void |
setColumnCount(int count)
Sets the number of columns this model presents. |
void |
setColumnNames(java.lang.String[] names)
Sets column names. |
void |
setComparator(java.util.Comparator comparator)
|
Methods inherited from class com.cosylab.gui.components.table.TableModelRows |
---|
getColumnCount, getColumnName, getRowCount, getRowModel, getValueAt, isCellEditable, tableChanged |
Methods inherited from class javax.swing.table.AbstractTableModel |
---|
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getColumnClass, getListeners, getTableModelListeners, removeTableModelListener, setValueAt |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MutableTableModelRows()
Method Detail |
---|
public void addRow(int index, TableRow row)
index
- the index where to insertrow
- the row to be addedpublic void addRow(TableRow row)
row
- the row to be addedpublic TableRow getRow(int index)
index
- the index of the row
public void removeAllRows()
public TableRow removeRow(int index)
index
- rowindex to be roemoved
public void removeRow(TableRow row)
row
- the row to be removedpublic void setColumnCount(int count)
count
- the number of columnspublic void setColumnNames(java.lang.String[] names)
names
- the column namespublic java.util.Comparator getComparator()
public void setComparator(java.util.Comparator comparator)
comparator
- the comparator to set
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |