StarTable
public class BeanStarTable extends RandomStarTable
Constructor | Description |
---|---|
BeanStarTable(java.lang.Class clazz) |
Constructs a new table which will hold beans which are all instances
of a given class.
|
Modifier and Type | Method | Description |
---|---|---|
java.lang.Object |
getCell(long irow,
int icol) |
The AbstractStarTable implementation of this method throws an
UnsupportedOperationException, since unless otherwise
provided there is no random access.
|
int |
getColumnCount() |
Returns the number of columns in this table.
|
ColumnInfo |
getColumnInfo(int icol) |
Returns the object describing the data in a given column.
|
java.lang.String[] |
getColumnProperties() |
Returns an array of the property names which correspond to the
columns of this table.
|
java.lang.Object[] |
getData() |
Returns the array of objects which this model displays, one per row.
|
long |
getRowCount() |
The number of rows in this table.
|
void |
setColumnInfo(java.lang.String name,
ValueInfo info) |
Resets the metadata for a column representing a property with a
given name.
|
void |
setColumnProperties(java.lang.String[] propNames) |
Fixes the columns which are to be used for this table.
|
void |
setData(java.lang.Object[] data) |
Populates this model with items.
|
checkedLongToInt, getColumnAuxDataInfos, getName, getParameterByName, getParameters, getRow, getURL, setName, setParameter, setParameters, setURL
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getRowSequence, isRandom
public BeanStarTable(java.lang.Class clazz) throws java.beans.IntrospectionException
clazz
- class of which all beans held by this table are membersjava.beans.IntrospectionException
public void setData(java.lang.Object[] data)
data
- array of items, one for each row. This array's
runtime type must match that for which this model was
constructed (on pain of ClassCastException)public java.lang.Object[] getData()
public long getRowCount()
RandomStarTable
getRowCount
in interface StarTable
getRowCount
in class RandomStarTable
public int getColumnCount()
StarTable
getColumnCount
in interface StarTable
getColumnCount
in class AbstractStarTable
public ColumnInfo getColumnInfo(int icol)
StarTable
getColumnInfo
in interface StarTable
getColumnInfo
in class AbstractStarTable
icol
- the column for which header information is requiredpublic void setColumnInfo(java.lang.String name, ValueInfo info)
name
- property's programmatic nameinfo
- new column metadatapublic java.lang.String[] getColumnProperties()
public void setColumnProperties(java.lang.String[] propNames)
propNames
is an array of the programmatic names of
each of the properties of this bean which is used to get a column
value.propNames
- array of programmatic names of properties
to be used as columnspublic java.lang.Object getCell(long irow, int icol) throws java.io.IOException
AbstractStarTable
getCell
in interface StarTable
getCell
in class AbstractStarTable
irow
- the index of the cell's rowicol
- the index of the cell's columnjava.io.IOException
- if there is an error reading the dataCopyright © 2018 Central Laboratory of the Research Councils. All Rights Reserved.