com.ibm.as400.util.html
Class HTMLTableHeader
- java.lang.Object
-
- com.ibm.as400.util.html.HTMLTagAttributes
-
- com.ibm.as400.util.html.HTMLTableCell
-
- com.ibm.as400.util.html.HTMLTableHeader
-
- All Implemented Interfaces:
- HTMLConstants, HTMLTagElement, java.io.Serializable
public class HTMLTableHeader extends HTMLTableCell
The HTMLTableHeader represents an HTML table header tag.This example creates an HTMLTableHeader and displays the tag output.
Here is the output of the tag:HTMLTableHeader header = new HTMLTableHeader(); header.setHorizontalAlignment(HTMLTableHeader.CENTER); HTMLText headerText = new HTMLText("Customer Name"); header.setElement(headerText); System.out.println(header.getTag());
<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
-
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
Constructors Constructor and Description HTMLTableHeader()
Constructs a default HTMLTableHeader object.HTMLTableHeader(HTMLTagElement element)
Constructs an HTMLTableHeader object with the specified data element.
-
Method Summary
Methods Modifier and Type Method and Description java.lang.String
getFOTag()
Returns the XSL-FO table header tag.java.lang.String
getFOTag(HTMLTagElement element)
Returns the table header tag with the specified data element.java.lang.String
getTag()
Returns the table header tag.java.lang.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.java.lang.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
-
-
-
-
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 java.lang.String getTag()
Returns the table header tag.- Specified by:
getTag
in interfaceHTMLTagElement
- Overrides:
getTag
in classHTMLTableCell
- Returns:
- The HTML tag.
-
getFOTag
public java.lang.String getFOTag()
Returns the XSL-FO table header tag.- Specified by:
getFOTag
in interfaceHTMLTagElement
- Overrides:
getFOTag
in classHTMLTableCell
- Returns:
- the XSL-FO tag
-
getFOTag
public java.lang.String getFOTag(HTMLTagElement element)
Returns the table header tag with the specified data element.- Overrides:
getFOTag
in classHTMLTableCell
- Parameters:
element
- The table cell element.- Returns:
- The XSL-FO tag.
-
getTag
public java.lang.String getTag(HTMLTagElement element)
Returns the table header tag with the specified data element.- Overrides:
getTag
in classHTMLTableCell
- 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 classHTMLTableCell
- 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 classHTMLTableCell
- 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 classHTMLTableCell
- 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 classHTMLTableCell
- Parameters:
useFO
- - true if output generated is an XSL formatting object, false if the output generated is HTML.
-
toString
public java.lang.String toString()
Returns the HTML table header tag.- Overrides:
toString
in classHTMLTableCell
- Returns:
- The header tag.
-
-