com.ibm.commerce.pa.widget
Class TableElement

java.lang.Object
  |
  +--com.ibm.commerce.pa.widget.TableElement

public class TableElement
extends java.lang.Object

This class represents a single cell in a table.


Field Summary
protected  java.lang.String align
           
protected  java.lang.String bgColor
           
protected  java.lang.String font
           
protected  java.lang.String height
           
protected  java.lang.String htmlBetween
           
protected  java.lang.String width
           
 
Constructor Summary
TableElement()
          TableElement constructor.
 
Method Summary
 java.lang.String getAlign()
          This method returns the cell alignment
 java.lang.String getAlignString()
          This method returns the cell alignment with the html "align=" prepended or an empty string "" if none was specified.
 java.lang.String getBgColor()
          This method returns the cell background color
 java.lang.String getBgColorString()
          This method returns the cell background color with the html "bgcolor=" prepended or an empty string "" if none was specified.
 java.lang.String getFont()
          This method just returns the cell font.
 java.lang.String getHeight()
          This method returns the cell height
 java.lang.String getHeightString()
          This method returns the cell height with the html "height=" prepended or an empty string "" if none was specified.
 java.lang.String getHtmlBetween()
          This method returns any other html text to be included in the table element tag or "" if none is specified.
 java.lang.String getWidth()
          This method returns the cell width.
 java.lang.String getWidthString()
          This method returns the cell width with the html "width=" prepended or an empty string "" if none was specified.
 java.lang.String render(java.lang.String data)
          This method will render the parameter data as an element in a table.
 java.lang.String renderElementBegin()
          This method will render the beginning tag for the element.
 java.lang.String renderElementEnd()
          This method will render the ending tag for the element.
 void setAlign(java.lang.String newValue)
          Set the alignment to use for the element.
 void setBgColor(java.lang.String newValue)
          Set the background color to use for the element.
 void setFont(java.lang.String newValue)
          Set the font to use for the element.
 void setHeight(java.lang.String newValue)
          Set the height of the element.
 void setHtmlBetween(java.lang.String newValue)
          Set any additional html to go inside the table element tag.
 void setWidth(java.lang.String newValue)
          Set the width of the element.
 java.lang.String wrapWithFont(java.lang.String data)
          This method returns the cell font wrapped around the data or just the data if no font was specified.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

align

protected java.lang.String align

bgColor

protected java.lang.String bgColor

font

protected java.lang.String font

height

protected java.lang.String height

htmlBetween

protected java.lang.String htmlBetween

width

protected java.lang.String width
Constructor Detail

TableElement

public TableElement()
TableElement constructor.
Method Detail

getAlign

public java.lang.String getAlign()
This method returns the cell alignment
Returns:
java.lang.String the string left|right|center

getAlignString

public java.lang.String getAlignString()
This method returns the cell alignment with the html "align=" prepended or an empty string "" if none was specified.
Returns:
java.lang.String the string align=left|right|center

getBgColor

public java.lang.String getBgColor()
This method returns the cell background color
Returns:
java.lang.String the background color

getBgColorString

public java.lang.String getBgColorString()
This method returns the cell background color with the html "bgcolor=" prepended or an empty string "" if none was specified.
Returns:
java.lang.String the string bgcolor=#rrggbb

getFont

public java.lang.String getFont()
This method just returns the cell font. You need to add the ending </font> after your data.
Returns:
java.lang.String the cell font as specified on the bean call
See Also:
wrapWithCellFont

getHeight

public java.lang.String getHeight()
This method returns the cell height
Returns:
java.lang.String

getHeightString

public java.lang.String getHeightString()
This method returns the cell height with the html "height=" prepended or an empty string "" if none was specified.
Returns:
java.lang.String

getHtmlBetween

public java.lang.String getHtmlBetween()
This method returns any other html text to be included in the table element tag or "" if none is specified.
Returns:
java.lang.String

getWidth

public java.lang.String getWidth()
This method returns the cell width.
Returns:
java.lang.String the width of a cell

getWidthString

public java.lang.String getWidthString()
This method returns the cell width with the html "width=" prepended or an empty string "" if none was specified.
Returns:
java.lang.String the width of a cell

render

public java.lang.String render(java.lang.String data)
This method will render the parameter data as an element in a table.

renderElementBegin

public java.lang.String renderElementBegin()
This method will render the beginning tag for the element.

renderElementEnd

public java.lang.String renderElementEnd()
This method will render the ending tag for the element.

setAlign

public void setAlign(java.lang.String newValue)
Set the alignment to use for the element.
Parameters:
newValue - java.lang.String

setBgColor

public void setBgColor(java.lang.String newValue)
Set the background color to use for the element.
Parameters:
newValue - java.lang.String

setFont

public void setFont(java.lang.String newValue)
Set the font to use for the element.
Parameters:
newValue - java.lang.String

setHeight

public void setHeight(java.lang.String newValue)
Set the height of the element.
Parameters:
newValue - java.lang.String

setHtmlBetween

public void setHtmlBetween(java.lang.String newValue)
Set any additional html to go inside the table element tag.
Parameters:
newValue - java.lang.String

setWidth

public void setWidth(java.lang.String newValue)
Set the width of the element.
Parameters:
newValue - java.lang.String

wrapWithFont

public java.lang.String wrapWithFont(java.lang.String data)
This method returns the cell font wrapped around the data or just the data if no font was specified. This assumes the font is a valid <font ...> tag and will automatically add the ending </font> tag for you.
Returns:
java.lang.String the string < ...>data</font>