|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.poi.hssf.util.HSSFDataValidation
public class HSSFDataValidation
Title: HSSFDataValidation
Description: Utilty class for creating data validation cells
Copyright: Copyright (c) 2004
Company:
Field Summary | |
---|---|
static int |
DATA_TYPE_ANY
Any type |
static int |
DATA_TYPE_DATE
Date type |
static int |
DATA_TYPE_DECIMAL
Decimal type |
static int |
DATA_TYPE_FORMULA
Formula ( custom ) type |
static int |
DATA_TYPE_INTEGER
Integer type |
static int |
DATA_TYPE_LIST
List type ( combo box type ) |
static int |
DATA_TYPE_TEXT_LENGTH
String length type |
static int |
DATA_TYPE_TIME
Time type |
static int |
ERROR_STYLE_INFO
INFO style like |
static int |
ERROR_STYLE_STOP
STOP style like |
static int |
ERROR_STYLE_WARNING
WARNING style like |
static int |
OPERATOR_BETWEEN
Condition operator |
static int |
OPERATOR_EQUAL
|
static int |
OPERATOR_GREATER_OR_EQUAL
|
static int |
OPERATOR_GREATER_THAN
|
static int |
OPERATOR_LESS_OR_EQUAL
|
static int |
OPERATOR_LESS_THAN
|
static int |
OPERATOR_NOT_BETWEEN
|
static int |
OPERATOR_NOT_EQUAL
|
Constructor Summary | |
---|---|
HSSFDataValidation()
Empty constructor |
|
HSSFDataValidation(short first_row,
short first_col,
short last_row,
short last_col)
Constructor wich initializes the cell range on wich this object will be applied |
Method Summary | |
---|---|
void |
createErrorBox(java.lang.String title,
java.lang.String text)
Sets the title and text for the error box . |
void |
createPromptBox(java.lang.String title,
java.lang.String text)
Sets the title and text for the prompt box . |
int |
getDataValidationType()
The data type of this object |
boolean |
getEmptyCellAllowed()
Retrieve the settings for empty cells allowed |
java.lang.String |
getErrorBoxText()
Returns the error box's text |
java.lang.String |
getErrorBoxTitle()
Returns the error box's title |
int |
getErrorStyle()
returns the error style of errror box |
boolean |
getExplicitListFormula()
Returns the settings for explicit formula . |
short |
getFirstColumn()
|
java.lang.String |
getFirstFormula()
Returns the first formula |
short |
getFirstRow()
|
short |
getLastColumn()
|
short |
getLastRow()
|
int |
getOperator()
Retrieves the operator used for this object's formula |
java.lang.String |
getPromptBoxText()
Returns the prompt box's text |
java.lang.String |
getPromptBoxTitle()
Returns the prompt box's title |
java.lang.String |
getSecondFormula()
Returns the second formula |
boolean |
getShowErrorBox()
|
boolean |
getShowPromptBox()
|
boolean |
getSurppressDropDownArrow()
Useful only list validation objects . |
void |
setDataValidationType(int data_type)
Set the type of this object |
void |
setEmptyCellAllowed(boolean allowed)
Sets if this object allows empty as a valid value |
void |
setErrorStyle(int error_style)
Sets the error style for error box |
void |
setExplicitListFormula(boolean explicit)
If this object has an explicit formula . |
void |
setFirstColumn(short first_column)
|
void |
setFirstFormula(java.lang.String formula)
Sets the first formula for this object . |
void |
setFirstRow(short first_row)
|
void |
setLastColumn(short last_column)
|
void |
setLastRow(short last_row)
|
void |
setOperator(int operator)
Sets the operator involved in the formula whic governs this object Example : if you wants that a cell to accept only values between 1 and 5 , which mathematically means 1 <= value <= 5 , then the operator should be OPERATOR_BETWEEN |
void |
setSecondFormula(java.lang.String formula)
Sets the first formula for this object . |
void |
setShowErrorBox(boolean show)
Sets the behaviour when an invalid value is entered |
void |
setShowPromptBox(boolean show)
Sets the behaviour when a cell which belongs to this object is selected |
void |
setSurppressDropDownArrow(boolean surppres)
Useful for list validation objects . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int DATA_TYPE_ANY
public static final int DATA_TYPE_INTEGER
public static final int DATA_TYPE_DECIMAL
public static final int DATA_TYPE_LIST
public static final int DATA_TYPE_DATE
public static final int DATA_TYPE_TIME
public static final int DATA_TYPE_TEXT_LENGTH
public static final int DATA_TYPE_FORMULA
public static final int ERROR_STYLE_STOP
public static final int ERROR_STYLE_WARNING
public static final int ERROR_STYLE_INFO
public static final int OPERATOR_BETWEEN
public static final int OPERATOR_NOT_BETWEEN
public static final int OPERATOR_EQUAL
public static final int OPERATOR_NOT_EQUAL
public static final int OPERATOR_GREATER_THAN
public static final int OPERATOR_LESS_THAN
public static final int OPERATOR_GREATER_OR_EQUAL
public static final int OPERATOR_LESS_OR_EQUAL
Constructor Detail |
---|
public HSSFDataValidation()
public HSSFDataValidation(short first_row, short first_col, short last_row, short last_col)
first_row
- First rowfirst_col
- First columnlast_row
- Last rowlast_col
- Last columnMethod Detail |
---|
public void setDataValidationType(int data_type)
data_type
- The typeDATA_TYPE_ANY, DATA_TYPE_INTEGER, DATA_TYPE_DECIMNAL, DATA_TYPE_LIST, DATA_TYPE_DATE,
DATA_TYPE_TIME, DATA_TYPE_TEXT_LENTGH, DATA_TYPE_FORMULA
public int getDataValidationType()
DATA_TYPE_ANY, DATA_TYPE_INTEGER, DATA_TYPE_DECIMNAL, DATA_TYPE_LIST, DATA_TYPE_DATE,
DATA_TYPE_TIME, DATA_TYPE_TEXT_LENTGH, DATA_TYPE_FORMULA
public void setErrorStyle(int error_style)
error_style
- Error style constantERROR_STYLE_STOP, ERROR_STYLE_WARNING, ERROR_STYLE_INFO
public int getErrorStyle()
ERROR_STYLE_STOP, ERROR_STYLE_WARNING, ERROR_STYLE_INFO
public void setExplicitListFormula(boolean explicit)
explicit
- True if use an explicit formulapublic boolean getExplicitListFormula()
setDataValidationType( int data_type )
public void setEmptyCellAllowed(boolean allowed)
allowed
- True if this object should treats empty as valid value , false otherwisepublic boolean getEmptyCellAllowed()
public void setSurppressDropDownArrow(boolean surppres)
surppres
- True if a list should display the values into a drop down list , false otherwise .
In other words , if a list should display the arrow sign on its right sidepublic boolean getSurppressDropDownArrow()
setDataValidationType( int data_type )
public void setShowPromptBox(boolean show)
show
- True if an prompt box should be displayed , false otherwisepublic boolean getShowPromptBox()
show
- True if an prompt box should be displayed , false otherwisepublic void setShowErrorBox(boolean show)
show
- True if an error box should be displayed , false otherwisepublic boolean getShowErrorBox()
public void setOperator(int operator)
operator
- A constant for operatorOPERATOR_BETWEEN, OPERATOR_NOT_BETWEEN, OPERATOR_EQUAL, OPERATOR_NOT_EQUAL
OPERATOR_GREATER_THAN, OPERATOR_LESS_THAN, OPERATOR_GREATER_OR_EQUAL,
OPERATOR_LESS_OR_EQUAL
public int getOperator()
OPERATOR_BETWEEN, OPERATOR_NOT_BETWEEN, OPERATOR_EQUAL, OPERATOR_NOT_EQUAL
OPERATOR_GREATER_THAN, OPERATOR_LESS_THAN, OPERATOR_GREATER_OR_EQUAL,
OPERATOR_LESS_OR_EQUAL
public void createPromptBox(java.lang.String title, java.lang.String text)
title
- The prompt box's titletext
- The prompt box's textsetShowPromptBox( boolean show )
public java.lang.String getPromptBoxTitle()
public java.lang.String getPromptBoxText()
public void createErrorBox(java.lang.String title, java.lang.String text)
title
- The error box's titletext
- The error box's textsetShowErrorBox( boolean show )
public java.lang.String getErrorBoxTitle()
public java.lang.String getErrorBoxText()
public void setFirstFormula(java.lang.String formula)
formula
- public java.lang.String getFirstFormula()
public void setSecondFormula(java.lang.String formula)
formula
- public java.lang.String getSecondFormula()
public void setFirstRow(short first_row)
public void setFirstColumn(short first_column)
public void setLastRow(short last_row)
public void setLastColumn(short last_column)
public short getFirstRow()
public short getFirstColumn()
public short getLastRow()
public short getLastColumn()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |