|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.nrao.sss.html.HtmlElement edu.nrao.sss.html.HtmlTableCell
public class HtmlTableCell
A cell in an HTML table.
Version Info:
$Revision: 545 $ |
$Date: 2007-04-19 10:38:45 -0600 (Thu, 19 Apr 2007) $ |
$Author: dharland $ |
Nested Class Summary | |
---|---|
static class |
HtmlTableCell.Type
Types of table cells. |
Field Summary |
---|
Fields inherited from class edu.nrao.sss.html.HtmlElement |
---|
NBSP_HTML, NBSP_TEXT, NBSP_UNICODE |
Constructor Summary | |
---|---|
HtmlTableCell()
Creates a new data cell. |
|
HtmlTableCell(HtmlTableCell.Type cellType)
Creates a new cell of the given type. |
|
HtmlTableCell(HtmlTableCell.Type cellType,
String contents)
Creates a new cellType cell with the given contents. |
|
HtmlTableCell(String contents)
Creates a new data cell with the given contents. |
Method Summary | |
---|---|
HtmlTableCell |
clone()
Returns a new copy of this cell. |
boolean |
equals(Object o)
Returns true if o is equal to this cell. |
boolean |
equalsIgnoreAttribute(HtmlTableCell other,
HTML.Attribute attribute)
Compares other to this cell for equality, ignoring the
parentRow and attribute . |
boolean |
equalsIgnoreSpans(HtmlTableCell other)
Compares other to this cell for equality, ignoring the
parentRow and the colspan and rowspan
attributes. |
int |
getColumnSpan()
Returns the number of columns spanned by this cell. |
HtmlTableRow |
getParentRow()
Returns the row to which this cell belongs. |
int |
getPositionInRow()
Returns the position of this cell in its row. |
int |
getRowSpan()
Returns the number of rows spanned by this cell. |
HtmlTableCell.Type |
getType()
Returns the type of this cell. |
StringBuilder |
getUnparsedContents()
Returns the contents between the beginning and ending cell tags. |
int |
getWidthMagnitude()
Returns the numeric value of the width attribute of this cell. |
String |
getWidthSuffix()
Returns the portion of this cell's width attribute that follows the numeric portion. |
int |
hashCode()
Returns a hash code value for this cell. |
boolean |
isSimple()
Returns false. |
void |
setType(HtmlTableCell.Type newType)
Sets the type of this cell. |
Methods inherited from class edu.nrao.sss.html.HtmlElement |
---|
addAttribute, copyAttributesOf, getAttribute, getAttributes, getAttributeValue, getTag, removeAllAttributes, removeAttribute, writeHtmlTo |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public HtmlTableCell()
public HtmlTableCell(String contents)
contents
- the contents of this cell.public HtmlTableCell(HtmlTableCell.Type cellType)
cellType
- the type of this cell, either data or header.
If this value is null, this cell will
be a data cell.public HtmlTableCell(HtmlTableCell.Type cellType, String contents)
cellType
cell with the given contents.
cellType
- the type of this cell, either data or header.
If this value is null, this cell will
be a data cell.contents
- the contents of this cell.Method Detail |
---|
public boolean isSimple()
isSimple
in class HtmlElement
public HtmlTableRow getParentRow()
public int getPositionInRow()
public final void setType(HtmlTableCell.Type newType)
newType
- the type of this cell. If this value is null,
this cell will be set to a data cell.public HtmlTableCell.Type getType()
public StringBuilder getUnparsedContents()
public int getColumnSpan()
public int getRowSpan()
public int getWidthMagnitude()
public String getWidthSuffix()
Note: the algorithm used by this method assumes that the value of the width attribute, if present, is properly formed. If it is not, the results of this method are unpredictable.
public boolean equals(Object o)
o
is equal to this cell.
equals
in class Object
public boolean equalsIgnoreSpans(HtmlTableCell other)
other
to this cell for equality, ignoring the
parentRow and the colspan and rowspan
attributes.
other
- the cell to which the comparison is made.
other
is equal to this one, according
to the definition above.public boolean equalsIgnoreAttribute(HtmlTableCell other, HTML.Attribute attribute)
other
to this cell for equality, ignoring the
parentRow and attribute
.
other
- the cell to which the comparison is made.attribute
- the attribute to ignore in the comparison.
other
is equal to this one, according
to the definition above.public int hashCode()
hashCode
in class Object
public HtmlTableCell clone()
If anything goes wrong during the cloning procedure,
a RuntimeException
will be thrown.
clone
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |