com.ibm.as400.util.html
Class HTMLTableHeader

java.lang.Object
  extended by com.ibm.as400.util.html.HTMLTagAttributes
      extended by com.ibm.as400.util.html.HTMLTableCell
          extended by com.ibm.as400.util.html.HTMLTableHeader
All Implemented Interfaces:
HTMLConstants, HTMLTagElement, Serializable

public class HTMLTableHeader
extends HTMLTableCell

The HTMLTableHeader represents an HTML table header tag.

This example creates an HTMLTableHeader and displays the tag output.

  HTMLTableHeader header = new HTMLTableHeader();
  header.setHorizontalAlignment(HTMLTableHeader.CENTER);
  HTMLText headerText = new HTMLText("Customer Name");
  header.setElement(headerText);
  System.out.println(header.getTag());
  
Here is the output of the tag:
  <th align="center">Customer Name</th>
  

Calling getFOTag() produces the following tag with the default cell border and padding properties:

<fo:table-cell border-style='solid' border-width='1px' padding='1px'> <fo:block font-weight='bold'><fo:block>Customer Name</fo:block> </fo:block> </fo:table-cell>

See Also:
Serialized Form

Field Summary
Modifier and Type Field and Description
 
Fields inherited from interface com.ibm.as400.util.html.HTMLConstants
ABSBOTTOM, ABSMIDDLE, BASELINE, BOTTOM, CAPITALS, CENTER, CIRCLE, DISC, JUSTIFY, LARGE_ROMAN, LEFT, LOWER_CASE, LTR, MIDDLE, NUMBERS, RIGHT, RTL, SMALL_ROMAN, SQUARE, TARGET_BLANK, TARGET_PARENT, TARGET_SELF, TARGET_TOP, TEXTTOP, TOP
 
Constructor Summary
Constructor and Description
HTMLTableHeader()
          Constructs a default HTMLTableHeader object.
HTMLTableHeader(HTMLTagElement element)
          Constructs an HTMLTableHeader object with the specified data element.
 
Method Summary
Modifier and Type Method and Description
 String getFOTag()
          Returns the XSL-FO table header tag.
 String getFOTag(HTMLTagElement element)
          Returns the table header tag with the specified data element.
 String getTag()
          Returns the table header tag.
 String getTag(HTMLTagElement element)
          Returns the table header tag with the specified data element.
 boolean isUseFO()
          Returns if Formatting Object tags are outputted.
 void setBorderWidth(int borderWidth)
          Sets the border width in pixels.
 void setCellPadding(int cellPadding)
          Sets the global table cell padding.
 void setUseFO(boolean useFO)
          Sets if Formatting Object tags should be used.
 String toString()
          Returns the HTML table header tag.
 
Methods inherited from class com.ibm.as400.util.html.HTMLTableCell
addVetoableChangeListener, getColumnSpan, getDirection, getElement, getHeight, getHorizontalAlignment, getLanguage, getRowSpan, getVerticalAlignment, getWidth, isHeightInPercent, isWidthInPercent, isWrap, removeVetoableChangeListener, setColumnSpan, setDirection, setElement, setElement, setHeight, setHeight, setHeightInPercent, setHorizontalAlignment, setLanguage, setRowSpan, setVerticalAlignment, setWidth, setWidth, setWidthInPercent, setWrap
 
Methods inherited from class com.ibm.as400.util.html.HTMLTagAttributes
addPropertyChangeListener, getAttributes, getAttributeString, removePropertyChangeListener, setAttributes
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

HTMLTableHeader

public HTMLTableHeader()
Constructs a default HTMLTableHeader object.


HTMLTableHeader

public HTMLTableHeader(HTMLTagElement element)
Constructs an HTMLTableHeader object with the specified data element.

Parameters:
element - An HTMLTagElement object containing the data.
Method Detail

getTag

public String getTag()
Returns the table header tag.

Specified by:
getTag in interface HTMLTagElement
Overrides:
getTag in class HTMLTableCell
Returns:
The HTML tag.

getFOTag

public String getFOTag()
Returns the XSL-FO table header tag.

Specified by:
getFOTag in interface HTMLTagElement
Overrides:
getFOTag in class HTMLTableCell
Returns:
the XSL-FO tag

getFOTag

public String getFOTag(HTMLTagElement element)
Returns the table header tag with the specified data element.

Overrides:
getFOTag in class HTMLTableCell
Parameters:
element - The table cell element.
Returns:
The XSL-FO tag.

getTag

public String getTag(HTMLTagElement element)
Returns the table header tag with the specified data element.

Overrides:
getTag in class HTMLTableCell
Parameters:
element - The table cell element.
Returns:
The HTML tag.

isUseFO

public boolean isUseFO()
Returns if Formatting Object tags are outputted. The default value is false.

Overrides:
isUseFO in class HTMLTableCell
Returns:
true if the output generated is an XSL formatting object, false if the output generated is HTML.

setBorderWidth

public void setBorderWidth(int borderWidth)
Sets the border width in pixels. A value of zero indicates no border. The default value is one.

Overrides:
setBorderWidth in class HTMLTableCell
Parameters:
borderWidth - The border width.

setCellPadding

public void setCellPadding(int cellPadding)
Sets the global table cell padding. The cell padding is the spacing between data in a table cell and the border of the cell. The default value is 1

Overrides:
setCellPadding in class HTMLTableCell
Parameters:
cellPadding - The cell padding.

setUseFO

public void setUseFO(boolean useFO)
Sets if Formatting Object tags should be used. The default value is false.

Overrides:
setUseFO in class HTMLTableCell
Parameters:
useFO - - true if output generated is an XSL formatting object, false if the output generated is HTML.

toString

public String toString()
Returns the HTML table header tag.

Overrides:
toString in class HTMLTableCell
Returns:
The header tag.