Last updated

API / geotoolkit / widgets / datasheet / Cell / Cell

Class: Cell

datasheet.Cell.Cell

DataSheet cell A cell in DataSheet table NOTE: Cell will be created automatically after DataSheet is initialized

Table of contents

Constructors
Methods

Contents

Constructors

new Cell(row, column, cellStyle, dataSheet, options)

new Cell(row, column, cellStyle, dataSheet, options)

Parameters

Name Type Description
rownumberrow index
columnnumbercolumn index
cellStyleStylecellstyle
dataSheetDataSheetdataSheet
optionsOptionsoptions
Methods

getBorder

getBorder(): BorderStylesOut

Get cell border

Returns

BorderStylesOut

Cell border


getColumn

getColumn(): number

Get column location of a cell

Returns

number

Column index


getContentData

getContentData(): string

Get text content of a cell

Returns

string

Content of cell


getFillStyle

getFillStyle(): FillStyle

Get cell fill style

Returns

FillStyle

Current cell fill style


getMergedCell

getMergedCell(): MergedCell

Get merged cell which this cell is within

Returns

MergedCell

Merged cell


getProperties

getProperties(): Style

Get cell properties

Returns

Style

Cell style


getRow

getRow(): number

Get row location of a cell

Returns

number

Row index


getTextStyle

getTextStyle(): TextStyle

Get cell text style

Returns

TextStyle

Current cell text style


getValidator

getValidator(): ValidatorPredicate

Get cell content validator

Returns

ValidatorPredicate

this


getWrapMode

getWrapMode(): WrapMode

Get wrap mode for cell text content

Returns

WrapMode

Wrap mode


isActive

isActive(): boolean

Check if cell is active

Returns

boolean

True if cell is active, false otherwise


setBorder

setBorder(borderType): Cell

Set cell border

Parameters

Name Type Description
borderTypeBorderStylesNew cell border

Returns

Cell

this


setContentData

setContentData(newData, autoHeight?): Cell

Set text content for a cell

Parameters

Name Type Description
newDatastring | numberNew cell content
Optional autoHeightbooleanTrue to automatically set row height base on content data, false otherwise

Returns

Cell

this


setFillStyle

setFillStyle(fillStyle): Cell

Set cell fill style

Parameters

Name Type Description
fillStyleTypeNew cell fill style

Returns

Cell

this


setTextAlignment

setTextAlignment(alignment?, baseline?): Cell

Set cell text alignment

Parameters

Name Type Description
Optional alignmentAlignmentStyleNew cell text alignment
Optional baselineBaseLineStyleNew cell text baseline

Returns

Cell

this


setTextStyle

setTextStyle(textStyle, merge?): Cell

Set cell text style

Parameters

Name Type Description
textStyleTypeNew cell text style
Optional mergebooleanTrue if you want to merge textStyle with existing attribute, false by default

Returns

Cell

this


setValidator

setValidator(validator): Cell

Set cell content validator

Parameters

Name Type Description
validatorValidatorPredicate | ValidationPresetValidation 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.

Returns

Cell

this


setWrapMode

setWrapMode(wrapMode): Cell

Set wrap mode for cell text content

Parameters

Name Type Description
wrapModeWrapModeNew cell content wrap mode

Returns

Cell

this