|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.as400.util.html.HTMLTagAttributes | +--com.ibm.as400.util.html.HTMLHeading
The HTMLHeading class represents a section heading in an HTML page.
This example creates a HTMLHeading tag:
// Create an HTMLHeading. HTMLHeading header = new HTMLHeading(1, "My Heading", HTMLConstants.CENTER); System.out.println(header);
Here is the output of the HTMLHeading tag:
<h1 align="center">My Heading</h1>
HTMLHeading objects generate the following events:
Constructor Summary | |
HTMLHeading()
Constructs a default HTMLHeading object. |
|
HTMLHeading(int level)
Constructs an HTMLHeading object with the specified heading level. |
|
HTMLHeading(int level,
java.lang.String text)
Constructs an HTMLHeading object with the specified heading level and text. |
|
HTMLHeading(int level,
java.lang.String text,
java.lang.String align)
Constructs an HTMLHeading object with the specified heading level, text, and align. |
Method Summary | |
java.lang.String |
getAlign()
Returns the alignment of the header. |
java.lang.String |
getDirection()
Returns the direction of the text interpretation. |
java.lang.String |
getLanguage()
Returns the language of the input element. |
int |
getLevel()
Returns the level of the header. |
java.lang.String |
getTag()
Returns the tag for the HTML heading. |
java.lang.String |
getText()
Returns the text of the header. |
void |
setAlign(java.lang.String align)
Sets the horizontal alignment for the header. |
void |
setDirection(java.lang.String dir)
Sets the direction of the text interpretation. |
void |
setLanguage(java.lang.String lang)
Sets the language of the input tag. |
void |
setLevel(int level)
Sets the level of the header. |
void |
setText(java.lang.String text)
Set the visible text to display in the header. |
java.lang.String |
toString()
Returns a String representation for the HTMLHeading tag. |
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 |
public HTMLHeading()
public HTMLHeading(int level)
level
- The heading level.public HTMLHeading(int level, java.lang.String text)
level
- The heading level.text
- The heading text.public HTMLHeading(int level, java.lang.String text, java.lang.String align)
level
- The heading level.text
- The heading text.align
- The heading alignment. One of the following constants
defined in HTMLConstants: LEFT, RIGHT, or CENTER.Method Detail |
public java.lang.String getAlign()
public java.lang.String getDirection()
public java.lang.String getLanguage()
public int getLevel()
public java.lang.String getText()
public java.lang.String getTag()
public void setAlign(java.lang.String align)
align
- The alignment. One of the following constants
defined in HTMLConstants: LEFT, RIGHT, or CENTER.HTMLConstants
public void setDirection(java.lang.String dir)
dir
- The direction. One of the following constants
defined in HTMLConstants: LTR or RTL.HTMLConstants
public void setLanguage(java.lang.String lang)
lang
- The language. Example language tags include:
en and en-US.public void setLevel(int level)
level
- The heading level (1 - 6).HTMLConstants
public void setText(java.lang.String text)
text
- The text.public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |