Class FlyweightCell
- java.lang.Object
-
- com.vaadin.client.widget.escalator.FlyweightCell
-
public class FlyweightCell extends Object
AFlyweightCellrepresents a cell in theGridorEscalatorat a certain point in time.Since the
FlyweightCellfollows theFlyweight-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.- Since:
- 7.4
- Author:
- Vaadin Ltd
-
-
Field Summary
Fields Modifier and Type Field Description static StringCOLSPAN_ATTRThe column span property name.
-
Constructor Summary
Constructors Constructor Description FlyweightCell(FlyweightRow row, int column)Creates a cell representation that follows theFlyweight-pattern.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetColSpan()Return the colspan attribute of the element of the cell.intgetColumn()Returns the column index of the cell.com.google.gwt.dom.client.TableCellElementgetElement()Returns the element of the cell.intgetRow()Returns the row index of the cell.voidsetColSpan(int numberOfCells)Set the colspan attribute for the element of the cell.voidsetElement(com.google.gwt.dom.client.TableCellElement element)Sets the DOM element for this FlyweightCell, either aTDor aTH.
-
-
-
Field Detail
-
COLSPAN_ATTR
public static final String COLSPAN_ATTR
The column span property name.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
FlyweightCell
public FlyweightCell(FlyweightRow row, int column)
Creates a cell representation that follows theFlyweight-pattern.- Parameters:
row- representation of the row that contains the cellcolumn- the column index of the cell- See Also:
FlyweightCell
-
-
Method Detail
-
getRow
public int getRow()
Returns the row index of the cell.- Returns:
- the row index
-
getColumn
public int getColumn()
Returns the column index of the cell.- Returns:
- the column index
-
getElement
public com.google.gwt.dom.client.TableCellElement getElement()
Returns the element of the cell. Can be either aTDelement or aTHelement.- Returns:
- the element
-
getColSpan
public int getColSpan()
Return the colspan attribute of the element of the cell.- Returns:
- the colspan attribute
-
setElement
public void setElement(com.google.gwt.dom.client.TableCellElement element)
Sets the DOM element for this FlyweightCell, either aTDor aTH. It is the caller's responsibility to actually insert the given element to the document when needed.- Parameters:
element- the element corresponding to this cell, cannot be null
-
setColSpan
public void setColSpan(int numberOfCells)
Set the colspan attribute for the element of the cell.- Parameters:
numberOfCells- spanned cell count, must be at least 1
-
-