com.azalient.api.file
Interface PageW

All Superinterfaces:
IPage, Page

public interface PageW
extends Page

An interface to a writable page, allowing you to set fields on the page


Field Summary
 
Fields inherited from interface com.azalient.api.file.Page
TYPE_PAGE_BASE_SEP
 
Fields inherited from interface com.azalient.api.a.tables.IPage
ZERO
 
Method Summary
 BookW bookW()
          Returns a reference to the writable book to which this page belongs
 void clear()
          Clear the whole page
 boolean format(int col, int row, CellF format)
          Format the given cell with the given format, if formatting is supported.
 PageF formatter()
          Returns a reference to any formatter for this page, or null if none.
 void removeRows(int first, int last)
          Remove the given range of rows from the page, shifting later rows up
 void resizeRows(int nrows)
          Resize the page to contain the given number of rows.
 boolean set(int col, int row, Object data)
          Set the data in the given field on this page
 boolean set(int col, int row, Object data, CellF format)
          Set the data in the given field on this page
 void writeImage(int col, int row, int w, int h, File imageFile)
          Write an image to the work sheet, if that is supported.
 
Methods inherited from interface com.azalient.api.file.Page
baseName, book, columns, get, get, pageName, rows, tableBounds, tableNames
 
Methods inherited from interface com.azalient.api.a.tables.IPage
baseName, pageName, pageType
 

Method Detail

bookW

BookW bookW()
Returns a reference to the writable book to which this page belongs


set

boolean set(int col,
            int row,
            Object data)
Set the data in the given field on this page

Parameters:
col - the absolute page column number
row - the absolute page row number (not the row number in the table)
data - the data object, of a type in {String, Integer, Double, UTime, Boolean, }

set

boolean set(int col,
            int row,
            Object data,
            CellF format)
Set the data in the given field on this page

Parameters:
col - the absolute page column number
row - the absolute page row number (not the row number in the table)
data - the data object, of a type in {String, Integer, Double, UTime, Boolean, }
format - the format to be used, if the page supports formatting. XLS supports formatting, AZA and CSV do not

removeRows

void removeRows(int first,
                int last)
Remove the given range of rows from the page, shifting later rows up


clear

void clear()
Clear the whole page


formatter

PageF formatter()
Returns a reference to any formatter for this page, or null if none. XLS supports formatting, AZA and CSV do not


format

boolean format(int col,
               int row,
               CellF format)
Format the given cell with the given format, if formatting is supported.

Returns:
true if formatting was successful

writeImage

void writeImage(int col,
                int row,
                int w,
                int h,
                File imageFile)
Write an image to the work sheet, if that is supported. XLS supports images, AZA and CSV do not.

Parameters:
col - the absolute page column number
row - the absolute page row number
w - the width of the image, in pixels
h - the height of the image, in pixels
imageFile - a File pointer to the image, normally a JPEG, GIF or PNG file
Throws:
UnsupportedOperationException - if images are not supported.

resizeRows

void resizeRows(int nrows)
Resize the page to contain the given number of rows. This can be more or less than the current number.