API / geotoolkit / widgets / datasheet / Cell / Cell
DataSheet cell A cell in DataSheet table NOTE: Cell will be created automatically after DataSheet is initialized
Methods
Constructors
• new Cell(row, column, cellStyle, dataSheet, options)
Methods
▸ getBorder(): BorderStylesOut
Get cell border
Cell border
▸ getColumn(): number
Get column location of a cell
number
Column index
▸ getContentData(): string
Get text content of a cell
string
Content of cell
▸ getFillStyle(): FillStyle
Get cell fill style
Current cell fill style
▸ getMergedCell(): MergedCell
Get merged cell which this cell is within
Merged cell
▸ getProperties(): Style
Get cell properties
Cell style
▸ getRow(): number
Get row location of a cell
number
Row index
▸ getTextStyle(): TextStyle
Get cell text style
Current cell text style
▸ getValidator(): ValidatorPredicate
Get cell content validator
this
▸ getWrapMode(): WrapMode
Get wrap mode for cell text content
Wrap mode
▸ isActive(): boolean
Check if cell is active
boolean
True if cell is active, false otherwise
▸ setBorder(borderType): Cell
Set cell border
| Name | Type | Description |
|---|---|---|
borderType | BorderStyles | New cell border |
this
▸ setContentData(newData, autoHeight?): Cell
Set text content for a cell
| Name | Type | Description |
|---|---|---|
newData | string | number | New cell content |
Optional autoHeight | boolean | True to automatically set row height base on content data, false otherwise |
this
▸ setFillStyle(fillStyle): Cell
Set cell fill style
| Name | Type | Description |
|---|---|---|
fillStyle | Type | New cell fill style |
this
▸ setTextAlignment(alignment?, baseline?): Cell
Set cell text alignment
| Name | Type | Description |
|---|---|---|
Optional alignment | AlignmentStyle | New cell text alignment |
Optional baseline | BaseLineStyle | New cell text baseline |
this
▸ setTextStyle(textStyle, merge?): Cell
Set cell text style
| Name | Type | Description |
|---|---|---|
textStyle | Type | New cell text style |
Optional merge | boolean | True if you want to merge textStyle with existing attribute, false by default |
this
▸ setValidator(validator): Cell
Set cell content validator
| Name | Type | Description |
|---|---|---|
validator | ValidatorPredicate | ValidationPreset | Validation function to validate cell content, validator must be in the form of function (cellContent) and must return a boolean, return true means cell text content is valid, false otherwise, cellContent parameter is cell content to be validated of type string. |
this
▸ setWrapMode(wrapMode): Cell
Set wrap mode for cell text content
| Name | Type | Description |
|---|---|---|
wrapMode | WrapMode | New cell content wrap mode |
this