|
|||||||||
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.HTMLTableCell
The HTMLTableCell class represents data in an HTML table cell.
This example creates an HTML text HTMLTableCell object.
Here is the output of the tag:// Create an HTMLText object. HTMLText ibmText = new HTMLText("IBM"); ibmText.setBold(true); ibmText.setItalic(true); HTMLTableCell textCell = new HTMLTableCell(ibmText); textCell.setHorizontalAlignment(HTMLConstants.CENTER); System.out.println(textCell.getTag());
<td align="center"><b><i>IBM</i></b></td>
This example creates an HTMLTableCell object with the element as an HTMLForm object containing a submit button.
Here is the output of the tag:HTMLTableCell formCell = new HTMLTableCell(); // create an HTMLForm object. SubmitFormInput submitButton = new SubmitFormInput("Submit", "Send"); HTMLForm form = new HTMLForm("http://myCompany.com/myServlet"); form.addElement(submitButton); // add the form to the table cell. formCell.setElement(form); System.out.println(formCell.getTag());
<td><form action="http://myCompany.com/myServlet" method="get"> <input type="submit" value="Send" /> </form></td>
HTMLTableCell objects generate the following events:
HTMLTable
,
HTMLTableRow
, Serialized FormFields 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 | |
HTMLTableCell()
Constructs a default HTMLTableCell object. |
|
HTMLTableCell(HTMLTagElement element)
Constructs an HTMLTableCell. |
Method Summary | |
void |
addVetoableChangeListener(java.beans.VetoableChangeListener listener)
Adds the VetoableChangeListener. |
int |
getColumnSpan()
Returns the column span. |
java.lang.String |
getDirection()
Returns the direction of the text interpretation. |
HTMLTagElement |
getElement()
Returns the table cell element. |
int |
getHeight()
Returns the height relative to the table in pixels or percent. |
java.lang.String |
getHorizontalAlignment()
Returns the horizontal alignment. |
java.lang.String |
getLanguage()
Returns the language of the table cell. |
int |
getRowSpan()
Returns the row span. |
java.lang.String |
getTag()
Returns the table cell tag. |
java.lang.String |
getTag(HTMLTagElement element)
Returns the table cell tag with the specified element. |
java.lang.String |
getVerticalAlignment()
Returns the vertical alignment. |
int |
getWidth()
Returns the width relative to the table in pixels or percent. |
boolean |
isHeightInPercent()
Indicates if the height is in percent or pixels. |
boolean |
isWidthInPercent()
Indicates if the width is in percent or pixels. |
boolean |
isWrap()
Indicates if the cell data will use normal HTML linebreaking conventions. |
void |
removeVetoableChangeListener(java.beans.VetoableChangeListener listener)
Removes the VetoableChangeListener from the internal list. |
void |
setColumnSpan(int span)
Sets the column span. |
void |
setDirection(java.lang.String dir)
Sets the direction of the text interpretation. |
void |
setElement(HTMLTagElement element)
Sets the table cell element. |
void |
setElement(java.lang.String element)
Sets the table cell element. |
void |
setHeight(int height)
Sets the height relative to the table. |
void |
setHeight(int height,
boolean heightInPercent)
Sets the height relative to the table in pixels or percent. |
void |
setHeightInPercent(boolean heightInPercent)
Sets the height unit in percent or pixels. |
void |
setHorizontalAlignment(java.lang.String alignment)
Sets the horizontal alignment. |
void |
setLanguage(java.lang.String lang)
Sets the language of the table cell. |
void |
setRowSpan(int span)
Sets the row span. |
void |
setVerticalAlignment(java.lang.String alignment)
Sets the vertical alignment. |
void |
setWidth(int width)
Sets the width relative to the table. |
void |
setWidth(int width,
boolean widthInPercent)
Sets the width relative to the table in percent or pixels. |
void |
setWidthInPercent(boolean widthInPercent)
Sets the width unit in percent or pixels. |
void |
setWrap(boolean wrap)
Sets if the cell data will use normal HTML linebreaking conventions. |
java.lang.String |
toString()
Returns the HTML table cell 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 HTMLTableCell()
public HTMLTableCell(HTMLTagElement element)
element
- The table cell element.Method Detail |
public void addVetoableChangeListener(java.beans.VetoableChangeListener listener)
listener
- The VetoableChangeListener.removeVetoableChangeListener(java.beans.VetoableChangeListener)
public int getColumnSpan()
public java.lang.String getDirection()
public HTMLTagElement getElement()
public int getHeight()
public java.lang.String getHorizontalAlignment()
HTMLConstants
public java.lang.String getLanguage()
public int getRowSpan()
public java.lang.String getTag()
public java.lang.String getTag(HTMLTagElement element)
element
- The table cell element.public java.lang.String getVerticalAlignment()
HTMLConstants
public int getWidth()
public boolean isHeightInPercent()
public boolean isWidthInPercent()
public boolean isWrap()
public void removeVetoableChangeListener(java.beans.VetoableChangeListener listener)
listener
- The VetoableChangeListener.addVetoableChangeListener(java.beans.VetoableChangeListener)
public void setColumnSpan(int span) throws java.beans.PropertyVetoException
span
- The column span.java.beans.PropertyVetoException
- If the change is vetoed.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.java.beans.PropertyVetoException
- If a change is vetoed.HTMLConstants
public void setElement(java.lang.String element) throws java.beans.PropertyVetoException
element
- The cell element.java.beans.PropertyVetoException
- If the change is vetoed.public void setElement(HTMLTagElement element) throws java.beans.PropertyVetoException
element
- The cell element.java.beans.PropertyVetoException
- If the change is vetoed.public void setHeight(int height) throws java.beans.PropertyVetoException
height
- The height.java.beans.PropertyVetoException
- If the change is vetoed.setHeightInPercent(boolean)
public void setHeight(int height, boolean heightInPercent) throws java.beans.PropertyVetoException
height
- The height.heightInPercent
- true if unit is percent; false if pixels.java.beans.PropertyVetoException
- If the change is vetoed.public void setHeightInPercent(boolean heightInPercent) throws java.beans.PropertyVetoException
heightInPercent
- true if unit is percent; false if pixels.java.beans.PropertyVetoException
- If the change is vetoed.setHeight(int)
public void setHorizontalAlignment(java.lang.String alignment) throws java.beans.PropertyVetoException
alignment
- The horizontal alignment. One of the following constants
defined in HTMLConstants: CENTER, LEFT, or RIGHT.java.beans.PropertyVetoException
- If the change is vetoed.HTMLConstants
public void setLanguage(java.lang.String lang) throws java.beans.PropertyVetoException
lang
- The language. Example language tags include:
en and en-US.java.beans.PropertyVetoException
- If a change is vetoed.public void setRowSpan(int span) throws java.beans.PropertyVetoException
span
- The row span.java.beans.PropertyVetoException
- If the change is vetoed.public void setVerticalAlignment(java.lang.String alignment) throws java.beans.PropertyVetoException
alignment
- The vertical alignment. One of the following constants
defined in HTMLConstants: BASELINE, BOTTOM, MIDDLE, or TOP.java.beans.PropertyVetoException
- If the change is vetoed.HTMLConstants
public void setWidth(int width) throws java.beans.PropertyVetoException
width
- The width.java.beans.PropertyVetoException
- If the change is vetoed.setWidthInPercent(boolean)
public void setWidth(int width, boolean widthInPercent) throws java.beans.PropertyVetoException
width
- The width.widthInPercent
- true if unit is percent; false if pixels.java.beans.PropertyVetoException
- If the change is vetoed.public void setWidthInPercent(boolean widthInPercent) throws java.beans.PropertyVetoException
widthInPercent
- true if unit is percent; false if pixels.java.beans.PropertyVetoException
- If the change is vetoed.setWidth(int)
public void setWrap(boolean wrap) throws java.beans.PropertyVetoException
wrap
- true if normal HTML linebreaking is used; false otherwise.java.beans.PropertyVetoException
- If the change is vetoed.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 |