Package io.keikai.model.impl
Class CellImpl
java.lang.Object
io.keikai.model.impl.AbstractCellAdv
io.keikai.model.impl.CellImpl
- All Implemented Interfaces:
CellStyleHolder,FormulaContent,LinkedModelObject,SCell,Serializable
- Since:
- 3.5.0
- Author:
- dennis
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.keikai.model.SCell
SCell.CellType -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidClear the formula result cache if there is evaluation resultvoidclear cell value , reset it to blankvoidDelete the comment associated with this cell.voiddestroy()Destroy / release this model object, for example all the dependency, parent linking.protected voidOnly valid for array formula cellsGet the style, if it doesn't has local style, it will possible look up it's parent's stylegetCellStyle(boolean local) Get the cell style locally or look up from the parentintgetEvalCellValue(boolean evaluatedVal) protected RefgetRef()intgetSheet()intintgetType()getValue(boolean evaluatedVal) booleanbooleanbooleanisNull()Because you always get a not-null cell object, use this method to judge the cell is really null or not.booleanvoidsetCalcAutoHeight(boolean b) voidsetCellStyle(SCellStyle cellStyle) Set the local stylevoidsetComment(SComment comment) voidsetFormulaResultValue(org.apache.poi.ss.formula.eval.ValueEval value) voidsetFormulaValue(String formula) set formula with string without '=', e.g.voidsetFormulaValue(String formula, FormulaType formulaType) voidsetFormulaValue(String formula, Locale locale) voidsetFormulaValue(String formula, Locale locale, FormulaType formulaType) voidsetHyperlink(SHyperlink hyperlink) Set or clear a hyperlinkvoidsetTextHeight(int heightPx) voidsetTextWidth(int widthPx) voidprotected voidtoString()Methods inherited from class io.keikai.model.impl.AbstractCellAdv
checkFormulaResultType, checkType, getBooleanValue, getDateValue, getErrorValue, getFormulaValue, getNumberValue, getRichTextValue, getStringValue, getValue, isRichTextValue, setBooleanValue, setDateValue, setErrorValue, setNumberValue, setStringValue, setupComment, setupHyperlink, setupRichTextValue
-
Constructor Details
-
CellImpl
-
-
Method Details
-
getType
- Returns:
- the cell type
-
isNull
public boolean isNull()Description copied from interface:SCellBecause you always get a not-null cell object, use this method to judge the cell is really null or not.- Returns:
- TRUE if this cell is really null which means it have not been created.
-
getRowIndex
public int getRowIndex() -
getColumnIndex
public int getColumnIndex() -
getReferenceString
- Returns:
- cell reference like A1
-
checkOrphan
public void checkOrphan() -
getSheet
-
destroy
public void destroy()Description copied from interface:LinkedModelObjectDestroy / release this model object, for example all the dependency, parent linking. this method has to be called before remove this linking from parent object -
getCellStyle
Description copied from interface:CellStyleHolderGet the style, if it doesn't has local style, it will possible look up it's parent's style- See Also:
-
getCellStyle
Description copied from interface:CellStyleHolderGet the cell style locally or look up from the parent- Parameters:
local- true to get the local style only
-
setCellStyle
Description copied from interface:CellStyleHolderSet the local style- Parameters:
cellStyle- the style to set, null to clean local style
-
evalFormula
protected void evalFormula() -
getInitValue
- Overrides:
getInitValuein classAbstractCellAdv
-
getFormulaResultType
-
clearValue
public void clearValue()Description copied from interface:SCellclear cell value , reset it to blank -
setFormulaValue
Description copied from interface:SCellset formula with string without '=', e.g. SUM(A1:B2) -
setFormulaValue
- Specified by:
setFormulaValuein classAbstractCellAdv
-
setFormulaValue
- Specified by:
setFormulaValuein classAbstractCellAdv
-
setFormulaValue
- Specified by:
setFormulaValuein classAbstractCellAdv
-
clearFormulaResultCache
public void clearFormulaResultCache()Description copied from interface:FormulaContentClear the formula result cache if there is evaluation result -
isFormulaParsingError
public boolean isFormulaParsingError()- Returns:
- returns TRUE if it has parsing error, FALSE if no error found or not a formula content
-
getValue
-
setValue
-
setValue
- Specified by:
setValuein classAbstractCellAdv
-
getHyperlink
-
setHyperlink
Description copied from interface:SCellSet or clear a hyperlink- Parameters:
hyperlink- hyperlink to set, or null to clear
-
getComment
-
setComment
-
deleteComment
public void deleteComment()Description copied from interface:SCellDelete the comment associated with this cell. -
getRef
-
toString
-
setFormulaResultValue
public void setFormulaResultValue(org.apache.poi.ss.formula.eval.ValueEval value) - Specified by:
setFormulaResultValuein classAbstractCellAdv
-
getFormulaExpression
- Specified by:
getFormulaExpressionin classAbstractCellAdv
-
getFromulaResultValue
-
setTextHeight
@Internal public void setTextHeight(int heightPx) - Specified by:
setTextHeightin classAbstractCellAdv
-
getTextHeight
@Internal public int getTextHeight()- Specified by:
getTextHeightin classAbstractCellAdv
-
setCalcAutoHeight
@Internal public void setCalcAutoHeight(boolean b) - Specified by:
setCalcAutoHeightin classAbstractCellAdv
-
isCalcAutoHeight
@Internal public boolean isCalcAutoHeight()- Specified by:
isCalcAutoHeightin classAbstractCellAdv
-
setTextWidth
@Internal public void setTextWidth(int widthPx) - Specified by:
setTextWidthin classAbstractCellAdv
-
getTextWidth
@Internal public int getTextWidth()- Specified by:
getTextWidthin classAbstractCellAdv
-
getEvalCellValue
- Specified by:
getEvalCellValuein classAbstractCellAdv
-
getArrayFormulaRegion
Description copied from interface:SCellOnly valid for array formula cells- Returns:
- the region of the array formula group that the cell belongs to.
-
isPartOfArrayFormulaGroup
public boolean isPartOfArrayFormulaGroup()- Returns:
trueif this cell is part of group of cells having a common array formula.
-