Package io.keikai.model.impl
Class AbstractCellAdv
- java.lang.Object
-
- io.keikai.model.impl.AbstractCellAdv
-
- All Implemented Interfaces:
CellStyleHolder
,FormulaContent
,LinkedModelObject
,SCell
,Serializable
- Direct Known Subclasses:
CellImpl
public abstract class AbstractCellAdv extends Object implements SCell, LinkedModelObject, Serializable
- Since:
- 3.5.0
- Author:
- dennis
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface io.keikai.model.SCell
SCell.CellType
-
-
Constructor Summary
Constructors Constructor Description AbstractCellAdv()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected void
checkFormulaResultType(SCell.CellType... types)
protected void
checkType(SCell.CellType... types)
Boolean
getBooleanValue()
Gets the boolean valueDate
getDateValue()
Gets the date value that is transfered by the double number value.ErrorValue
getErrorValue()
abstract CellValue
getEvalCellValue(boolean evaluatedVal)
abstract FormulaExpression
getFormulaExpression()
String
getFormulaValue()
Object
getInitValue()
Double
getNumberValue()
SRichText
getRichTextValue()
Return the rich text value.String
getStringValue()
abstract int
getTextHeight()
abstract int
getTextWidth()
Object
getValue()
abstract boolean
isCalcAutoHeight()
boolean
isRichTextValue()
Check if this cell contains a rich-text valuevoid
setBooleanValue(Boolean date)
abstract void
setCalcAutoHeight(boolean b)
void
setDateValue(Date date)
Sets the number value a date instance, it will transfer the date to double valuevoid
setErrorValue(ErrorValue errorValue)
abstract void
setFormulaResultValue(ValueEval value)
abstract void
setFormulaValue(String formula, FormulaType formulaType)
abstract void
setFormulaValue(String formula, Locale locale)
abstract void
setFormulaValue(String formula, Locale locale, FormulaType formulaType)
void
setNumberValue(Double number)
void
setStringValue(String value)
Set string value, if the value start with '=', then it sets as formulaabstract void
setTextHeight(int height)
abstract void
setTextWidth(int width)
SComment
setupComment()
SHyperlink
setupHyperlink(SHyperlink.HyperlinkType type, String address, String label)
setup a hyperlinkSRichText
setupRichTextValue()
Setup a rich text value(Create a new one if the old value is not a rich-text) and return the instance which to be edited.protected abstract void
setValue(Object value, boolean aString)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.keikai.model.CellStyleHolder
getCellStyle, getCellStyle, setCellStyle
-
Methods inherited from interface io.keikai.model.FormulaContent
clearFormulaResultCache, isFormulaParsingError
-
Methods inherited from interface io.keikai.model.impl.LinkedModelObject
checkOrphan, destroy
-
Methods inherited from interface io.keikai.model.SCell
clearValue, deleteComment, getArrayFormulaRegion, getColumnIndex, getComment, getFormulaResultType, getHyperlink, getReferenceString, getRowIndex, getSheet, getType, isNull, isPartOfArrayFormulaGroup, setComment, setFormulaValue, setHyperlink, setValue
-
-
-
-
Method Detail
-
checkType
protected void checkType(SCell.CellType... types)
-
checkFormulaResultType
protected void checkFormulaResultType(SCell.CellType... types)
-
setStringValue
public void setStringValue(String value)
Description copied from interface:SCell
Set string value, if the value start with '=', then it sets as formula- Specified by:
setStringValue
in interfaceSCell
-
getStringValue
public String getStringValue()
- Specified by:
getStringValue
in interfaceSCell
-
getInitValue
public Object getInitValue()
-
setNumberValue
public void setNumberValue(Double number)
- Specified by:
setNumberValue
in interfaceSCell
-
getNumberValue
public Double getNumberValue()
- Specified by:
getNumberValue
in interfaceSCell
-
setDateValue
public void setDateValue(Date date)
Description copied from interface:SCell
Sets the number value a date instance, it will transfer the date to double value- Specified by:
setDateValue
in interfaceSCell
-
getDateValue
public Date getDateValue()
Description copied from interface:SCell
Gets the date value that is transfered by the double number value.- Specified by:
getDateValue
in interfaceSCell
-
setBooleanValue
public void setBooleanValue(Boolean date)
- Specified by:
setBooleanValue
in interfaceSCell
-
getBooleanValue
public Boolean getBooleanValue()
Description copied from interface:SCell
Gets the boolean value- Specified by:
getBooleanValue
in interfaceSCell
-
getErrorValue
public ErrorValue getErrorValue()
- Specified by:
getErrorValue
in interfaceSCell
-
setErrorValue
public void setErrorValue(ErrorValue errorValue)
- Specified by:
setErrorValue
in interfaceSCell
-
getFormulaValue
public String getFormulaValue()
- Specified by:
getFormulaValue
in interfaceSCell
- Returns:
- returns formula string without '=', e.g. SUM(A1:B2)
-
setupRichTextValue
public SRichText setupRichTextValue()
Description copied from interface:SCell
Setup a rich text value(Create a new one if the old value is not a rich-text) and return the instance which to be edited.- Specified by:
setupRichTextValue
in interfaceSCell
-
getRichTextValue
public SRichText getRichTextValue()
Description copied from interface:SCell
Return the rich text value. if this cell is a simple string value, it will return a read-only rich-text which wraps string-value and current font.- Specified by:
getRichTextValue
in interfaceSCell
- Returns:
-
isRichTextValue
public boolean isRichTextValue()
Description copied from interface:SCell
Check if this cell contains a rich-text value- Specified by:
isRichTextValue
in interfaceSCell
-
setupHyperlink
public SHyperlink setupHyperlink(SHyperlink.HyperlinkType type, String address, String label)
Description copied from interface:SCell
setup a hyperlink- Specified by:
setupHyperlink
in interfaceSCell
-
setupComment
public SComment setupComment()
- Specified by:
setupComment
in interfaceSCell
-
setFormulaValue
public abstract void setFormulaValue(String formula, Locale locale, FormulaType formulaType)
- Parameters:
formula
-locale
-- Since:
- 6.0.0
-
setFormulaValue
public abstract void setFormulaValue(String formula, FormulaType formulaType)
- Parameters:
formula
-- Since:
- 6.0.0
-
setFormulaResultValue
public abstract void setFormulaResultValue(ValueEval value)
-
setValue
protected abstract void setValue(Object value, boolean aString)
-
getFormulaExpression
public abstract FormulaExpression getFormulaExpression()
-
setTextHeight
public abstract void setTextHeight(int height)
-
getTextHeight
public abstract int getTextHeight()
-
setCalcAutoHeight
public abstract void setCalcAutoHeight(boolean b)
-
isCalcAutoHeight
public abstract boolean isCalcAutoHeight()
-
setTextWidth
public abstract void setTextWidth(int width)
-
getTextWidth
public abstract int getTextWidth()
-
getEvalCellValue
public abstract CellValue getEvalCellValue(boolean evaluatedVal)
-
-