com.f1j.ss
Class HTMLWriter

java.lang.Object
  |
  +--com.actuate.util.Debug
        |
        +--com.f1j.util.Debug
              |
              +--com.f1j.util.ObjConst
                    |
                    +--com.f1j.util.Obj
                          |
                          +--com.f1j.ss.HTMLWriter

public class HTMLWriter
extends com.f1j.util.Obj

This class provides API for writing data in a workbook range to an HTML Table.


Field Summary
static int ALIGN_TAG
          Output the data with table ALIGN tags.
static int ALL
          Output the data with all tags.
static int BGCOLOR_TAG
          Output the data with table BGCOLOR tags.
static int BORDER_TAG
          Output the data with table borders turned on.
static int COLSPAN_TAG
          Output the data with table COLSPAN tags.
static int DEFAULT
          The default flag setting.
static int FONT_TAG
          Output the data with table FONT tags.
static int HEIGHT_TAG
          Output the data with table HEIGHT tags.
static int NONE
          Output the data with no formatting.
static int VALIGN_TAG
          Output the data with table VALIGN tags.
static int VALUE_FORMATS
          Output the data with value formatting.
static int WIDTH_TAG
          Output the data with table WIDTH tags.
 
Method Summary
 int getFlags()
          Returns the different flags indicating what TAGS are in use and how data is displayed.
 void setFlags(int flags)
          Sets the different flags indicating what TAGS to use and how data is displayed.
 void write(Book book, int iSheet1, int iRow1, int iCol1, int iSheet2, int iRow2, int iCol2, java.io.Writer writer)
          Writes the specified range to an HTML table.
 void write(Book book, java.io.Writer writer)
          Writes the entire workbook to an HTML table.
 

Field Detail

NONE

public static final int NONE
Output the data with no formatting.

VALUE_FORMATS

public static final int VALUE_FORMATS
Output the data with value formatting.

BORDER_TAG

public static final int BORDER_TAG
Output the data with table borders turned on.

HEIGHT_TAG

public static final int HEIGHT_TAG
Output the data with table HEIGHT tags.

WIDTH_TAG

public static final int WIDTH_TAG
Output the data with table WIDTH tags.

BGCOLOR_TAG

public static final int BGCOLOR_TAG
Output the data with table BGCOLOR tags.

FONT_TAG

public static final int FONT_TAG
Output the data with table FONT tags.

COLSPAN_TAG

public static final int COLSPAN_TAG
Output the data with table COLSPAN tags.

ALIGN_TAG

public static final int ALIGN_TAG
Output the data with table ALIGN tags.

VALIGN_TAG

public static final int VALIGN_TAG
Output the data with table VALIGN tags.

ALL

public static final int ALL
Output the data with all tags. Includes all of the tags listed in this class. See table at setFlags.

DEFAULT

public static final int DEFAULT
The default flag setting. It outputs the data with all of the tags except for BORDER_TAG.
Method Detail

write

public void write(Book book,
                  java.io.Writer writer)
           throws F1Exception,
                  java.io.IOException
Writes the entire workbook to an HTML table.

Parameters:
book - the Book that contains the data to output.
writer - a Java Writer class object to output the range to.
Throws:
F1Exception - if a parameter is invalid
java.io.IOException if an IO error occurs
See Also:
setFlags(int)

write

public void write(Book book,
                  int iSheet1,
                  int iRow1,
                  int iCol1,
                  int iSheet2,
                  int iRow2,
                  int iCol2,
                  java.io.Writer writer)
           throws F1Exception,
                  java.io.IOException
Writes the specified range to an HTML table.

Parameters:
view - The View that contains the range of data you wish to output.
sheet1 - The starting sheet to output from.
row1 - The starting row to output from.
col1 - The starting column to output from.
sheet2 - The ending sheet to output from.
row2 - The ending row to output from.
col2 - The ending column to output from.
writer - a Java Writer class object to output the range to.
Throws:
F1Exception - if a parameter is invalid
java.io.IOException if an IO error occurs
See Also:
setFlags(int)

setFlags

public void setFlags(int flags)
Sets the different flags indicating what TAGS to use and how data is displayed.

Parameters:
flags - Combination of the following flags:
NONE No tags or value formatting.
VALUE_FORMATS Outputs cell values with value formats.
BORDER_TAG Turns on table border.
HEIGHT_TAG Uses the HTML HEIGHT tag to set row heights.
WIDTH_TAG Uses the HTML WIDTH tag to set the column widths.
BGCOLOR_TAG Uses the HTML BGCOLOR tag to set the background color of the cells.
FONT_TAG Uses the HTML FONT tag to set the font attributes.
COLSPAN_TAG Uses the HTML COLSPAN tag to display data that overlap cells.
ALIGN_TAG Uses the HTML ALIGN tag to set the horizontal alignment.
VALIGN_TAG Uses the HTML VALIGN tag to set the vertical alignment.
ALL (DEFAULT) Applies all flags.
See Also:
getFlags()

getFlags

public int getFlags()
Returns the different flags indicating what TAGS are in use and how data is displayed.
Returns:
an int indicating the TAGS. See table at setFlags.
See Also:
setFlags(int)