|
|||||||||
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.HTMLTableRow
The HTMLTableRow class represents an HTML row tag.
This example creates an HTMLTableRow object and sets the attributes.
Here is the output of the tag:HTMLTableRow row = new HTMLTableRow(); row.setHorizontalAlignment(HTMLTableRow.CENTER); row.setVerticalAlignment(HTMLTableRow.MIDDLE); // Add the columns to the row (Assume that the HTMLTableCell objects are already created). row.addColumn(column1); row.addColumn(column2); row.addColumn(column3); row.addColumn(column4); System.out.println(row.getTag());
<tr align="center" valign="middle"> <td>data1</td> <td>data2</td> <td>data3</td> <td>data4</td> </tr>
HTMLTableRow objects generate the following events:
HTMLTable
,
HTMLTableCell
, 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 | |
HTMLTableRow()
Constructs a default HTMLTableRow object. |
|
HTMLTableRow(HTMLTableCell[] cells)
Constructs an HTMLTableRow object with the specified cells. |
Method Summary | |
void |
addColumn(HTMLTableCell cell)
Adds the column to the row. |
void |
addColumnListener(ElementListener listener)
Adds an ElementListener for the columns. |
void |
addVetoableChangeListener(java.beans.VetoableChangeListener listener)
Adds the VetoableChangeListener. |
HTMLTableCell |
getColumn(int columnIndex)
Returns the column at the specified columnIndex. |
int |
getColumnCount()
Returns the number of columns in the row. |
int |
getColumnIndex(HTMLTableCell cell)
Returns the column index of the specified cell. |
int |
getColumnIndex(HTMLTableCell cell,
int index)
Returns the column index of the specified cell. |
java.lang.String |
getDirection()
Returns the direction of the text interpretation. |
java.lang.String |
getHorizontalAlignment()
Returns the global horizontal alignment for the row. |
java.lang.String |
getLanguage()
Returns the language of the caption. |
java.lang.String |
getTag()
Returns the table row tag. |
java.lang.String |
getVerticalAlignment()
Returns the global vertical alignment for the row. |
void |
removeAllColumns()
Removes all the columns from the row. |
void |
removeColumn(HTMLTableCell cell)
Removes the column element from the row. |
void |
removeColumn(int columnIndex)
Removes the column at the specified columnIndex. |
void |
removeColumnListener(ElementListener listener)
Removes this column ElementListener from the internal list. |
void |
removeVetoableChangeListener(java.beans.VetoableChangeListener listener)
Removes the VetoableChangeListener from the internal list. |
void |
setColumn(HTMLTableCell cell,
int columnIndex)
Sets the column element at the specified column. |
void |
setDirection(java.lang.String dir)
Sets the direction of the text interpretation. |
void |
setHorizontalAlignment(java.lang.String alignment)
Sets the global horizontal alignment for the row. |
void |
setLanguage(java.lang.String lang)
Sets the language of the caption. |
void |
setVerticalAlignment(java.lang.String alignment)
Sets the global vertical alignment for the row. |
java.lang.String |
toString()
Returns the HTML table row 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 HTMLTableRow()
public HTMLTableRow(HTMLTableCell[] cells)
cells
- The HTMLTableCell array.Method Detail |
public void addColumn(HTMLTableCell cell)
cell
- The HTMLTableCell containing the column data.public void addColumnListener(ElementListener listener)
listener
- The ElementListener.removeColumnListener(com.ibm.as400.util.html.ElementListener)
public void addVetoableChangeListener(java.beans.VetoableChangeListener listener)
listener
- The VetoableChangeListener.removeVetoableChangeListener(java.beans.VetoableChangeListener)
public HTMLTableCell getColumn(int columnIndex)
columnIndex
- - The column index.public int getColumnCount()
public int getColumnIndex(HTMLTableCell cell)
cell
- An HTMLTableCell object that contains the cell data.public int getColumnIndex(HTMLTableCell cell, int index)
cell
- An HTMLTableCell object that contains the cell data.index
- The column index to start searching from.public java.lang.String getDirection()
public java.lang.String getHorizontalAlignment()
HTMLConstants
public java.lang.String getLanguage()
public java.lang.String getTag()
public java.lang.String getVerticalAlignment()
HTMLConstants
public void removeAllColumns()
public void removeColumn(HTMLTableCell cell)
cell
- The HTMLTableCell object to be removed.public void removeColumn(int columnIndex)
columnIndex
- The column index.public void removeColumnListener(ElementListener listener)
listener
- The ElementListener.addColumnListener(com.ibm.as400.util.html.ElementListener)
public void removeVetoableChangeListener(java.beans.VetoableChangeListener listener)
listener
- The VetoableChangeListener.addVetoableChangeListener(java.beans.VetoableChangeListener)
public void setColumn(HTMLTableCell cell, int columnIndex)
cell
- The HTMLTableCell object to be added.columnIndex
- The column index.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 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 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 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 |