|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--javax.swing.table.AbstractTableModel
|
+--com.zwares.base.gui.panels.ETableModel
One can extend this abstract class to implement the table model. Must be only used when using ETablePabel.
| Field Summary | |
protected java.lang.String[] |
columns
|
protected java.lang.Object[] |
data
|
protected javax.swing.JTable |
table
|
| Fields inherited from class javax.swing.table.AbstractTableModel |
listenerList |
| Constructor Summary | |
ETableModel()
Creates a new ETableModel. |
|
ETableModel(java.lang.String[] c)
Creates a new ETableModel. |
|
| Method Summary | |
void |
addRow(int index,
java.lang.Object row)
Adds a row to the table at the given index. |
void |
clearAll()
Removes all the rows. |
int |
getColumnCount()
Return the number of columns in this table. |
java.lang.String |
getColumnName(int col)
Returns the column name given the index. |
java.lang.Object |
getRow(int index)
Retruns the row at the given index. |
int |
getRowCount()
Returns the number of rows in this table. |
javax.swing.JTable |
getTable()
Returns the table that is using this model. |
java.lang.Object[] |
getTableData()
Retunrs the table data for the table. |
abstract java.lang.Object |
getValueAt(int row,
int col)
Abstract method to get value at a cell. |
void |
removeRow(int index)
Removes the row at given index. |
void |
setRowColor(int row,
java.awt.Color color)
Set the foreground color of the given row. |
void |
setTable(javax.swing.JTable t)
Sets the table that is using this model. |
void |
setTableData(java.lang.Object[] d)
Sets the table data for the table. |
| Methods inherited from class javax.swing.table.AbstractTableModel |
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getColumnClass, getListeners, getTableModelListeners, isCellEditable, removeTableModelListener, setValueAt |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected javax.swing.JTable table
protected java.lang.String[] columns
protected java.lang.Object[] data
| Constructor Detail |
public ETableModel()
public ETableModel(java.lang.String[] c)
| Method Detail |
public void setTable(javax.swing.JTable t)
public javax.swing.JTable getTable()
public void setTableData(java.lang.Object[] d)
public java.lang.Object[] getTableData()
public abstract java.lang.Object getValueAt(int row,
int col)
public int getColumnCount()
public java.lang.String getColumnName(int col)
getColumnName in interface javax.swing.table.TableModelgetColumnName in class javax.swing.table.AbstractTableModelpublic int getRowCount()
public java.lang.Object getRow(int index)
public void addRow(int index,
java.lang.Object row)
public void removeRow(int index)
public void clearAll()
public void setRowColor(int row,
java.awt.Color color)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||