public class HTMLTableHeader extends HTMLTableCell
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>
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 and Description |
---|
HTMLTableHeader()
Constructs a default HTMLTableHeader object.
|
HTMLTableHeader(HTMLTagElement element)
Constructs an HTMLTableHeader object with the specified data element.
|
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.
|
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
addPropertyChangeListener, getAttributes, getAttributeString, removePropertyChangeListener, setAttributes
public HTMLTableHeader()
public HTMLTableHeader(HTMLTagElement element)
element
- An HTMLTagElement object containing the data.public java.lang.String getTag()
getTag
in interface HTMLTagElement
getTag
in class HTMLTableCell
public java.lang.String getFOTag()
getFOTag
in interface HTMLTagElement
getFOTag
in class HTMLTableCell
public java.lang.String getFOTag(HTMLTagElement element)
getFOTag
in class HTMLTableCell
element
- The table cell element.public java.lang.String getTag(HTMLTagElement element)
getTag
in class HTMLTableCell
element
- The table cell element.public boolean isUseFO()
isUseFO
in class HTMLTableCell
public void setBorderWidth(int borderWidth)
setBorderWidth
in class HTMLTableCell
borderWidth
- The border width.public void setCellPadding(int cellPadding)
setCellPadding
in class HTMLTableCell
cellPadding
- The cell padding.public void setUseFO(boolean useFO)
setUseFO
in class HTMLTableCell
useFO
- - true if output generated is an XSL formatting object, false if the output generated is HTML.public java.lang.String toString()
toString
in class HTMLTableCell