Top Inners Methods
org.apache.poi.ss.usermodel

public Interface DataValidation

Known Direct Implementers
org.apache.poi.hssf.usermodel.HSSFDataValidation
Imports
org.apache.poi.ss.util.CellRangeAddressList

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
DataValidation.ErrorStyle

Error style constants for error box

Method Summary

Modifier and TypeMethod and Description
public void
createErrorBox(String
The error box's title
title
,
String
The error box's text
text
)

Sets the title and text for the error box .

public void
createPromptBox(String
The prompt box's title
title
,
String
The prompt box's text
text
)

Sets the title and text for the prompt box .

public boolean

Returns:

True if this object should treats empty as valid value , false otherwise
getEmptyCellAllowed
()

Retrieve the settings for empty cells allowed

public String

Returns:

Error box's text or null
getErrorBoxText
()

public String

Returns:

Error box's title or null
getErrorBoxTitle
()

public int

Returns:

the error style of error box
getErrorStyle
()

o

public String

Returns:

Prompt box's text or null
getPromptBoxText
()

public String

Returns:

Prompt box's title or null
getPromptBoxTitle
()

public CellRangeAddressList
public boolean

Returns:

true if an error box should be displayed , false otherwise
getShowErrorBox
()

public boolean

Returns:

true if an prompt box should be displayed , false otherwise
getShowPromptBox
()

public boolean

Returns:

true if a list should display the values into a drop down list , false otherwise .
getSuppressDropDownArrow
()

Useful only list validation objects .

public DataValidationConstraint
public void
setEmptyCellAllowed(boolean
true if this object should treats empty as valid value , false otherwise
allowed
)

Sets if this object allows empty as a valid value

public void
setErrorStyle(int error_style)

Sets the error style for error box

public void
setShowErrorBox(boolean
true if an error box should be displayed , false otherwise
show
)

Sets the behaviour when an invalid value is entered

public void
setShowPromptBox(boolean
true if an prompt box should be displayed , false otherwise
show
)

Sets the behaviour when a cell which belongs to this object is selected

public void
setSuppressDropDownArrow(boolean
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 side
suppress
)

Useful for list validation objects .

Method Detail

createErrorBoxback to summary
public void createErrorBox(String title, String text)

Sets the title and text for the error box . Error box is displayed when the user enters an invalid value int o a cell which belongs to this validation object . In order for an error box to be displayed you should also use method setShowErrorBox( boolean show )

Parameters
title:String

The error box's title

text:String

The error box's text

createPromptBoxback to summary
public void createPromptBox(String title, String text)

Sets the title and text for the prompt box . Prompt box is displayed when the user selects a cell which belongs to this validation object . In order for a prompt box to be displayed you should also use method setShowPromptBox( boolean show )

Parameters
title:String

The prompt box's title

text:String

The prompt box's text

getEmptyCellAllowedback to summary
public boolean getEmptyCellAllowed()

Retrieve the settings for empty cells allowed

Returns:boolean

True if this object should treats empty as valid value , false otherwise

getErrorBoxTextback to summary
public String getErrorBoxText()
Returns:String

Error box's text or null

getErrorBoxTitleback to summary
public String getErrorBoxTitle()
Returns:String

Error box's title or null

getErrorStyleback to summary
public int getErrorStyle()

o

Returns:int

the error style of error box

See Also
ErrorStyle
getPromptBoxTextback to summary
public String getPromptBoxText()
Returns:String

Prompt box's text or null

getPromptBoxTitleback to summary
public String getPromptBoxTitle()
Returns:String

Prompt box's title or null

getRegionsback to summary
public CellRangeAddressList getRegions()
getShowErrorBoxback to summary
public boolean getShowErrorBox()
Returns:boolean

true if an error box should be displayed , false otherwise

getShowPromptBoxback to summary
public boolean getShowPromptBox()
Returns:boolean

true if an prompt box should be displayed , false otherwise

getSuppressDropDownArrowback to summary
public boolean getSuppressDropDownArrow()

Useful only list validation objects . This method always returns false if the object isn't a list validation object

Returns:boolean

true if a list should display the values into a drop down list , false otherwise .

getValidationConstraintback to summary
public DataValidationConstraint getValidationConstraint()
setEmptyCellAllowedback to summary
public void setEmptyCellAllowed(boolean allowed)

Sets if this object allows empty as a valid value

Parameters
allowed:boolean

true if this object should treats empty as valid value , false otherwise

setErrorStyleback to summary
public void setErrorStyle(int error_style)

Sets the error style for error box

See Also
ErrorStyle
setShowErrorBoxback to summary
public void setShowErrorBox(boolean show)

Sets the behaviour when an invalid value is entered

Parameters
show:boolean

true if an error box should be displayed , false otherwise

setShowPromptBoxback to summary
public void setShowPromptBox(boolean show)

Sets the behaviour when a cell which belongs to this object is selected

Parameters
show:boolean

true if an prompt box should be displayed , false otherwise

setSuppressDropDownArrowback to summary
public void setSuppressDropDownArrow(boolean suppress)

Useful for list validation objects .

Parameters
suppress:boolean

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 side

org.apache.poi.ss.usermodel back to summary

public final Class DataValidation.ErrorStyle

extends Object
Class Inheritance

Error style constants for error box

Field Summary

Modifier and TypeField and Description
public static final int
INFO

INFO style

public static final int
STOP

STOP style

public static final int
WARNING

WARNING style

Constructor Summary

AccessConstructor and Description
public

Method Summary

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

INFOback to summary
public static final int INFO

INFO style

STOPback to summary
public static final int STOP

STOP style

WARNINGback to summary
public static final int WARNING

WARNING style

Constructor Detail

ErrorStyleback to summary
public ErrorStyle()