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,java.io.Serializable
public class DataValidationImpl extends AbstractDataValidationAdv
- Since:
- 3.5.0
- Author:
- Dennis
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface io.keikai.model.SDataValidation
SDataValidation.AlertStyle, SDataValidation.OperatorType, SDataValidation.ValidationType
-
-
Constructor Summary
Constructors Constructor Description DataValidationImpl(AbstractSheetAdv sheet, AbstractDataValidationAdv copyFrom)DataValidationImpl(AbstractSheetAdv sheet, java.lang.String id)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddDependency(int row, int col)voidaddRegion(CellRegion region)voidcheckOrphan()voidclearFormulaResultCache()Clear the formula result cache if there is evaluation resultvoiddestroy()Destroy / release this model object, for example all the dependency, parent linking.SDataValidation.AlertStylegetAlertStyle()java.lang.StringgetErrorMessage()java.lang.StringgetErrorTitle()java.lang.StringgetEscapedFormula1()java.lang.StringgetEscapedFormula2()java.lang.StringgetFormula1()java.lang.StringgetFormula2()FormulaExpressiongetFormulaExpression1()FormulaExpressiongetFormulaExpression2()java.lang.StringgetId()java.lang.StringgetInputMessage()java.lang.StringgetInputTitle()intgetNumOfValue()intgetNumOfValue1()intgetNumOfValue2()SDataValidation.OperatorTypegetOperatorType()java.util.List<SCell>getReferToCellList()java.util.List<SCell>getReferToCellList(int row, int col)Return the referred list relative to the specified row and column.java.util.Set<CellRegion>getRegions()SSheetgetSheet()SDataValidation.ValidationTypegetValidationType()java.lang.ObjectgetValue(int index)java.lang.ObjectgetValue1(int index)java.lang.ObjectgetValue2(int index)org.apache.poi.ss.formula.eval.ValueEvalgetValueEval1()org.apache.poi.ss.formula.eval.ValueEvalgetValueEval2()booleanhasReferToCellList()booleanhasReferToRelativeCol()Returns whether the referred list formula contains a relative column.booleanhasReferToRelativeRow()Returns whether the referred list formula contains a relative row.booleanisFormulaParsingError()Return formula parsing state.booleanisIgnoreBlank()booleanisInCellDropdown()booleanisShowError()booleanisShowInput()voidremoveRegion(CellRegion region)voidsetAlertStyle(SDataValidation.AlertStyle alertStyle)voidsetErrorMessage(java.lang.String text)voidsetErrorTitle(java.lang.String title)voidsetEscapedFormulas(java.lang.String formula1, java.lang.String formula2)Setup the two formulas which are in escaped POI format.voidsetFormula1(FormulaExpression formula1)voidsetFormula1(java.lang.String formula1)voidsetFormula2(FormulaExpression formula2)voidsetFormula2(java.lang.String formula2)voidsetFormulas(FormulaExpression fe1, FormulaExpression fe2)voidsetFormulas(java.lang.String formula1, java.lang.String formula2)Setup the two formulas.voidsetIgnoreBlank(boolean allowed)voidsetInCellDropdown(boolean show)voidsetInputMessage(java.lang.String message)voidsetInputTitle(java.lang.String title)voidsetOperatorType(SDataValidation.OperatorType type)voidsetRegions(java.util.Set<CellRegion> regions)voidsetShowError(boolean show)voidsetShowInput(boolean show)voidsetValidationType(SDataValidation.ValidationType type)
-
-
-
Constructor Detail
-
DataValidationImpl
public DataValidationImpl(AbstractSheetAdv sheet, java.lang.String id)
-
DataValidationImpl
public DataValidationImpl(AbstractSheetAdv sheet, AbstractDataValidationAdv copyFrom)
-
-
Method Detail
-
getId
public java.lang.String getId()
-
getSheet
public SSheet 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
public SDataValidation.AlertStyle getAlertStyle()
-
setAlertStyle
public void setAlertStyle(SDataValidation.AlertStyle alertStyle)
-
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
public void setInputTitle(java.lang.String title)
-
setInputMessage
public void setInputMessage(java.lang.String message)
-
getInputTitle
public java.lang.String getInputTitle()
-
getInputMessage
public java.lang.String getInputMessage()
-
setErrorTitle
public void setErrorTitle(java.lang.String title)
-
setErrorMessage
public void setErrorMessage(java.lang.String text)
-
getErrorTitle
public java.lang.String getErrorTitle()
-
getErrorMessage
public java.lang.String getErrorMessage()
-
getRegions
public java.util.Set<CellRegion> getRegions()
-
addRegion
public void addRegion(CellRegion region)
-
removeRegion
public void removeRegion(CellRegion region)
-
setRegions
public void setRegions(java.util.Set<CellRegion> regions)
-
getValidationType
public SDataValidation.ValidationType getValidationType()
-
setValidationType
public void setValidationType(SDataValidation.ValidationType type)
-
getOperatorType
public SDataValidation.OperatorType getOperatorType()
-
setOperatorType
public void setOperatorType(SDataValidation.OperatorType type)
-
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
public java.lang.Object getValue(int index)
-
getNumOfValue1
public int getNumOfValue1()
-
getValue1
public java.lang.Object getValue1(int index)
-
getNumOfValue2
public int getNumOfValue2()
-
getValue2
public java.lang.Object getValue2(int index)
-
getFormula1
public java.lang.String getFormula1()
-
getFormula2
public java.lang.String getFormula2()
-
setFormula1
public void setFormula1(java.lang.String formula1)
-
setFormula2
public void setFormula2(java.lang.String formula2)
-
setFormulas
public void setFormulas(java.lang.String formula1, java.lang.String formula2)Description copied from class:AbstractDataValidationAdvSetup the two formulas.- Specified by:
setFormulasin classAbstractDataValidationAdv
-
setEscapedFormulas
public void setEscapedFormulas(java.lang.String formula1, java.lang.String formula2)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
public java.util.List<SCell> getReferToCellList()
-
hasReferToCellList
public boolean hasReferToCellList()
-
setFormulas
public void setFormulas(FormulaExpression fe1, FormulaExpression fe2)
- Specified by:
setFormulasin classAbstractDataValidationAdv- Parameters:
fe1-fe2-- Since:
- 3.6.0
-
getFormulaExpression1
public FormulaExpression getFormulaExpression1()
- Specified by:
getFormulaExpression1in classAbstractDataValidationAdv- Returns:
- Since:
- 3.6.0
-
getFormulaExpression2
public FormulaExpression getFormulaExpression2()
- Specified by:
getFormulaExpression2in classAbstractDataValidationAdv- Returns:
- Since:
- 3.6.0
-
setFormula1
public void setFormula1(FormulaExpression formula1)
- Specified by:
setFormula1in classAbstractDataValidationAdv- Since:
- 3.6.0
-
setFormula2
public void setFormula2(FormulaExpression formula2)
- 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
public java.util.List<SCell> getReferToCellList(int row, int col)
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
public java.lang.String getEscapedFormula1()
- Specified by:
getEscapedFormula1in classAbstractDataValidationAdv- Returns:
-
getEscapedFormula2
public java.lang.String getEscapedFormula2()
- Specified by:
getEscapedFormula2in classAbstractDataValidationAdv- Returns:
-
-