All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.ibm.as400.util.html.HTMLTableRow

java.lang.Object
   |
   +----com.ibm.as400.util.html.HTMLTableRow

public class HTMLTableRow
extends Object
implements HTMLTagElement, HTMLConstants, Serializable
The HTMLTableRow class represents an HTML row tag.

This example creates an HTMLTableRow object and sets the attributes.

  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());
  
Here is the output of the tag:
  <tr align="center" valign="middle">
  <td>data1</td>
  <td>data2</td>
  <td>data3</td>
  <td>data4</td>
  </tr>
  

HTMLTableRow objects generate the following events:

See Also:
HTMLTable, HTMLTableCell

Constructor Index

 o HTMLTableRow()
Constructs a default HTMLTableRow object.
 o HTMLTableRow(HTMLTableCell[])
Constructs an HTMLTableRow object with the specified cells.

Method Index

 o addColumn(HTMLTableCell)
Adds the column to the row.
 o addColumnListener(ElementListener)
Adds an ElementListener for the columns.
 o addPropertyChangeListener(PropertyChangeListener)
Adds a PropertyChangeListener.
 o addVetoableChangeListener(VetoableChangeListener)
Adds the VetoableChangeListener.
 o getColumn(int)
Returns the column at the specified columnIndex.
 o getColumnCount()
Returns the number of columns in the row.
 o getColumnIndex(HTMLTableCell)
Returns the column index of the specified cell.
 o getColumnIndex(HTMLTableCell, int)
Returns the column index of the specified cell.
 o getHorizontalAlignment()
Returns the global horizontal alignment for the row.
 o getTag()
Returns the table row tag.
 o getVerticalAlignment()
Returns the global vertical alignment for the row.
 o removeAllColumns()
Removes all the columns from the row.
 o removeColumn(HTMLTableCell)
Removes the column element from the row.
 o removeColumn(int)
Removes the column at the specified columnIndex.
 o removeColumnListener(ElementListener)
Removes this column ElementListener from the internal list.
 o removePropertyChangeListener(PropertyChangeListener)
Removes the PropertyChangeListener from the internal list.
 o removeVetoableChangeListener(VetoableChangeListener)
Removes the VetoableChangeListener from the internal list.
 o setColumn(HTMLTableCell, int)
Sets the column element at the specified column.
 o setHorizontalAlignment(String)
Sets the global horizontal alignment for the row.
 o setVerticalAlignment(String)
Sets the global vertical alignment for the row.
 o toString()
Returns the HTML table row tag.

Constructors

 o HTMLTableRow
 public HTMLTableRow()
Constructs a default HTMLTableRow object.

 o HTMLTableRow
 public HTMLTableRow(HTMLTableCell cells[])
Constructs an HTMLTableRow object with the specified cells.

Parameters:
cells - The HTMLTableCell array.

Methods

 o addColumn
 public void addColumn(HTMLTableCell cell)
Adds the column to the row.

Parameters:
cell - The HTMLTableCell containing the column data.
 o addColumnListener
 public void addColumnListener(ElementListener listener)
Adds an ElementListener for the columns. The ElementListener object is added to an internal list of ColumnListeners; it can be removed with removeColumnListener.

Parameters:
listener - The ElementListener.
See Also:
removeColumnListener
 o addPropertyChangeListener
 public void addPropertyChangeListener(PropertyChangeListener listener)
Adds a PropertyChangeListener. The specified PropertyChangeListener's propertyChange method is called each time the value of any bound property is changed.

Parameters:
listener - The PropertyChangeListener.
See Also:
removePropertyChangeListener
 o addVetoableChangeListener
 public void addVetoableChangeListener(VetoableChangeListener listener)
Adds the VetoableChangeListener. The specified VetoableChangeListener's vetoableChange method is called each time the value of any constrained property is changed.

Parameters:
listener - The VetoableChangeListener.
See Also:
removeVetoableChangeListener
 o getColumn
 public HTMLTableCell getColumn(int columnIndex)
Returns the column at the specified columnIndex.

Parameters:
columnIndex - - The column index.
Returns:
An HTMLTableCell object with the column data.
 o getColumnCount
 public int getColumnCount()
Returns the number of columns in the row.

Returns:
The number of columns.
 o getColumnIndex
 public int getColumnIndex(HTMLTableCell cell)
Returns the column index of the specified cell.

Parameters:
cell - An HTMLTableCell object that contains the cell data.
Returns:
The column index of the cell. Returns -1 if the column is not found.
 o getColumnIndex
 public int getColumnIndex(HTMLTableCell cell,
                           int index)
Returns the column index of the specified cell.

Parameters:
cell - An HTMLTableCell object that contains the cell data.
index - The column index to start searching from.
Returns:
The column index of the cell. Returns -1 if the column is not found.
 o getHorizontalAlignment
 public String getHorizontalAlignment()
Returns the global horizontal alignment for the row.

Returns:
The horizontal alignment. One of the following constants defined in HTMLConstants: CENTER, LEFT, or RIGHT.
See Also:
HTMLConstants
 o getTag
 public String getTag()
Returns the table row tag.

Returns:
The tag.
 o getVerticalAlignment
 public String getVerticalAlignment()
Returns the global vertical alignment for the row.

Returns:
The vertical alignment. One of the following constants defined in HTMLConstants: BASELINE, BOTTOM, MIDDLE, or TOP.
See Also:
HTMLConstants
 o removeAllColumns
 public void removeAllColumns()
Removes all the columns from the row.

 o removeColumn
 public void removeColumn(HTMLTableCell cell)
Removes the column element from the row.

Parameters:
cell - The HTMLTableCell object to be removed.
 o removeColumn
 public void removeColumn(int columnIndex)
Removes the column at the specified columnIndex.

Parameters:
columnIndex - The column index.
 o removeColumnListener
 public void removeColumnListener(ElementListener listener)
Removes this column ElementListener from the internal list. If the ElementListener is not on the list, nothing is done.

Parameters:
listener - The ElementListener.
See Also:
addColumnListener
 o removePropertyChangeListener
 public void removePropertyChangeListener(PropertyChangeListener listener)
Removes the PropertyChangeListener from the internal list. If the PropertyChangeListener is not on the list, nothing is done.

Parameters:
listener - The PropertyChangeListener.
See Also:
addPropertyChangeListener
 o removeVetoableChangeListener
 public void removeVetoableChangeListener(VetoableChangeListener listener)
Removes the VetoableChangeListener from the internal list. If the VetoableChangeListener is not on the list, nothing is done.

Parameters:
listener - The VetoableChangeListener.
See Also:
addVetoableChangeListener
 o setColumn
 public void setColumn(HTMLTableCell cell,
                       int columnIndex)
Sets the column element at the specified column.

Parameters:
cell - The HTMLTableCell object to be added.
columnIndex - The column index.
 o setHorizontalAlignment
 public void setHorizontalAlignment(String alignment) throws PropertyVetoException
Sets the global horizontal alignment for the row.

Parameters:
alignment - The horizontal alignment. One of the following constants defined in HTMLConstants: CENTER, LEFT, or RIGHT.
Throws: PropertyVetoException
If the change is vetoed.
See Also:
HTMLConstants
 o setVerticalAlignment
 public void setVerticalAlignment(String alignment) throws PropertyVetoException
Sets the global vertical alignment for the row.

Parameters:
alignment - The vertical alignment. One of the following constants defined in HTMLConstants: BASELINE, BOTTOM, MIDDLE, or TOP.
Throws: PropertyVetoException
If the change is vetoed.
See Also:
HTMLConstants
 o toString
 public String toString()
Returns the HTML table row tag.

Returns:
The row tag.
Overrides:
toString in class Object

All Packages  Class Hierarchy  This Package  Previous  Next  Index