Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  

sosc::ExcelSheet Class Reference

List of all members.

Public Methods

 ExcelSheet (String sheetName, String title) throws Exception
void setXY (int width, int height)
void render (OutputStream out) throws Exception
void setTitle (String title) throws Exception
void autofit () throws Exception
void bold () throws Exception
void bold (String range) throws Exception
void font (String font, int size, String range) throws Exception
void printCell (Object o) throws Exception
int drawTable (String tableName, List rows, String startxy) throws Exception
int drawTable (String tableName, List rows, String startxy, boolean first) throws Exception
int drawTable (String tableName, ResultSet r, String startxy) throws SQLException,Exception
int drawTable (String tableName, ResultSet r, String startxy, boolean sum, int firstNumericRow) throws SQLException,Exception
String nextRow ()
String nextColumn ()
void close () throws Exception
void openManual (String name) throws Exception
void openManual () throws Exception
void closeManual () throws Exception
void select (String range) throws Exception
void format (String range, String format) throws Exception
void writeCell (String cell, String data) throws Exception
void writeRange (String cell, String data) throws Exception
String toRange (int row, int column)
void rawWrite (String command) throws Exception
int[] getStart ()
int[] getEnd ()

Public Attributes

String width = "99%"
String height = "500px"
String fontName = "Verdana"
String fontSize = "8"

Static Public Attributes

final int COLUMN = 0
final int ROW = 1

Private Attributes

int columns = 0
StringWriter sw = new StringWriter()
PrintWriter pw = new PrintWriter(sw)
String sheetName = ""
Random random = new Random()
List items = new ArrayList()
int xy [] = new int [2]
int start [] = new int [2]
int end [] = new int [2]
boolean rawWrite = false

Constructor & Destructor Documentation

sosc::ExcelSheet::ExcelSheet String    sheetName,
String    title
throws Exception [inline]
 

basic constructor.

Definition at line 58 of file ExcelSheet.java.

References sosc::ExcelSheet::setTitle(), and sosc::ExcelSheet::sheetName.


Member Function Documentation

void sosc::ExcelSheet::autofit   throws Exception [inline]
 

Definition at line 101 of file ExcelSheet.java.

References sosc::ExcelSheet::pw, and sosc::ExcelSheet::sheetName.

Referenced by sosc::ExcelSheet::drawTable().

void sosc::ExcelSheet::bold String    range throws Exception [inline]
 

Bolds the current line.

Definition at line 115 of file ExcelSheet.java.

References sosc::ExcelSheet::pw, and sosc::ExcelSheet::sheetName.

void sosc::ExcelSheet::bold   throws Exception [inline]
 

Bolds the current line.

Definition at line 108 of file ExcelSheet.java.

References sosc::ExcelSheet::pw, sosc::ExcelSheet::ROW, sosc::ExcelSheet::sheetName, and sosc::ExcelSheet::xy.

Referenced by sosc::ExcelSheet::drawTable().

void sosc::ExcelSheet::close   throws Exception [inline]
 

Definition at line 266 of file ExcelSheet.java.

References sosc::ExcelSheet::pw.

Referenced by sosc::ExcelSheet::drawTable().

void sosc::ExcelSheet::closeManual   throws Exception [inline]
 

Ends a manual write.

Definition at line 295 of file ExcelSheet.java.

References sosc::ExcelSheet::pw, and sosc::ExcelSheet::rawWrite.

Referenced by sosc::ExcelSheet::rawWrite(), and sosc::ExcelSheet::writeCell().

int sosc::ExcelSheet::drawTable String    tableName,
ResultSet    r,
String    startxy,
boolean    sum,
int    firstNumericRow
throws SQLException,Exception [inline]
 

Definition at line 184 of file ExcelSheet.java.

References sosc::ExcelSheet::autofit(), sosc::ExcelSheet::COLUMN, sosc::ExcelSheet::columns, sosc::ExcelSheet::fontName, sosc::ExcelSheet::fontSize, sosc::ExcelSheet::items, sosc::ExcelSheet::nextColumn(), sosc::ExcelSheet::nextRow(), sosc::ExcelSheet::pw, sosc::ExcelSheet::ROW, sosc::ExcelSheet::sheetName, sosc::ExcelSheet::start, and sosc::ExcelSheet::xy.

int sosc::ExcelSheet::drawTable String    tableName,
ResultSet    r,
String    startxy
throws SQLException,Exception [inline]
 

Draw a table with the given name using the given result set, starting at the specified coordinates. Draws a simple table todo: Column heads and excel data typing ie. get excel to set the range of the column to date, or currency. SUMMATIONS get excel to sum a column CUSTID linking, provide hyperlinks into the Commorx system

Definition at line 181 of file ExcelSheet.java.

References sosc::ExcelSheet::drawTable().

int sosc::ExcelSheet::drawTable String    tableName,
List    rows,
String    startxy,
boolean    first
throws Exception [inline]
 

Definition at line 143 of file ExcelSheet.java.

References sosc::ExcelSheet::autofit(), sosc::ExcelSheet::bold(), sosc::ExcelSheet::close(), sosc::ExcelSheet::COLUMN, sosc::ExcelSheet::fontName, sosc::ExcelSheet::fontSize, sosc::ExcelSheet::items, sosc::ExcelSheet::nextColumn(), sosc::ExcelSheet::nextRow(), sosc::ExcelSheet::printCell(), sosc::ExcelSheet::pw, sosc::ExcelSheet::ROW, sosc::ExcelSheet::sheetName, sosc::ExcelSheet::start, and sosc::ExcelSheet::xy.

int sosc::ExcelSheet::drawTable String    tableName,
List    rows,
String    startxy
throws Exception [inline]
 

Java-centric version. uses arrays of arrays.

Definition at line 139 of file ExcelSheet.java.

Referenced by sosc::ExcelSheet::drawTable().

void sosc::ExcelSheet::font String    font,
int    size,
String    range
throws Exception [inline]
 

Bolds the current line.

Definition at line 122 of file ExcelSheet.java.

References sosc::ExcelSheet::font(), sosc::ExcelSheet::pw, and sosc::ExcelSheet::sheetName.

Referenced by sosc::ExcelSheet::font().

void sosc::ExcelSheet::format String    range,
String    format
throws Exception [inline]
 

Writes a format style to a range.

Definition at line 320 of file ExcelSheet.java.

References sosc::ExcelSheet::format(), and sosc::ExcelSheet::rawWrite.

Referenced by sosc::ExcelSheet::format().

int [] sosc::ExcelSheet::getEnd   [inline]
 

Definition at line 386 of file ExcelSheet.java.

References sosc::ExcelSheet::end.

int [] sosc::ExcelSheet::getStart   [inline]
 

Definition at line 381 of file ExcelSheet.java.

References sosc::ExcelSheet::start.

String sosc::ExcelSheet::nextColumn   [inline]
 

Definition at line 259 of file ExcelSheet.java.

References sosc::ExcelSheet::COLUMN, sosc::ExcelSheet::ROW, and sosc::ExcelSheet::xy.

Referenced by sosc::ExcelSheet::drawTable(), and sosc::ExcelSheet::printCell().

String sosc::ExcelSheet::nextRow   [inline]
 

Definition at line 253 of file ExcelSheet.java.

References sosc::ExcelSheet::COLUMN, sosc::ExcelSheet::ROW, sosc::ExcelSheet::start, and sosc::ExcelSheet::xy.

Referenced by sosc::ExcelSheet::drawTable().

void sosc::ExcelSheet::openManual   throws Exception [inline]
 

Starts a manual write.

Definition at line 281 of file ExcelSheet.java.

References sosc::ExcelSheet::items, sosc::ExcelSheet::pw, sosc::ExcelSheet::random, and sosc::ExcelSheet::rawWrite.

Referenced by sosc::ExcelSheet::openManual(), sosc::ExcelSheet::rawWrite(), and sosc::ExcelSheet::writeCell().

void sosc::ExcelSheet::openManual String    name throws Exception [inline]
 

For backwards compatibility. Just a wrapper to openManual()

Definition at line 274 of file ExcelSheet.java.

References sosc::ExcelSheet::openManual().

void sosc::ExcelSheet::printCell Object    o throws Exception [inline]
 

Prints formatted data to the current cell.

Definition at line 131 of file ExcelSheet.java.

References sosc::ExcelSheet::nextColumn(), sosc::ExcelSheet::pw, and sosc::ExcelSheet::sheetName.

Referenced by sosc::ExcelSheet::drawTable().

void sosc::ExcelSheet::rawWrite String    command throws Exception [inline]
 

Definition at line 370 of file ExcelSheet.java.

References sosc::ExcelSheet::closeManual(), sosc::ExcelSheet::openManual(), sosc::ExcelSheet::pw, sosc::ExcelSheet::rawWrite, and sosc::ExcelSheet::sheetName.

void sosc::ExcelSheet::render OutputStream    out throws Exception [inline]
 

Draw the biatch onto the webbrowser.

Definition at line 75 of file ExcelSheet.java.

References sosc::ExcelSheet::height, sosc::ExcelSheet::items, sosc::ExcelSheet::sheetName, sosc::ExcelSheet::sw, and sosc::ExcelSheet::width.

void sosc::ExcelSheet::select String    range throws Exception [inline]
 

Simple selection.

Definition at line 313 of file ExcelSheet.java.

References sosc::ExcelSheet::rawWrite.

void sosc::ExcelSheet::setTitle String    title throws Exception [inline]
 

Definition at line 95 of file ExcelSheet.java.

References sosc::ExcelSheet::rawWrite.

Referenced by sosc::ExcelSheet::ExcelSheet().

void sosc::ExcelSheet::setXY int    width,
int    height
[inline]
 

Set the width, as a percent of the screen, and the height in pixels , of course, this only works before you render the screen object.

Definition at line 67 of file ExcelSheet.java.

References sosc::ExcelSheet::height, and sosc::ExcelSheet::width.

String sosc::ExcelSheet::toRange int    row,
int    column
[inline]
 

Definition at line 363 of file ExcelSheet.java.

void sosc::ExcelSheet::writeCell String    cell,
String    data
throws Exception [inline]
 

Writes to a single Cell. This could be more elegent. Two ways to do this. test.ActiveSheet.Cells(46,3).Value = "=sum(C36:C40)" test.ActiveSheet.Range("D46").Value = "=sum(C36:C40)"

Definition at line 332 of file ExcelSheet.java.

References sosc::ExcelSheet::closeManual(), sosc::ExcelSheet::openManual(), sosc::ExcelSheet::pw, sosc::ExcelSheet::rawWrite, and sosc::ExcelSheet::sheetName.

void sosc::ExcelSheet::writeRange String    cell,
String    data
throws Exception [inline]
 

Writes to a single range. This could be more elegent. Two ways to do this. test.ActiveSheet.Cells(46,3).Value = "=sum(C36:C40)" test.ActiveSheet.Range("D46").Value = "=sum(C36:C40)"

Definition at line 360 of file ExcelSheet.java.

References sosc::ExcelSheet::pw, and sosc::ExcelSheet::sheetName.


Member Data Documentation

final int sosc::ExcelSheet::COLUMN = 0 [static]
 

Definition at line 32 of file ExcelSheet.java.

Referenced by sosc::ExcelSheet::drawTable(), sosc::ExcelSheet::nextColumn(), and sosc::ExcelSheet::nextRow().

int sosc::ExcelSheet::columns = 0 [private]
 

Definition at line 35 of file ExcelSheet.java.

Referenced by sosc::ExcelSheet::drawTable().

int sosc::ExcelSheet::end[] = new int [2] [private]
 

Definition at line 46 of file ExcelSheet.java.

Referenced by sosc::ExcelSheet::getEnd().

String sosc::ExcelSheet::fontName = "Verdana"
 

Definition at line 50 of file ExcelSheet.java.

Referenced by sosc::ExcelSheet::drawTable().

String sosc::ExcelSheet::fontSize = "8"
 

Definition at line 51 of file ExcelSheet.java.

Referenced by sosc::ExcelSheet::drawTable().

String sosc::ExcelSheet::height = "500px"
 

Definition at line 49 of file ExcelSheet.java.

Referenced by sosc::ExcelSheet::render(), and sosc::ExcelSheet::setXY().

List sosc::ExcelSheet::items = new ArrayList() [private]
 

Definition at line 40 of file ExcelSheet.java.

Referenced by sosc::ExcelSheet::drawTable(), sosc::ExcelSheet::openManual(), and sosc::ExcelSheet::render().

PrintWriter sosc::ExcelSheet::pw = new PrintWriter(sw) [private]
 

Definition at line 37 of file ExcelSheet.java.

Referenced by sosc::ExcelSheet::autofit(), sosc::ExcelSheet::bold(), sosc::ExcelSheet::close(), sosc::ExcelSheet::closeManual(), sosc::ExcelSheet::drawTable(), sosc::ExcelSheet::font(), sosc::ExcelSheet::openManual(), sosc::ExcelSheet::printCell(), sosc::ExcelSheet::rawWrite(), sosc::ExcelSheet::writeCell(), and sosc::ExcelSheet::writeRange().

Random sosc::ExcelSheet::random = new Random() [private]
 

Definition at line 39 of file ExcelSheet.java.

Referenced by sosc::ExcelSheet::openManual().

boolean sosc::ExcelSheet::rawWrite = false [private]
 

Definition at line 53 of file ExcelSheet.java.

Referenced by sosc::ExcelSheet::closeManual(), sosc::ExcelSheet::format(), sosc::ExcelSheet::openManual(), sosc::ExcelSheet::rawWrite(), sosc::ExcelSheet::select(), sosc::ExcelSheet::setTitle(), and sosc::ExcelSheet::writeCell().

final int sosc::ExcelSheet::ROW = 1 [static]
 

Definition at line 33 of file ExcelSheet.java.

Referenced by sosc::ExcelSheet::bold(), sosc::ExcelSheet::drawTable(), sosc::ExcelSheet::nextColumn(), and sosc::ExcelSheet::nextRow().

String sosc::ExcelSheet::sheetName = "" [private]
 

Definition at line 38 of file ExcelSheet.java.

Referenced by sosc::ExcelSheet::autofit(), sosc::ExcelSheet::bold(), sosc::ExcelSheet::drawTable(), sosc::ExcelSheet::ExcelSheet(), sosc::ExcelSheet::font(), sosc::ExcelSheet::printCell(), sosc::ExcelSheet::rawWrite(), sosc::ExcelSheet::render(), sosc::ExcelSheet::writeCell(), and sosc::ExcelSheet::writeRange().

int sosc::ExcelSheet::start[] = new int [2] [private]
 

Definition at line 45 of file ExcelSheet.java.

Referenced by sosc::ExcelSheet::drawTable(), sosc::ExcelSheet::getStart(), and sosc::ExcelSheet::nextRow().

StringWriter sosc::ExcelSheet::sw = new StringWriter() [private]
 

Definition at line 36 of file ExcelSheet.java.

Referenced by sosc::ExcelSheet::render().

String sosc::ExcelSheet::width = "99%"
 

Definition at line 48 of file ExcelSheet.java.

Referenced by sosc::ExcelSheet::render(), and sosc::ExcelSheet::setXY().

int sosc::ExcelSheet::xy[] = new int [2] [private]
 

Definition at line 44 of file ExcelSheet.java.

Referenced by sosc::ExcelSheet::bold(), sosc::ExcelSheet::drawTable(), sosc::ExcelSheet::nextColumn(), and sosc::ExcelSheet::nextRow().


The documentation for this class was generated from the following file:
Generated on Mon Jul 14 17:19:22 2003 for SOSC by doxygen1.2.15