|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object fi.iki.hsivonen.xml.checker.table.Table
final class Table
Represents an XHTML table for table integrity checking. Handles table-significant parse events and keeps track of columns.
Nested Class Summary | |
---|---|
private static class |
Table.State
An enumeration for keeping track of the parsing state of a table. |
Field Summary | |
---|---|
private List<Cell> |
cellsReferringToHeaders
A list of cells that refer to headers (in the document order). |
private int |
columnCount
The column count established by column markup or by the first row. |
private RowGroup |
current
The current row group (also implicit groups have an explicit object). |
private ColumnRange |
currentColRange
The range under inspection. |
private ColumnRange |
first
The head of the column range list. |
private boolean |
hardWidth
Indicates whether the width of the table was established by column markup. |
private Set<String> |
headerIds
A set of the IDs of header cells. |
private ColumnRange |
last
The tail of the column range list. |
private TableChecker |
owner
The owning checker. |
private int |
pendingColGroupSpan
A colgroup span that hasn't been actuated yet in case the element has col children. |
private ColumnRange |
previousColRange
The previous range that was inspected. |
private int |
realColumnCount
The actual column count as stretched by the widest row. |
private Table.State |
state
Keeps track of the handler state between SAX events. |
private int |
suppressedStarts
The number of suppressed element starts. |
Constructor Summary | |
---|---|
Table(TableChecker owner)
Constructor. |
Method Summary | |
---|---|
private void |
appendColumnRange(ColumnRange colRange)
Appends a column range to the linked list of column ranges. |
(package private) void |
cell(Cell cell)
Reports a cell whose positioning has been decided back to the table so that column bookkeeping can be done. |
(package private) void |
end()
|
(package private) void |
endCell()
|
(package private) void |
endCol()
|
(package private) void |
endColGroup()
|
(package private) void |
endRow()
|
(package private) void |
endRowGroup()
|
(package private) void |
err(String message)
|
(package private) int |
getColumnCount()
Returns the columnCount. |
(package private) boolean |
isHardWidth()
Returns the hardWidth. |
private boolean |
needSuppressEnd()
|
private boolean |
needSuppressStart()
|
(package private) void |
setColumnCount(int columnCount)
Sets the columnCount. |
(package private) void |
startCell(boolean header,
Attributes attributes)
|
(package private) void |
startCol(int span)
|
(package private) void |
startColGroup(int span)
|
(package private) void |
startRow()
|
(package private) void |
startRowGroup(String type)
|
(package private) void |
warn(String message)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private Table.State state
private int suppressedStarts
private boolean hardWidth
private int columnCount
private int realColumnCount
private int pendingColGroupSpan
private final Set<String> headerIds
private final List<Cell> cellsReferringToHeaders
private final TableChecker owner
private RowGroup current
private ColumnRange first
private ColumnRange last
private ColumnRange currentColRange
private ColumnRange previousColRange
Constructor Detail |
---|
public Table(TableChecker owner)
owner
- reference back to the checkerMethod Detail |
---|
private boolean needSuppressStart()
private boolean needSuppressEnd()
void startRowGroup(String type) throws SAXException
SAXException
void endRowGroup() throws SAXException
SAXException
void startRow()
void endRow() throws SAXException
SAXException
void startCell(boolean header, Attributes attributes) throws SAXException
SAXException
void endCell()
void startColGroup(int span)
void endColGroup()
void startCol(int span) throws SAXException
SAXException
private void appendColumnRange(ColumnRange colRange)
colRange
- the range to appendvoid warn(String message) throws SAXException
SAXException
void err(String message) throws SAXException
SAXException
void endCol()
void end() throws SAXException
SAXException
int getColumnCount()
void setColumnCount(int columnCount)
columnCount
- the columnCount to setboolean isHardWidth()
void cell(Cell cell)
RowGroup
--not TableChecker
.)
cell
- a cell whose position has been calculated
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |