Expresso 5-5-0

com.jcorporate.expresso.services.html
Class Cell

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

public class Cell
extends HtmlElement

Cell - The Cell of an HTML table

Version:
$Revision: 1.7 $ $Date: 2004/03/06 11:14:58 $
Author:
Michael P. Nash

Field Summary
 
Fields inherited from class com.jcorporate.expresso.services.html.HtmlElement
attributes, contents, cSSClass, cSSID
 
Constructor Summary
Cell()
          Constructor
Cell(HtmlElement newElement)
          Constructor Create a cell with the given element as it's contents
Cell(String contentText)
          Constructor with text contents for the new cell Create a new cell with the given text as its contents
 
Method Summary
protected  void display(PrintWriter out, int depth)
          Display the Cell
 void setAlignment(String newAlignment)
          Set the horizontal alignment of the contents of this cell
 void setBGColor(String newColor)
          Set the background color of the cell
 void setBorder(int newBorder)
          Set the border for this cell
 void setCellSpacing(int newSpacing)
          Set the cell spacing of this individual cell
 void setColSpan(int newSpan)
          Set how many columns in the table this cell spans.
 void setFGColor(String newColor)
          Set the foreground color of the cell
 void setHeaderCell(boolean state)
          Set the cell to be a header cell
 void setNoWrap(boolean newWrap)
          Tell this cell whether or not to wrap it's contents
 void setRowSpan(int newSpan)
          Set how many rows this Cell spans.
 void setVerticalAlignment(String newAlignment)
          Set the vertical alignment of the contents of the cell
 void setWidth(String newWidth)
           
 
Methods inherited from class com.jcorporate.expresso.services.html.HtmlElement
add, 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

Cell

public Cell()
     throws HtmlException
Constructor

Throws:
HtmlException - If the super constructor fails

Cell

public Cell(HtmlElement newElement)
     throws HtmlException
Constructor Create a cell with the given element as it's contents

Parameters:
newElement - Another HTML element to appear in the cell
Throws:
HtmlException - If the parameter is invalid

Cell

public Cell(String contentText)
     throws HtmlException
Constructor with text contents for the new cell Create a new cell with the given text as its contents

Parameters:
contentText - The text string which becomes the contents of this new cell
Throws:
HtmlException - If the parameter is invalid
Method Detail

display

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

Specified by:
display in class HtmlElement
Parameters:
out - PrintWriter to the client
depth - the number of tabs to indent
Throws:
HtmlException - If an error occurs displaying the cell or it's contents

setAlignment

public void setAlignment(String newAlignment)
                  throws HtmlException
Set the horizontal alignment of the contents of this cell

Parameters:
newAlignment - New alignment as a string. Must be "left", "right" or "center"
Throws:
HtmlException - If the parameter is invalid

setBGColor

public void setBGColor(String newColor)
                throws HtmlException
Set the background color of the cell

Parameters:
newColor - Color to set the background of this cell
Throws:
HtmlException - If the parameter is invalid

setBorder

public void setBorder(int newBorder)
               throws HtmlException
Set the border for this cell

Parameters:
newBorder - New Border value for this Cell
Throws:
HtmlException - If the parameter is invalid

setCellSpacing

public void setCellSpacing(int newSpacing)
                    throws HtmlException
Set the cell spacing of this individual cell

Parameters:
newSpacing - The new spacing for this cell
Throws:
HtmlException - If the parameter is invalid

setColSpan

public void setColSpan(int newSpan)
                throws HtmlException
Set how many columns in the table this cell spans. Default is 0

Parameters:
newSpan - Number of columns to span
Throws:
HtmlException - If the parameter is invalid

setFGColor

public void setFGColor(String newColor)
                throws HtmlException
Set the foreground color of the cell

Parameters:
newColor - Color to set the foreground of this cell
Throws:
HtmlException - If the parameter is invalid

setHeaderCell

public void setHeaderCell(boolean state)
Set the cell to be a header cell

Parameters:
state - set to true if header

setNoWrap

public void setNoWrap(boolean newWrap)
               throws HtmlException
Tell this cell whether or not to wrap it's contents

Parameters:
newWrap - True to wrap contents, else false
Throws:
HtmlException - If the parameter is invalid

setRowSpan

public void setRowSpan(int newSpan)
                throws HtmlException
Set how many rows this Cell spans. Default 0

Parameters:
newSpan - Number of rows to span
Throws:
HtmlException - If the parameter is invalid

setVerticalAlignment

public void setVerticalAlignment(String newAlignment)
                          throws HtmlException
Set the vertical alignment of the contents of the cell

Parameters:
newAlignment - Vertical alignment value
Throws:
HtmlException - If the parameter is invalid

setWidth

public void setWidth(String newWidth)
              throws HtmlException
Parameters:
newWidth - The width of the cell
Throws:
HtmlException

Expresso 5-5-0

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