Package io.keikai.model.impl
Class DataValidationImpl
java.lang.Object
io.keikai.model.impl.AbstractDataValidationAdv
io.keikai.model.impl.DataValidationImpl
- All Implemented Interfaces:
FormulaContent,LinkedModelObject,SDataValidation,Serializable
- Since:
- 3.5.0
- Author:
- Dennis
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.keikai.model.SDataValidation
SDataValidation.AlertStyle, SDataValidation.OperatorType, SDataValidation.ValidationType -
Constructor Summary
ConstructorsConstructorDescriptionDataValidationImpl(AbstractSheetAdv sheet, AbstractDataValidationAdv copyFrom) DataValidationImpl(AbstractSheetAdv sheet, String id) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddDependency(int row, int col) voidaddRegion(CellRegion region) voidvoidClear the formula result cache if there is evaluation resultvoiddestroy()Destroy / release this model object, for example all the dependency, parent linking.getId()intintintgetReferToCellList(int row, int col) Return the referred list relative to the specified row and column.getSheet()getValue(int index) getValue1(int index) getValue2(int index) org.apache.poi.ss.formula.eval.ValueEvalorg.apache.poi.ss.formula.eval.ValueEvalbooleanbooleanReturns whether the referred list formula contains a relative column.booleanReturns whether the referred list formula contains a relative row.booleanReturn formula parsing state.booleanbooleanbooleanbooleanvoidremoveRegion(CellRegion region) voidsetAlertStyle(SDataValidation.AlertStyle alertStyle) voidsetErrorMessage(String text) voidsetErrorTitle(String title) voidsetEscapedFormulas(String formula1, String formula2) Setup the two formulas which are in escaped POI format.voidsetFormula1(FormulaExpression formula1) voidsetFormula1(String formula1) voidsetFormula2(FormulaExpression formula2) voidsetFormula2(String formula2) voidsetFormulas(FormulaExpression fe1, FormulaExpression fe2) voidsetFormulas(String formula1, String formula2) Setup the two formulas.voidsetIgnoreBlank(boolean allowed) voidsetInCellDropdown(boolean show) voidsetInputMessage(String message) voidsetInputTitle(String title) voidvoidsetRegions(Set<CellRegion> regions) voidsetShowError(boolean show) voidsetShowInput(boolean show) void
-
Constructor Details
-
DataValidationImpl
-
DataValidationImpl
-
-
Method Details
-
getId
-
getSheet
-
checkOrphan
public void checkOrphan() -
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 -
getAlertStyle
-
setAlertStyle
-
setIgnoreBlank
public void setIgnoreBlank(boolean allowed) -
isIgnoreBlank
public boolean isIgnoreBlank() -
setInCellDropdown
public void setInCellDropdown(boolean show) -
isInCellDropdown
public boolean isInCellDropdown() -
setShowInput
public void setShowInput(boolean show) -
isShowInput
public boolean isShowInput() -
setShowError
public void setShowError(boolean show) -
isShowError
public boolean isShowError() -
setInputTitle
-
setInputMessage
-
getInputTitle
-
getInputMessage
-
setErrorTitle
-
setErrorMessage
-
getErrorTitle
-
getErrorMessage
-
getRegions
-
addRegion
-
removeRegion
-
setRegions
-
getValidationType
-
setValidationType
-
getOperatorType
-
setOperatorType
-
isFormulaParsingError
public boolean isFormulaParsingError()Description copied from interface:SDataValidationReturn formula parsing state.- Returns:
- true if has error, false if no error or no formula
-
getNumOfValue
public int getNumOfValue() -
getValue
-
getNumOfValue1
public int getNumOfValue1() -
getValue1
-
getNumOfValue2
public int getNumOfValue2() -
getValue2
-
getFormula1
-
getFormula2
-
setFormula1
-
setFormula2
-
setFormulas
Description copied from class:AbstractDataValidationAdvSetup the two formulas.- Specified by:
setFormulasin classAbstractDataValidationAdv
-
setEscapedFormulas
Description copied from class:AbstractDataValidationAdvSetup the two formulas which are in escaped POI format.- Specified by:
setEscapedFormulasin classAbstractDataValidationAdv
-
clearFormulaResultCache
public void clearFormulaResultCache()Description copied from interface:FormulaContentClear the formula result cache if there is evaluation result -
getReferToCellList
-
hasReferToCellList
public boolean hasReferToCellList() -
setFormulas
- Specified by:
setFormulasin classAbstractDataValidationAdv- Parameters:
fe1-fe2-- Since:
- 3.6.0
-
getFormulaExpression1
- Specified by:
getFormulaExpression1in classAbstractDataValidationAdv- Returns:
- Since:
- 3.6.0
-
getFormulaExpression2
- Specified by:
getFormulaExpression2in classAbstractDataValidationAdv- Returns:
- Since:
- 3.6.0
-
setFormula1
- Specified by:
setFormula1in classAbstractDataValidationAdv- Since:
- 3.6.0
-
setFormula2
- Specified by:
setFormula2in classAbstractDataValidationAdv- Since:
- 3.6.0
-
getValueEval1
public org.apache.poi.ss.formula.eval.ValueEval getValueEval1()- Specified by:
getValueEval1in classAbstractDataValidationAdv- Returns:
-
getValueEval2
public org.apache.poi.ss.formula.eval.ValueEval getValueEval2()- Specified by:
getValueEval2in classAbstractDataValidationAdv- Returns:
-
hasReferToRelativeCol
public boolean hasReferToRelativeCol()Description copied from interface:SDataValidationReturns whether the referred list formula contains a relative column.- Returns:
-
hasReferToRelativeRow
public boolean hasReferToRelativeRow()Description copied from interface:SDataValidationReturns whether the referred list formula contains a relative row.- Returns:
-
getReferToCellList
Description copied from interface:SDataValidationReturn the referred list relative to the specified row and column.- Returns:
-
addDependency
public void addDependency(int row, int col) - Specified by:
addDependencyin classAbstractDataValidationAdv
-
getEscapedFormula1
- Specified by:
getEscapedFormula1in classAbstractDataValidationAdv- Returns:
-
getEscapedFormula2
- Specified by:
getEscapedFormula2in classAbstractDataValidationAdv- Returns:
-