|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.swing.table.AbstractTableModel
com.altair.hwm.beans.utils.HWMTableModel
public class HWMTableModel
Title: HWMTableModel
Description: A useful table model for a JTable.
Company: Altair Engineering, Inc.
| Constructor Summary | |
|---|---|
HWMTableModel(java.lang.String[] arrszHeaders)
Constructor |
|
| Method Summary | |
|---|---|
boolean |
AddRow(java.lang.Object[] arrRowData)
This method adds a row of objects to the current data. |
void |
DeleteRow(int nRow)
Deletes a row from the table |
void |
DeleteRows(int[] arrnRows)
Deletes a number of rows for the table. |
java.lang.Class |
getColumnClass(int nColIndex)
Returns the most specific superclass for all the cell values in the column. |
int |
getColumnCount()
Returns the number of columns in the model. |
java.lang.String |
getColumnName(int nColIndex)
Returns the name of the column at columnIndex. |
java.lang.Object[][] |
GetData()
Gets the table data all at once. |
int |
getRowCount()
Returns the number of rows in the model. |
java.lang.Object |
getValueAt(int nRowIndex,
int nColIndex)
Returns the value for the cell at columnIndex and rowIndex. |
void |
InsertRow(java.lang.Object[] arrobjNewData,
int nIndex)
Inserts a row at the specified index |
boolean |
isCellEditable(int nRowIndex,
int nColIndex)
Returns true if the cell at rowIndex and columnIndex is editable. |
void |
readExternal(java.io.ObjectInput objInput)
Reads the Object |
void |
SetColumnEditable(int nColIndex,
boolean bState)
Sets the editable state of the specified column. |
void |
SetData(java.lang.Object[][] arr2Data)
Allows the data to be changed all at once. |
void |
setValueAt(java.lang.Object objValue,
int nRowIndex,
int nColIndex)
Sets the value in the cell at columnIndex and rowIndex to aValue. |
void |
writeExternal(java.io.ObjectOutput objOutput)
Writes the Object |
| 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 |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public HWMTableModel(java.lang.String[] arrszHeaders)
| Method Detail |
|---|
public int getColumnCount()
getColumnCount in interface javax.swing.table.TableModel
public java.lang.Object getValueAt(int nRowIndex,
int nColIndex)
getValueAt in interface javax.swing.table.TableModelnRowIndex - -- the row whose value is to be queriednColIndex - -- the column whose value is to be queried
public int getRowCount()
getRowCount in interface javax.swing.table.TableModelpublic java.lang.String getColumnName(int nColIndex)
getColumnName in interface javax.swing.table.TableModelgetColumnName in class javax.swing.table.AbstractTableModelnColIndex - -- the index of the column
public void setValueAt(java.lang.Object objValue,
int nRowIndex,
int nColIndex)
setValueAt in interface javax.swing.table.TableModelsetValueAt in class javax.swing.table.AbstractTableModelaValue - -- the new valuenRowIndex - -- the row whose value is to be changedpublic java.lang.Class getColumnClass(int nColIndex)
getColumnClass in interface javax.swing.table.TableModelgetColumnClass in class javax.swing.table.AbstractTableModelnColIndex - - the index of the column
public boolean isCellEditable(int nRowIndex,
int nColIndex)
isCellEditable in interface javax.swing.table.TableModelisCellEditable in class javax.swing.table.AbstractTableModelnRowIndex - - the row whose value to be queriednColIndex - - the column whose value to be queried
public void SetData(java.lang.Object[][] arr2Data)
arr2Data - - the new data for the tablepublic java.lang.Object[][] GetData()
public boolean AddRow(java.lang.Object[] arrRowData)
public void InsertRow(java.lang.Object[] arrobjNewData,
int nIndex)
arrobjNewData - The new data to be insertednRow - The insertion locationpublic void DeleteRow(int nRow)
nRow - The row to deletepublic void DeleteRows(int[] arrnRows)
arrnRows - An array of indexes
public void SetColumnEditable(int nColIndex,
boolean bState)
nColIndex - The index of the columnstate - The editable state of the column
public void writeExternal(java.io.ObjectOutput objOutput)
throws java.io.IOException
writeExternal in interface java.io.ExternalizableObjectOutput - The stream to which this instance is to be written
into.
java.io.IOException
public void readExternal(java.io.ObjectInput objInput)
throws java.lang.ClassNotFoundException,
java.io.IOException
readExternal in interface java.io.ExternalizableObjectInput - The stream from which data is to be read from.
IOException, - ClassNotFoundException
java.lang.ClassNotFoundException
java.io.IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||