ibm-information-center/dist/eclipse/plugins/i5OS.ic.rzahh_5.4.0.1/tablerow.htm

66 lines
3.7 KiB
HTML

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en-us" xml:lang="en-us">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="security" content="public" />
<meta name="Robots" content="index,follow" />
<meta http-equiv="PICS-Label" content='(PICS-1.1 "http://www.icra.org/ratingsv02.html" l gen true r (cz 1 lz 1 nz 1 oz 1 vz 1) "http://www.rsac.org/ratingsv01.html" l gen true r (n 0 s 0 v 0 l 0) "http://www.classify.org/safesurf/" l gen true r (SS~~000 1))' />
<meta name="DC.Type" content="reference" />
<meta name="DC.Title" content="HTMLTableRow class" />
<meta name="abstract" content="" />
<meta name="description" content="" />
<meta name="copyright" content="(C) Copyright IBM Corporation 2006" />
<meta name="DC.Rights.Owner" content="(C) Copyright IBM Corporation 2006" />
<meta name="DC.Format" content="XHTML" />
<meta name="DC.Identifier" content="tablerow" />
<meta name="DC.Language" content="en-us" />
<!-- All rights reserved. Licensed Materials Property of IBM -->
<!-- US Government Users Restricted Rights -->
<!-- Use, duplication or disclosure restricted by -->
<!-- GSA ADP Schedule Contract with IBM Corp. -->
<link rel="stylesheet" type="text/css" href="./ibmdita.css" />
<link rel="stylesheet" type="text/css" href="./ic.css" />
<title>HTMLTableRow class</title>
</head>
<body id="tablerow"><a name="tablerow"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">HTMLTableRow class</h1>
<div><p></p>
<div class="section"><p>The <a href="javadoc/com/ibm/as400/util/html/HTMLTableRow.html"> HTMLTableRow</a> class creates a row within
a table. This class provides various methods for getting and setting attributes
of a row. Some things you can do with these methods are: </p>
</div>
<div class="section"><ul><li><a href="javadoc/com/ibm/as400/util/html/HTMLTableRow.html#ADDCOLUMN(COM.IBM.AS400.UTIL.HTML.HTMLTABLECELL)"> Add</a> or <a href="javadoc/com/ibm/as400/util/html/HTMLTableRow.html#REMOVECOLUMN(COM.IBM.AS400.UTIL.HTML.HTMLTABLECELL)"> remove</a> a column from the row</li>
<li><a href="javadoc/com/ibm/as400/util/html/HTMLTableRow.html#GETCOLUMN(INT)"> Get column</a> data at the specified column
Index</li>
<li><a href="javadoc/com/ibm/as400/util/html/HTMLTableRow.html#GETCOLUMNINDEX(COM.IBM.AS400.UTIL.HTML.HTMLTABLECELL)"> Get column index</a> for the column with the
specified cell.</li>
<li>Get the <a href="javadoc/com/ibm/as400/util/html/HTMLTableRow.html#GETCOLUMNCOUNT()"> number of columns</a> in a row</li>
<li>Set <a href="javadoc/com/ibm/as400/util/html/HTMLTableRow.html#SETHORIZONTALALIGNMENT(JAVA.LANG.STRING)"> horizontal</a> and <a href="javadoc/com/ibm/as400/util/html/HTMLTableRow.html#SETVERTICALALIGNMENT(JAVA.LANG.STRING)"> vertical</a> alignments</li>
</ul>
</div>
<div class="section"><p>The following is an example for HTMLTableRow:</p>
</div>
<div class="section"><div class="p"><pre>// Create a row and set the alignment.
HTMLTableRow row = new HTMLTableRow();
row.setHorizontalAlignment(HTMLTableRow.CENTER);
// Create and add the column information to the row.
HTMLText account = new HTMLText(customers_[rowIndex].getAccount());
HTMLText name = new HTMLText(customers_[rowIndex].getName());
HTMLText balance = new HTMLText(customers_[rowIndex].getBalance());
row.addColumn(new HTMLTableCell(account));
row.addColumn(new HTMLTableCell(name));
row.addColumn(new HTMLTableCell(balance));
// Add the row to an HTMLTable object (assume that the table already exists).
table.addRow(row);</pre>
</div>
</div>
</div>
</body>
</html>