|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.vaadin.client.widget.escalator.FlyweightRow
public class FlyweightRow
An internal implementation of the Row interface.
There is only one instance per Escalator. This is designed to be re-used when rendering rows.
Escalator.AbstractRowContainer#refreshRow(Node, int)| Constructor Summary | |
|---|---|
FlyweightRow()
|
|
| Method Summary | |
|---|---|
void |
addCells(int index,
int numberOfColumns)
|
java.lang.Iterable<FlyweightCell> |
getCells()
Returns flyweight cells for the client code to render. |
java.lang.Iterable<FlyweightCell> |
getCells(int offset,
int numberOfCells)
Returns a subrange of flyweight cells for the client code to render. |
TableRowElement |
getElement()
Gets the root element for this row. |
int |
getRow()
Gets the row index. |
java.lang.Iterable<FlyweightCell> |
getUnattachedCells(int offset,
int numberOfCells)
Returns a subrange of unattached flyweight cells. |
void |
removeCells(int index,
int numberOfColumns)
|
void |
setup(TableRowElement e,
int row,
double[] columnWidths)
|
boolean |
teardown()
Tear down the state of the Row. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FlyweightRow()
| Method Detail |
|---|
public void setup(TableRowElement e,
int row,
double[] columnWidths)
public boolean teardown()
This is an internal check method, to prevent retrieving uninitialized
data by calling getRow(), getElement() or
getCells() at an improper time.
This should only be used with asserts ("
assert flyweightRow.teardown() ") so that the code is never
run when asserts aren't enabled.
truepublic int getRow()
Row
getRow in interface Rowpublic TableRowElement getElement()
Row
The EscalatorUpdater may update the class names of the element
and add inline styles, but may not modify the contained DOM structure.
If you wish to modify the cells within this row element, access them via
the List< objects passed in to
Cell>EscalatorUpdater.updateCells(Row, List)
getElement in interface Row
public void addCells(int index,
int numberOfColumns)
public void removeCells(int index,
int numberOfColumns)
public java.lang.Iterable<FlyweightCell> getCells()
elements from the row
element.
Precondition: each cell has a corresponding element in the row
#setup(Element, int, int[]),
teardown()
public java.lang.Iterable<FlyweightCell> getCells(int offset,
int numberOfCells)
elements
from the row element.
Precondition: each cell has a corresponding element in the row
offset - the index of the first cell to returnnumberOfCells - the number of cells to return
public java.lang.Iterable<FlyweightCell> getUnattachedCells(int offset,
int numberOfCells)
elements associated. Note that
FlyweightRow does not keep track of whether cells in actuality have
corresponding DOM elements or not; it is the caller's responsibility to
invoke this method with correct parameters.
Precondition: the range [offset, offset + numberOfCells) must be valid
offset - the index of the first cell to returnnumberOfCells - the number of cells to return
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||