|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectat.spardat.xma.mdl.table.TableRow
Represents a row in a TableWM. The constructor must be used if a new row is to be inserted in a table. TableWM.getRow is used to retrieve a particular row, which may be updated immediately after calling getRow.
Rows become invalid if the table is modified in any way. All methods in this class will throw an IllegalStateException if a TableRow object is accessed again after the table has been modified.
| Constructor Summary | |
TableRow(ITableWM table,
int rowIndex,
java.lang.String key,
java.lang.Object[] cells,
int imageId)
Creates a new row using the provided parameters and inserts it at a given index. |
|
TableRow(ITableWM table,
java.lang.String key,
java.lang.Object[] cells,
int imageId)
Creates a new row using the provided parameters and inserts it at the end of the table. |
|
| Method Summary | |
Atom |
getCell(int colIndex)
Returns the cell at a provided column index. |
int |
getImageId()
Returns the image id if one has been set before or 0 if none has been set. |
java.lang.String |
getKey()
Returns the key or null if it has not been set yet. |
int |
getUIRowIndex()
At the client side, this TableRow has a representation in a UI library if the UI is already created. |
void |
setCell(int colIndex,
java.lang.Object value)
Sets the value of a cell from a provided object. |
void |
setCells(java.lang.Object[] values)
Sets the value of all cells of this rows from the objects provided in an array. |
void |
setImageId(int imageId)
Sets the image id of this row. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public TableRow(ITableWM table,
int rowIndex,
java.lang.String key,
java.lang.Object[] cells,
int imageId)
table - the table where the row should be inserted.rowIndex - the zero based row index. Must be greater than zero and less
than or equal to table.size().key - the key of the new row.cells - array of objects to store in the cells. The objects may be either
AtomicAttrVals (if used at the server) or a JDK object as defined in
newInstance.imageId - an id of an image that should be displayed in front of the row.
Use zero to indicate that no image should be used.
java.lang.IllegalArgumentException - if rowIndex is out of range,
the key is already in the table or cells contains
to few values.
public TableRow(ITableWM table,
java.lang.String key,
java.lang.Object[] cells,
int imageId)
table - the table where the row should be inserted.key - the key of the new row.cells - array of objects to store in the cells.imageId - an id of an image that should be displayed in front of the row.
Use zero to indicate that no image should be used.
java.lang.IllegalArgumentException - if a row with
key is already in the table or cells contains
to few values.| Method Detail |
public void setImageId(int imageId)
imageId - which identifies an image at the component level.
java.lang.IllegalStateException - if the table was modified after retrieving this row.public int getImageId()
java.lang.IllegalStateException - if the table was modified after retrieving this row.public Atom getCell(int colIndex)
colIndex - zero based column index
java.lang.IllegalArgumentException - if colIndex invalid
java.lang.IllegalStateException - if the table was modified after retrieving this row.
public void setCell(int colIndex,
java.lang.Object value)
colIndex - zero based index of the columnvalue - the value to set. May be either an AtomicAttrVal
(if used at the server) or a JDK object as defined in
newInstance.
If value is null, the cell is reset.
java.lang.IllegalArgumentException - if value is of unsupported
type or colIndex is invalid.
java.lang.IllegalStateException - if the table was modified after retrieving this row.public void setCells(java.lang.Object[] values)
values - array of objects. The length of the array must be
equal to the number of columns in the table.
java.lang.IllegalArgumentException - if value is of unsupported
type or the length of values is less than the
number of columns.
java.lang.IllegalStateException - if the table was modified after retrieving this row.public java.lang.String getKey()
java.lang.IllegalStateException - if the table was modified after retrieving this row.public int getUIRowIndex()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||