com.azalient.api.file
Interface TableW

All Superinterfaces:
ITable, ITableType, Table
All Known Subinterfaces:
IMatrix, IPastableStore<I>, IStore<I>, ResultsTable, TableRW
All Known Implementing Classes:
AbstractResultsTable, AbstractTableRW, AbstractTableW, ResultsTableAdapter

public interface TableW
extends Table

An interface to a table that can be written to a page in the model file. IMplementing this interface means that the table can be queried for an array of records, and each of those records can be queried for their values in each of their fields.


Method Summary
 String columnName(Object nameObj)
          Map a column name object to a printable name.
 void finishedW(PageW page)
          The writer is finished
 CellF format(Object col, int row)
          Return the format for (column, row) cell.
 void newPage(IPage newPage)
          Move this table to a new page
 RecordW[] recordArray()
          Return an array all records.
 boolean save()
          save the table to current open file
 void save(SavingStatus ss)
          save the table to current open file
 int width(Object col)
          Set the width of a column, return -1 to get default width
 
Methods inherited from interface com.azalient.api.file.Table
destroy, headerRows, keyTypes
 
Methods inherited from interface com.azalient.api.a.tables.ITable
page, pageName
 
Methods inherited from interface com.azalient.api.a.tables.ITableType
colNameObjects, pageType, tableName
 

Method Detail

newPage

void newPage(IPage newPage)
Move this table to a new page


recordArray

RecordW[] recordArray()
Return an array all records. Each record is then queried (in sequential order) to extract the data from each field. The data in each field should be one of the primitive types described in RecordW

Returns:
An array of all records, giving access to each field

columnName

String columnName(Object nameObj)
Map a column name object to a printable name. The object may be a string and may just be the name, but this part of the interface allows you to use integers or other objects for better performance, which might be important on large pages.

Parameters:
nameObj - the column key, which may be the same as the name

format

CellF format(Object col,
             int row)
Return the format for (column, row) cell. Null means appply default format

Parameters:
col - The key specifying the column of the cell to be formatted
row - The row index for the cell to be formatted
Returns:
the cell format, which can be null

width

int width(Object col)
Set the width of a column, return -1 to get default width


finishedW

void finishedW(PageW page)
The writer is finished


save

void save(SavingStatus ss)
save the table to current open file


save

boolean save()
save the table to current open file