|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface StaticTableTypeInterface
Defines an interface for accessing a table's relational types. This will usually be implemented in tandem with the primary interface to tables, StaticTableInterface.
A relational or named type is an implementation defined string which serves to categorize a table element, i.e. a cell, column, or row. Elements which share a common type are considered to be related. For example, the cells in a column of numeric grades, 0 to 100, might be categorized as "pass" for grades 65 or greater and "fail" for grades less than 65.
A view can use this type information to provide type-based traffic-lighting. For example, a view can allow a user to specify that cells of type "pass" should be colored blue while cells of type "fail" should be in red.
It's possible for an element to be a member of more than one category, i.e. have multiple types. This is why the methods that return the type of a particular element, e.g. getCellType(int,int), return an array of Strings instead of just a String. Again using the grade's example, grades above 90 in addition to being members of the "pass" category could also be designated as "A"s.
If a set of types (e.g. getCellTypes()) changes, the implementation should create and send an appropriate PropertyChangeEvent to all PropertyChangeListener.
StaticTableInterface
,
StaticTableTypeStylesInterface
Method Summary | |
---|---|
java.lang.String[] |
getCellType(int rowIndex,
int colIndex)
Returns the type(s) of a cell. |
java.lang.String[] |
getCellTypes()
Returns the complete set of cell types; includes types for data cells, column labels, and row labels. |
java.lang.String[] |
getColumnLabelType(int colIndex)
Returns the type(s) of a column label. |
java.lang.String[] |
getColumnType(int colIndex)
Returns the type(s) of a column. |
java.lang.String[] |
getColumnTypes()
Returns the complete set of column types. |
java.lang.String[] |
getRowLabelType(int rowIndex)
Returns the type(s) of a row label. |
java.lang.String[] |
getRowType(int rowIndex)
Returns the type(s) of a row. |
java.lang.String[] |
getRowTypes()
Returns the complete set of row types. |
Method Detail |
---|
java.lang.String[] getCellTypes() throws com.sas.table.TableException
Use getCellType(rowIndex, colIndex)
to determine the
type for a particular cell.
Use getColumnLabelType(colIndex)
to determine the
type for a particular column label.
Use getRowLabelType(rowIndex)
to determine the
type for a particular row label.
TableException
- Thrown if the query can not be satisfied (e.g. i/o-failure).getCellType(int, int)
,
getColumnLabelType(int)
,
getRowLabelType(int)
java.lang.String[] getCellType(int rowIndex, int colIndex) throws com.sas.table.TableException
rowIndex
- A one-based index that identifies the cell's row.colIndex
- A one-based index that identifies the cell's column.
TableException
- Thrown if the query can not be satisfied (e.g. i/o-failure).getColumnLabelType(int)
,
getRowLabelType(int)
java.lang.String[] getColumnLabelType(int colIndex) throws com.sas.table.TableException
colIndex
- A one-based index that identifies the label's column.
TableException
- Thrown if the query can not be satisfied (e.g. i/o-failure).getCellType(int, int)
,
getRowLabelType(int)
java.lang.String[] getRowLabelType(int rowIndex) throws com.sas.table.TableException
rowIndex
- A one-based index that identifies the label's row.
TableException
- Thrown if the query can not be satisfied (e.g. i/o-failure).getCellType(int, int)
,
getColumnLabelType(int)
java.lang.String[] getColumnTypes() throws com.sas.table.TableException
Use getColumnType(colIndex)
to determine the
type for a particular column.
TableException
- Thrown if the query can not be satisfied (e.g. i/o-failure).getColumnType(int)
java.lang.String[] getColumnType(int colIndex) throws com.sas.table.TableException
colIndex
- A one-based index that identifies the column.
TableException
- Thrown if the query can not be satisfied (e.g. i/o-failure).java.lang.String[] getRowTypes() throws com.sas.table.TableException
Use getRowType(rowIndex)
to determine the
type for a particular row.
TableException
- Thrown if the query can not be satisfied (e.g. i/o-failure).getRowType(int)
java.lang.String[] getRowType(int rowIndex) throws com.sas.table.TableException
rowIndex
- A one-based index that identifies the row.
TableException
- Thrown if the query can not be satisfied (e.g. i/o-failure).
|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |