com.f1j.ss
Interface ValidationFormat


public interface ValidationFormat
extends FormatBase

The Validation Format interface.


Inner Class Summary
static class ValidationFormat.EProperty
          Validation Format property enumeration
 
Field Summary
static ValidationFormat.EProperty eRule
          Rule property
static ValidationFormat.EProperty eText
          Text property
 
Method Summary
 java.lang.String getRule(int row, int col)
          Returns the validation rule associated with the active cell in US english.
 java.lang.String getRuleLocal(int row, int col)
          Returns the validation rule associated with the active cell in the user's language.
 java.lang.String getText()
          Returns the text to be displayed in the cell if the validation rule fails.
 void setRule(java.lang.String rule, int row, int col)
          Sets the validation rule expression, in US English.
 void setRuleLocal(java.lang.String rule, int row, int col)
          Sets the validation rule expression, in the user's language.
 void setText(java.lang.String text)
          Sets the text to display if a validation rule fails.
 
Methods inherited from interface com.f1j.util.FormatBase
isUndefined, isUndefined, isUsed, setUndefined, undefineAll, useAll
 

Field Detail

eRule

public static final ValidationFormat.EProperty eRule
Rule property

eText

public static final ValidationFormat.EProperty eText
Text property
Method Detail

getRule

public java.lang.String getRule(int row,
                                int col)
Returns the validation rule associated with the active cell in US english.
Parameters:
row - the coordinate of the row used as a starting point for the calculated relative reference.
col - the coordinate of the column used as the starting point for the calculated relative reference.
Returns:
a string describing the validation rule (such as "(A1 > 100)").
See Also:
setRule(java.lang.String, int, int)

getRuleLocal

public java.lang.String getRuleLocal(int row,
                                     int col)
Returns the validation rule associated with the active cell in the user's language.
Parameters:
row - the coordinate of the row used as a starting point for the calculated relative reference.
col - the coordinate of the column used as the starting point for the calculated relative reference.
Returns:
a string describing the validation rule(such as "(A1 > 100)").
See Also:
setRuleLocal(java.lang.String, int, int)

getText

public java.lang.String getText()
Returns the text to be displayed in the cell if the validation rule fails.
Returns:
a string describing the text.
See Also:
setText(String)

setRule

public void setRule(java.lang.String rule,
                    int row,
                    int col)
             throws F1Exception
Sets the validation rule expression, in US English. Using the row and column coordinates as the starting point, the rule adjusts according to the position of the active cell.
Parameters:
rule - the validation rule expression (such as "(A1>100)"). The cell reference in the expression represents the ending point of a calculated relative reference.
row - the coordinate of the row used as a starting point for the calculated relative reference.
col - the coordinate of the column used as the starting point for the calculated relative reference.
Throws:
F1Exception - if a parameter is invalid.
See Also:
getRule(int,int)

setRuleLocal

public void setRuleLocal(java.lang.String rule,
                         int row,
                         int col)
                  throws F1Exception
Sets the validation rule expression, in the user's language. Using the row and column coordinates as the starting point, the rule adjusts according to the position of the active cell.
Parameters:
rule - the validation rule expression, such as (such as "(A1>100)"). The cell reference in the expression represents the ending point of a calculated relative reference.
row - the coordinate of the row used as a starting point for the calculated relative reference.
col - the coordinate of the column used as the starting point for the calculated relative reference.
Throws:
F1Exception - if a parameter is invalid.
See Also:
getRuleLocal(int,int)

setText

public void setText(java.lang.String text)
Sets the text to display if a validation rule fails.
Parameters:
text - the text to display if the entered data does not meet the condition specified by the validation expression.
See Also:
getText()