Package io.keikai.model
Interface SCell
-
- All Superinterfaces:
CellStyleHolder
,FormulaContent
- All Known Implementing Classes:
AbstractCellAdv
,CellImpl
public interface SCell extends CellStyleHolder, FormulaContent
Represent a cell of a sheet in a Spreadsheet. A cell contains value and style (CellStyle
), and its type is one ofSCell.CellType
.- Since:
- 3.5.0
- Author:
- dennis
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
SCell.CellType
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
clearValue()
clear cell value , reset it to blankvoid
deleteComment()
Delete the comment associated with this cell.CellRegion
getArrayFormulaRegion()
Only valid for array formula cellsBoolean
getBooleanValue()
Gets the boolean valueint
getColumnIndex()
SComment
getComment()
Date
getDateValue()
Gets the date value that is transfered by the double number value.ErrorValue
getErrorValue()
SCell.CellType
getFormulaResultType()
String
getFormulaValue()
SHyperlink
getHyperlink()
Double
getNumberValue()
String
getReferenceString()
SRichText
getRichTextValue()
Return the rich text value.int
getRowIndex()
SSheet
getSheet()
String
getStringValue()
SCell.CellType
getType()
Object
getValue()
boolean
isNull()
Because you always get a not-null cell object, use this method to judge the cell is really null or not.boolean
isPartOfArrayFormulaGroup()
boolean
isRichTextValue()
Check if this cell contains a rich-text valuevoid
setBooleanValue(Boolean bool)
void
setComment(SComment comment)
void
setDateValue(Date date)
Sets the number value a date instance, it will transfer the date to double valuevoid
setErrorValue(ErrorValue errorValue)
void
setFormulaValue(String formula)
set formula with string without '=', e.g.void
setHyperlink(SHyperlink hyperlink)
Set or clear a hyperlinkvoid
setNumberValue(Double number)
void
setStringValue(String value)
Set string value, if the value start with '=', then it sets as formulaSComment
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.void
setValue(Object value)
-
Methods inherited from interface io.keikai.model.CellStyleHolder
getCellStyle, getCellStyle, setCellStyle
-
Methods inherited from interface io.keikai.model.FormulaContent
clearFormulaResultCache, isFormulaParsingError
-
-
-
-
Method Detail
-
getSheet
SSheet getSheet()
-
getFormulaResultType
SCell.CellType getFormulaResultType()
-
getType
SCell.CellType getType()
- Returns:
- the cell type
-
getValue
Object getValue()
- Returns:
- cell value.
-
setValue
void setValue(Object value)
-
isNull
boolean isNull()
Because 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
int getRowIndex()
-
getColumnIndex
int getColumnIndex()
-
getReferenceString
String getReferenceString()
- Returns:
- cell reference like A1
-
getHyperlink
SHyperlink getHyperlink()
-
setHyperlink
void setHyperlink(SHyperlink hyperlink)
Set or clear a hyperlink- Parameters:
hyperlink
- hyperlink to set, or null to clear
-
setupHyperlink
SHyperlink setupHyperlink(SHyperlink.HyperlinkType type, String address, String label)
setup a hyperlink
-
clearValue
void clearValue()
clear cell value , reset it to blank
-
setStringValue
void setStringValue(String value)
Set string value, if the value start with '=', then it sets as formula
-
getStringValue
String getStringValue()
-
setupRichTextValue
SRichText 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.
-
getRichTextValue
SRichText getRichTextValue()
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.- Returns:
-
isRichTextValue
boolean isRichTextValue()
Check if this cell contains a rich-text value
-
setFormulaValue
void setFormulaValue(String formula)
set formula with string without '=', e.g. SUM(A1:B2)- Parameters:
formula
-
-
getFormulaValue
String getFormulaValue()
- Returns:
- returns formula string without '=', e.g. SUM(A1:B2)
-
setNumberValue
void setNumberValue(Double number)
-
getNumberValue
Double getNumberValue()
-
setDateValue
void setDateValue(Date date)
Sets the number value a date instance, it will transfer the date to double value
-
getDateValue
Date getDateValue()
Gets the date value that is transfered by the double number value.
-
setBooleanValue
void setBooleanValue(Boolean bool)
-
getBooleanValue
Boolean getBooleanValue()
Gets the boolean value
-
getErrorValue
ErrorValue getErrorValue()
-
setErrorValue
void setErrorValue(ErrorValue errorValue)
-
setComment
void setComment(SComment comment)
-
setupComment
SComment setupComment()
-
getComment
SComment getComment()
-
deleteComment
void deleteComment()
Delete the comment associated with this cell.- Since:
- 3.7.0
-
getArrayFormulaRegion
CellRegion getArrayFormulaRegion()
Only valid for array formula cells- Returns:
- the region of the array formula group that the cell belongs to.
- Since:
- 6.0.0
-
isPartOfArrayFormulaGroup
boolean isPartOfArrayFormulaGroup()
- Returns:
true
if this cell is part of group of cells having a common array formula.- Since:
- 6.0.0
-
-