|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.as400.util.html.HTMLTableCaption
The HTMLTableCaption class represents an HTML Caption tag.
This example creates an HTMLTableCaption object with an HTMLText object for the caption element.
// Create an HTMLText object for the caption text. HTMLText captionText = new HTMLText("MY TABLE"); // Create the HTMLTableCaption object with the new HTMLText object. HTMLTableCaption caption = new HTMLTableCaption(captionText); // Display the tag. System.out.println(caption.getTag());
Here is the output of the tag:
<caption>MY TABLE</caption>
This example creates an HTMLTableCaption object with an HTMLHyperlink object for the caption element.
// Create an HTMLHyperlink object for the caption text. HTMLHyperlink companyLink = new HTMLHyperlink("http://www.myCompany.com", "My Company"); // Create the HTMLTableCaption object with the new HTMLHyperlink object. HTMLTableCaption caption = new HTMLTableCaption(companyLink); caption.setAlignment(HTMLConstants.BOTTOM); // Display the tag. System.out.println(caption.getTag());
Here is the output of the tag:
<caption align="bottom"><a href="http://www.myCompany.com>My Company"</a></caption>
HTMLTableCaption objects generate the following events:
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 | |
HTMLTableCaption()
Constructs a default HTMLTableCaption object. |
|
HTMLTableCaption(HTMLTagElement element)
Constructs an HTMLTableCaption object with the specified element. |
Method Summary | |
void |
addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Adds a PropertyChangeListener. |
void |
addVetoableChangeListener(java.beans.VetoableChangeListener listener)
Adds the VetoableChangeListener. |
java.lang.String |
getAlignment()
Returns the caption alignment relative to the table. |
java.lang.String |
getDirection()
Returns the direction of the text interpretation. |
HTMLTagElement |
getElement()
Returns the element for the caption. |
java.lang.String |
getLanguage()
Returns the language of the caption. |
java.lang.String |
getTag()
Returns the HTML caption tag. |
void |
removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Removes the PropertyChangeListener from the internal list. |
void |
removeVetoableChangeListener(java.beans.VetoableChangeListener listener)
Removes the VetoableChangeListener from the internal list. |
void |
setAlignment(java.lang.String alignment)
Sets the caption alignment relative to the table. |
void |
setDirection(java.lang.String dir)
Sets the direction of the text interpretation. |
void |
setElement(HTMLTagElement element)
Sets the element for the caption. |
void |
setElement(java.lang.String text)
Sets the specified text for the caption. |
void |
setLanguage(java.lang.String lang)
Sets the language of the caption. |
java.lang.String |
toString()
Returns the HTML caption tag. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Constructor Detail |
public HTMLTableCaption()
public HTMLTableCaption(HTMLTagElement element)
element
- An HTMLTagElement object.Method Detail |
public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
listener
- The PropertyChangeListener.removePropertyChangeListener(java.beans.PropertyChangeListener)
public void addVetoableChangeListener(java.beans.VetoableChangeListener listener)
listener
- The VetoableChangeListener.removeVetoableChangeListener(java.beans.VetoableChangeListener)
public java.lang.String getAlignment()
HTMLConstants
public java.lang.String getDirection()
public HTMLTagElement getElement()
public java.lang.String getLanguage()
public java.lang.String getTag()
public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
listener
- The PropertyChangeListener.addPropertyChangeListener(java.beans.PropertyChangeListener)
public void removeVetoableChangeListener(java.beans.VetoableChangeListener listener)
listener
- The VetoableChangeListener.addVetoableChangeListener(java.beans.VetoableChangeListener)
public void setAlignment(java.lang.String alignment) throws java.beans.PropertyVetoException
alignment
- The caption alignment. One of the following constants
defined in HTMLConstants: BOTTOM, LEFT, RIGHT, or TOP.HTMLConstants
public void setDirection(java.lang.String dir) throws java.beans.PropertyVetoException
dir
- The direction. One of the following constants
defined in HTMLConstants: LTR or RTL.HTMLConstants
public void setElement(java.lang.String text) throws java.beans.PropertyVetoException
text
- The caption text.public void setElement(HTMLTagElement element) throws java.beans.PropertyVetoException
element
- An HTMLTagElement.public void setLanguage(java.lang.String lang) throws java.beans.PropertyVetoException
lang
- The language. Example language tags include:
en and en-US.public java.lang.String toString()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |