| Modifier and Type | Class and Description |
|---|---|
| pack-priv static class | |
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private String[] | |
| private String | |
| private String | |
| private int | |
| private final int | |
| private Double | |
| private Double |
| Access | Constructor and Description |
|---|---|
| private | |
| private |
| Modifier and Type | Method and Description |
|---|---|
| private static Double | Returns: null if timeStr is nullpass dateFormat)null for default YYYYMMDD
|
| private static Ptg[] | Returns: The parsed token array representing the formula or value specified. Empty array if both formula and value arenull
|
| private static Double | |
| private static Double | |
| public static DVConstraint | |
| public static DVConstraint | createDateConstraint(int
constant from comparisonOperator, String org. enumdate formula (when first char is '=') or formatted date value expr1, String date formula (when first char is '=') or formatted date value expr2, String ignored if both expr1 and expr2 are formulas. Default value is "YYYY/MM/DD"
otherwise any other valid argument for dateFormat)SimpleDateFormat can be usedCreates a date based data validation constraint. |
| pack-priv static DVConstraint | |
| public static DVConstraint | |
| public static DVConstraint | |
| pack-priv DVConstraint. | |
| private Ptg[] | |
| public static DVConstraint | createNumericConstraint(int
one of validationType, int org.,
org.,
org.,
org.any constant from comparisonOperator, String org. enumdate formula (when first char is '=') or formatted number value expr1, String date formula (when first char is '=') or formatted number value expr2)Creates a number based data validation constraint. |
| public static DVConstraint | createTimeConstraint(int
constant from comparisonOperator, String org. enumdate formula (when first char is '=') or formatted time value expr1, String date formula (when first char is '=') or formatted time value expr2)Creates a time based data validation constraint. |
| public String[] | getExplicitListValues()
Implements org. If validation type is |
| public String | |
| public String | |
| private static String | Returns: all text after '=' if textExpr begins with '='. Otherwisenull if textExpr does not begin with '='a formula or value expression textExpr)Distinguishes formula expressions from simple value expressions. |
| public int | |
| public int | |
| public Double | |
| public Double | |
| public boolean | Returns: true if this constraint is a 'list' validation with explicit valuesConvenience method |
| public boolean | |
| public void | setExplicitListValues(String[] explicitListValues)
Implements org.
|
| public void | setFormula1(String formula1)
Implements org. Sets a formula for expression 1. |
| public void | setFormula2(String formula2)
Implements org. Sets a formula for expression 2. |
| public void | setOperator(int operator)
Implements org. Sets the comparison operator for this constraint |
| public void | |
| public void | |
| private static DVConstraint. |
| _explicitListValues | back to summary |
|---|---|
| private String[] _explicitListValues | |
| _formula1 | back to summary |
|---|---|
| private String _formula1 | |
| _formula2 | back to summary |
|---|---|
| private String _formula2 | |
| _operator | back to summary |
|---|---|
| private int _operator | |
| _validationType | back to summary |
|---|---|
| private final int _validationType | |
| _value1 | back to summary |
|---|---|
| private Double _value1 | |
| _value2 | back to summary |
|---|---|
| private Double _value2 | |
| DVConstraint | back to summary |
|---|---|
| private DVConstraint(int validationType, int comparisonOperator, String formulaA, String formulaB, Double value1, Double value2, String[] explicitListValues) | |
| DVConstraint | back to summary |
|---|---|
| private DVConstraint(String listFormula, String[] explicitListValues) Creates a list constraint | |
| convertDate | back to summary |
|---|---|
private static Double convertDate(String dateStr, SimpleDateFormat dateFormat)
| |
| convertDoubleFormula | back to summary |
|---|---|
private static Ptg[] convertDoubleFormula(String formula, Double value, HSSFSheet sheet)
| |
| convertNumber | back to summary |
|---|---|
private static Double convertNumber(String numberStr)
| |
| convertTime | back to summary |
|---|---|
private static Double convertTime(String timeStr)
| |
| createCustomFormulaConstraint | back to summary |
|---|---|
| public static DVConstraint createCustomFormulaConstraint(String formula) | |
| createDateConstraint | back to summary |
|---|---|
| public static DVConstraint createDateConstraint(int comparisonOperator, String expr1, String expr2, String dateFormat) Creates a date based data validation constraint. The text values entered for expr1 and expr2 can be either standard Excel formulas or formatted date values. If the expression starts with '=' it is parsed as a formula, otherwise it is parsed as a formatted date (Excel uses the same convention). To parse formatted dates, a date format needs to be specified. This is contrary to Excel which uses the default short date format from the OS.
| |
| createDVConstraint | back to summary |
|---|---|
| pack-priv static DVConstraint createDVConstraint(DVRecord dvRecord, FormulaRenderingWorkbook book) | |
| createExplicitListConstraint | back to summary |
|---|---|
| public static DVConstraint createExplicitListConstraint(String[] explicitListValues) | |
| createFormulaListConstraint | back to summary |
|---|---|
| public static DVConstraint createFormulaListConstraint(String listFormula) | |
| createFormulas | back to summary |
|---|---|
pack-priv DVConstraint.
| |
| createListFormula | back to summary |
|---|---|
private Ptg[] createListFormula(HSSFSheet sheet)
| |
| createNumericConstraint | back to summary |
|---|---|
| public static DVConstraint createNumericConstraint(int validationType, int comparisonOperator, String expr1, String expr2) Creates a number based data validation constraint. The text values entered for expr1 and expr2 can be either standard Excel formulas or formatted number values. If the expression starts with '=' it is parsed as a formula, otherwise it is parsed as a formatted number.
| |
| createTimeConstraint | back to summary |
|---|---|
| public static DVConstraint createTimeConstraint(int comparisonOperator, String expr1, String expr2) Creates a time based data validation constraint. The text values entered for expr1 and expr2 can be either standard Excel formulas or formatted time values. If the expression starts with '=' it is parsed as a formula, otherwise it is parsed as a formatted time. To parse formatted times, two formats are supported: "HH:MM" or "HH:MM:SS". This is contrary to Excel which uses the default time format from the OS.
| |
| getExplicitListValues | back to summary |
|---|---|
| public String[] getExplicitListValues() Implements org. Doc from org. If validation type is
| |
| getFormula1 | back to summary |
|---|---|
| public String getFormula1() Implements org.
| |
| getFormula2 | back to summary |
|---|---|
| public String getFormula2() Implements org.
| |
| getFormulaFromTextExpression | back to summary |
|---|---|
| private static String getFormulaFromTextExpression(String textExpr) Distinguishes formula expressions from simple value expressions. This logic is only required by a few factory methods in this class that create data validation constraints from more or less the same parameters that would have been entered in the Excel UI. The data validation dialog box uses the convention that formulas begin with '='. Other methods in this class follow the POI convention (formulas and values are distinct), so the '=' convention is not used there. | |
| getOperator | back to summary |
|---|---|
| public int getOperator() Implements org.
| |
| getValidationType | back to summary |
|---|---|
| public int getValidationType() Implements org.
| |
| getValue1 | back to summary |
|---|---|
public Double getValue1()
| |
| getValue2 | back to summary |
|---|---|
public Double getValue2()
| |
| isExplicitList | back to summary |
|---|---|
| public boolean isExplicitList() Convenience method
| |
| isListValidationType | back to summary |
|---|---|
| public boolean isListValidationType() Convenience method
| |
| setExplicitListValues | back to summary |
|---|---|
| public void setExplicitListValues(String[] explicitListValues) Implements org.
| |
| setFormula1 | back to summary |
|---|---|
| public void setFormula1(String formula1) Implements org. Doc from org. Sets a formula for expression 1.
| |
| setFormula2 | back to summary |
|---|---|
| public void setFormula2(String formula2) Implements org. Doc from org. Sets a formula for expression 2.
| |
| setOperator | back to summary |
|---|---|
| public void setOperator(int operator) Implements org. Doc from org. Sets the comparison operator for this constraint
| |
| setValue1 | back to summary |
|---|---|
| public void setValue1(double value1) Sets a numeric value for expression 1. | |
| setValue2 | back to summary |
|---|---|
| public void setValue2(double value2) Sets a numeric value for expression 2. | |
| toFormulaString | back to summary |
|---|---|
| private static DVConstraint. | |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| _formula1 | back to summary |
|---|---|
| private final Ptg[] _formula1 | |
| _formula2 | back to summary |
|---|---|
| private final Ptg[] _formula2 | |
| FormulaPair | back to summary |
|---|---|
| pack-priv FormulaPair(Ptg[] formula1, Ptg[] formula2) | |
| getFormula1 | back to summary |
|---|---|
| public Ptg[] getFormula1() | |
| getFormula2 | back to summary |
|---|---|
| public Ptg[] getFormula2() | |
| Access | Constructor and Description |
|---|---|
| private |
| _formula | back to summary |
|---|---|
| private String _formula | |
| _value | back to summary |
|---|---|
| private String _value | |
| FormulaValuePair | back to summary |
|---|---|
| private FormulaValuePair() | |
| formula | back to summary |
|---|---|
| public String formula() | |
| string | back to summary |
|---|---|
| public String string() | |
| value | back to summary |
|---|---|
| public Double value() | |