public class FlyweightCell extends Object
FlyweightCell represents a cell in the
Grid or Escalator at a certain
point in time.
Since the FlyweightCell follows the Flyweight-pattern
any instance of this object is subject to change without the user knowing it
and so should not be stored anywhere outside of the method providing these
instances.
| Modifier and Type | Field and Description |
|---|---|
static String |
COLSPAN_ATTR
The column span property name.
|
| Constructor and Description |
|---|
FlyweightCell(FlyweightRow row,
int column)
Creates a cell representation that follows the
Flyweight-pattern. |
| Modifier and Type | Method and Description |
|---|---|
int |
getColSpan()
Return the colspan attribute of the element of the cell.
|
int |
getColumn()
Returns the column index of the cell.
|
com.google.gwt.dom.client.TableCellElement |
getElement()
Returns the element of the cell.
|
int |
getRow()
Returns the row index of the cell.
|
void |
setColSpan(int numberOfCells)
Set the colspan attribute for the element of the cell.
|
void |
setElement(com.google.gwt.dom.client.TableCellElement element)
Sets the DOM element for this FlyweightCell, either a
TD or
a TH. |
public static final String COLSPAN_ATTR
public FlyweightCell(FlyweightRow row, int column)
Flyweight-pattern.row - representation of the row that contains the cellcolumn - the column index of the cellFlyweightCellpublic int getRow()
public int getColumn()
public com.google.gwt.dom.client.TableCellElement getElement()
TD element
or a TH element.public int getColSpan()
public void setElement(com.google.gwt.dom.client.TableCellElement element)
TD or
a TH. It is the caller's responsibility to actually insert
the given element to the document when needed.element - the element corresponding to this cell, cannot be nullpublic void setColSpan(int numberOfCells)
numberOfCells - spanned cell count, must be at least 1Copyright © 2023 Vaadin Ltd. All rights reserved.