Package io.keikai.api.model.impl
Class CellDataImpl
java.lang.Object
io.keikai.api.model.impl.CellDataImpl
- All Implemented Interfaces:
CellData,Serializable
- Since:
- 3.0.0
- Author:
- dennis
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.keikai.api.model.CellData
CellData.CellType -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintFor example, a cell displays$123,456.00, but its edit text is123456.The text result after applying the number format, e.g.Gets the cell result type.intgetRow()getType()Gets the cell type.
If the cell is a formula then you are possible getting theCellData.CellType.FORMULAorCellData.CellType.ERROR.
You could useCellData.getResultType()to get result type for a cell or a formula-cell.getValue()booleanisBlank()booleanvoidsetEditText(String editText) Sets the edit text, for example, "123" is number, "2012/1/1" is date, "=SUM(A1:B1)" is formulavoidsetRichText(String htmlString) Sets the rich text in html format.voidSets the data object, it should be a String, Number, Date or BooleanbooleanvalidateEditText(String editText) Validates the edit text if this cell has validation constraint
-
Constructor Details
-
CellDataImpl
-
-
Method Details
-
getRow
public int getRow() -
getColumn
public int getColumn() -
getResultType
Description copied from interface:CellDataGets the cell result type.- Specified by:
getResultTypein interfaceCellData- Returns:
- cell result type
-
getType
Description copied from interface:CellDataGets the cell type.
If the cell is a formula then you are possible getting theCellData.CellType.FORMULAorCellData.CellType.ERROR.
You could useCellData.getResultType()to get result type for a cell or a formula-cell. -
getValue
-
getFormatText
Description copied from interface:CellDataThe text result after applying the number format, e.g. a cell has 123456,CellData.getFormatText()returns $123,456.00- Specified by:
getFormatTextin interfaceCellData- Returns:
- the formatted text
-
getEditText
Description copied from interface:CellDataFor example, a cell displays$123,456.00, but its edit text is123456.- Specified by:
getEditTextin interfaceCellData- Returns:
- the edit text before applying the format
-
setValue
Description copied from interface:CellDataSets the data object, it should be a String, Number, Date or Boolean -
setEditText
Description copied from interface:CellDataSets the edit text, for example, "123" is number, "2012/1/1" is date, "=SUM(A1:B1)" is formula- Specified by:
setEditTextin interfaceCellData
-
validateEditText
Description copied from interface:CellDataValidates the edit text if this cell has validation constraint- Specified by:
validateEditTextin interfaceCellData- Parameters:
editText- the edit text- Returns:
- false if the editText can't pass the validation
-
isBlank
public boolean isBlank() -
isFormula
public boolean isFormula() -
getDoubleValue
- Specified by:
getDoubleValuein interfaceCellData- Returns:
- the double value of this cell or null if the cell is blank
-
getDateValue
- Specified by:
getDateValuein interfaceCellData- Returns:
- the date data object of this cell or null if the cell is blank
-
getStringValue
- Specified by:
getStringValuein interfaceCellData- Returns:
- the string value of this cell or null if the cell is blank
-
getFormulaValue
- Specified by:
getFormulaValuein interfaceCellData- Returns:
- the formula string of this cell without leading "=" e.g. SUM(D1:D3)
-
getBooleanValue
- Specified by:
getBooleanValuein interfaceCellData- Returns:
- this cell's boolean value or null if the cell is blank
-
setRichText
Description copied from interface:CellDataSets the rich text in html format.- Specified by:
setRichTextin interfaceCellData
-
getRichText
- Specified by:
getRichTextin interfaceCellData- Returns:
- rich text in html format; null if not a rich text.
-