|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface EphoxTableModel<T>
Allows easy navigation of the complex HTML table model, handling colspan / rowspan details. Hidden elements (eg comments) in the table are not included in the model.
Instance available via TableManager
.
Method Summary | |
---|---|
Rectangle |
find(Element cell)
Finds the cell in the tale matching the specified element and returns a Rectangle representing
the area within the display cell model that it occupies. |
T |
get(int row,
int col)
Returns the object at the specified display row and column. |
Collection<T> |
getAllCells()
Flattens the cells into a single collection, in HTML order (one row at a time). |
int |
getCellCount()
Calculates how many cells are in the table. |
int |
getDisplayColumns()
Get the number of display columns in the table. |
int |
getDisplayRows()
Get the number of display rows in the table. |
Element |
getElement(int row,
int col)
Returns the element at the specified display row and column. |
boolean |
isFilled(int row,
int col)
Determine if the specified display cell is filled. |
Method Detail |
---|
T get(int row, int col)
row
- the display row of the object to return.col
- the display column of the object to return.
Element getElement(int row, int col)
get(int, int)
.
row
- the display row of the element to return.col
- the display column of the element to return.
boolean isFilled(int row, int col)
row
- the display row to check.col
- the display column to check.
int getCellCount()
Collection<T> getAllCells()
int getDisplayRows()
int getDisplayColumns()
Rectangle find(Element cell)
Rectangle
representing
the area within the display cell model that it occupies. The (x, y) of the
Rectangle is the (row, col) of the display cell occupied by the element as used by get(int, int)
. The width of the
rectangle is the colspan of the element and the height is the rowspan.
The Rectangle
class is used as it's operations such as Rectangle.add(Rectangle)
can be used to
combine cells when generating a range. Note that in this manner the add method of Rectangle does not take into account
the colspan and rowspan of any cells between the two cells being added.
cell
- the cell to find.
IllegalArgumentException
|
Copyright (c) 2005-2012 Ephox Pty Ltd. All rights reserved. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |