Expresso 5-6

com.jcorporate.expresso.services.html
Class Table

java.lang.Object
  extended bycom.jcorporate.expresso.services.html.HtmlElement
      extended bycom.jcorporate.expresso.services.html.Table

public class Table
extends HtmlElement

Version:
$Revision: 1.9 $ $Date: 2004/11/17 20:48:18 $
Author:
Michael Nash

Field Summary
 
Fields inherited from class com.jcorporate.expresso.services.html.HtmlElement
attributes, contents, cSSClass, cSSID
 
Constructor Summary
Table()
          Constructor
Table(String newName)
          Constructor
 
Method Summary
 void add(HtmlElement newElement)
          Add a new element to this table.
 void addHeading(String heading)
          A shortcut method to quickly add a heading row to a table
protected  void display(PrintWriter out, int depth)
          Display the table
 void setAlignment(String newAlignment)
           
 void setBorder(int newBorder)
           
 void setCaption(String newCaption)
          Set a caption for the entire table
 void setCellPadding(int newPadding)
           
 void setCellSpacing(int newSpacing)
           
 void setTitle(String newTitleString)
          Set a special title string
 void setVerticalAlignment(String newAlignment)
          Set the veritical aligment of this table
 void setWidth(String newWidth)
           
 
Methods inherited from class com.jcorporate.expresso.services.html.HtmlElement
display, finalize, getAttribute, getContentCount, getCSSClass, getName, padWithTabs, setAttribute, setCSSClass, setCSSID, setDisplayed, setName, setParent
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Table

public Table()
      throws HtmlException
Constructor


Table

public Table(String newName)
      throws HtmlException
Constructor

Parameters:
newName - name of the table
Method Detail

add

public void add(HtmlElement newElement)
         throws HtmlException
Add a new element to this table.

Overrides:
add in class HtmlElement
Parameters:
newElement - The new row to be added to the table
Throws:
HtmlException - If the new element is invalid or not a Row

addHeading

public void addHeading(String heading)
                throws HtmlException
A shortcut method to quickly add a heading row to a table

Parameters:
heading - A pipe-delimited string giving the labels for the headings
Throws:
HtmlException

display

protected void display(PrintWriter out,
                       int depth)
                throws HtmlException
Display the table

Specified by:
display in class HtmlElement
Parameters:
out - output stream
depth - the number of tabs to indent
Throws:
HtmlException - If the element (or it's contents) cannot be displayed

setAlignment

public void setAlignment(String newAlignment)
                  throws HtmlException
Parameters:
newAlignment - left|right|center
Throws:
HtmlException

setBorder

public void setBorder(int newBorder)
               throws HtmlException
Parameters:
newBorder - border size
Throws:
HtmlException

setCaption

public void setCaption(String newCaption)
Set a caption for the entire table

Parameters:
newCaption - The caption to be set

setCellPadding

public void setCellPadding(int newPadding)
                    throws HtmlException
Parameters:
newPadding - padding size
Throws:
HtmlException

setCellSpacing

public void setCellSpacing(int newSpacing)
                    throws HtmlException
Parameters:
newSpacing - cell spacing size
Throws:
HtmlException

setTitle

public void setTitle(String newTitleString)
              throws HtmlException
Set a special title string

Parameters:
newTitleString - A "|"-delimited list of column headings
Throws:
HtmlException - If the title cannot be used

setVerticalAlignment

public void setVerticalAlignment(String newAlignment)
                          throws HtmlException
Set the veritical aligment of this table

Parameters:
newAlignment - New alignment value: Top, bottom or center
Throws:
HtmlException - If the alignment is invalid

setWidth

public void setWidth(String newWidth)
Parameters:
newWidth - width of the table

Expresso 5-6

Please see www.jcorporate.com for information about new Expresso releases.