|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
com.sas.swing.models.TableModelInsertRowSupport
public class TableModelInsertRowSupport
The TableModelInsertRowSupport aids implementors of InsertRowInterface with inserting a row into a table. The TableModelInsertRowSupport creates an uncommitted (fake) row until the row is actually committed into the table.
Constructor Summary | |
---|---|
TableModelInsertRowSupport()
Constructor |
Method Summary | |
---|---|
void |
cancelUncommittedRow(javax.swing.table.TableModel model)
Removes the "fake" row from the model, effectively performing a cancel. |
java.lang.Object[] |
commitUncommittedRow(javax.swing.table.TableModel model)
Commits the data in the row to the underlying model. |
int |
getAdjustedRowNumber(int row)
Takes a row number (from the viewers perspective) and adjusts it based on whether a "fake" row had been added without being committed or cancelled. |
static java.lang.Object[] |
getDefaultRowValues(javax.swing.table.TableModel model)
Gets the default values of a row as an object array for a given TableModel based upon a new instance of each column's class or null if the class is java.lang.Object . |
int |
getUncommittedRowNumber()
Returns the index of the uncommitted row. |
java.lang.Object |
getValueAt(int columnIndex)
Returns the value for the cell of the uncomitted row at columnIndex. |
void |
insertUncommittedRow(javax.swing.table.TableModel model,
int row)
Adds a "fake" row to the table model at the specified location. |
boolean |
isUncommittedRowPresent()
Indicates whether an uncommitted row exists. |
void |
setValueAt(java.lang.Object value,
int columnIndex)
Sets the value in the cell of the uncommitted row at columnIndex to value. |
Constructor Detail |
---|
public TableModelInsertRowSupport()
Method Detail |
---|
public void insertUncommittedRow(javax.swing.table.TableModel model, int row) throws com.sas.util.UncheckedException
row
- The row to add the "fake" row before.
com.sas.util.UncheckedException
- Provides a catch-all for all Exceptions.public java.lang.Object[] commitUncommittedRow(javax.swing.table.TableModel model) throws com.sas.util.UncheckedException
com.sas.util.UncheckedException
public void cancelUncommittedRow(javax.swing.table.TableModel model) throws com.sas.util.UncheckedException
com.sas.util.UncheckedException
public boolean isUncommittedRowPresent()
public int getUncommittedRowNumber()
public java.lang.Object getValueAt(int columnIndex)
columnIndex
- the column whose value is to be queried
public void setValueAt(java.lang.Object value, int columnIndex)
value
- the new valuecolumnIndex
- the column whose value is to be changedpublic int getAdjustedRowNumber(int row)
public static java.lang.Object[] getDefaultRowValues(javax.swing.table.TableModel model)
java.lang.Object
.
model
- the TableModel to get the column's classes from
|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |