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:
- ElementEvent - The events fired are:
- elementAdded
- elementChanged
- elementRemoved
- PropertyChangeEvent
- VetoableChangeEvent
- See Also:
- HTMLTable, HTMLTableCell
-
HTMLTableRow()
- Constructs a default HTMLTableRow object.
-
HTMLTableRow(HTMLTableCell[])
- Constructs an HTMLTableRow object with the specified cells.
-
addColumn(HTMLTableCell)
-
Adds the column to the row.
-
addColumnListener(ElementListener)
- Adds an ElementListener for the columns.
-
addPropertyChangeListener(PropertyChangeListener)
- Adds a PropertyChangeListener.
-
addVetoableChangeListener(VetoableChangeListener)
- Adds the VetoableChangeListener.
-
getColumn(int)
- Returns the column at the specified columnIndex.
-
getColumnCount()
- Returns the number of columns in the row.
-
getColumnIndex(HTMLTableCell)
- Returns the column index of the specified cell.
-
getColumnIndex(HTMLTableCell, int)
- Returns the column index of the specified cell.
-
getHorizontalAlignment()
- Returns the global horizontal alignment for the row.
-
getTag()
- Returns the table row tag.
-
getVerticalAlignment()
- Returns the global vertical alignment for the row.
-
removeAllColumns()
- Removes all the columns from the row.
-
removeColumn(HTMLTableCell)
- Removes the column element from the row.
-
removeColumn(int)
- Removes the column at the specified columnIndex.
-
removeColumnListener(ElementListener)
- Removes this column ElementListener from the internal list.
-
removePropertyChangeListener(PropertyChangeListener)
- Removes the PropertyChangeListener from the internal list.
-
removeVetoableChangeListener(VetoableChangeListener)
- Removes the VetoableChangeListener from the internal list.
-
setColumn(HTMLTableCell, int)
- Sets the column element at the specified column.
-
setHorizontalAlignment(String)
- Sets the global horizontal alignment for the row.
-
setVerticalAlignment(String)
- Sets the global vertical alignment for the row.
-
toString()
- Returns the HTML table row tag.
HTMLTableRow
public HTMLTableRow()
- Constructs a default HTMLTableRow object.
HTMLTableRow
public HTMLTableRow(HTMLTableCell cells[])
- Constructs an HTMLTableRow object with the specified cells.
- Parameters:
- cells - The HTMLTableCell array.
addColumn
public void addColumn(HTMLTableCell cell)
- Adds the column to the row.
- Parameters:
- cell - The HTMLTableCell containing the column data.
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
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
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
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.
getColumnCount
public int getColumnCount()
- Returns the number of columns in the row.
- Returns:
- The number of columns.
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.
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.
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
getTag
public String getTag()
- Returns the table row tag.
- Returns:
- The tag.
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
removeAllColumns
public void removeAllColumns()
- Removes all the columns from the row.
removeColumn
public void removeColumn(HTMLTableCell cell)
- Removes the column element from the row.
- Parameters:
- cell - The HTMLTableCell object to be removed.
removeColumn
public void removeColumn(int columnIndex)
- Removes the column at the specified columnIndex.
- Parameters:
- columnIndex - The column index.
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
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
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
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.
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
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
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