public class XSSFDataValidation extends java.lang.Object implements DataValidation
DataValidation.ErrorStyle| Constructor and Description |
|---|
XSSFDataValidation(XSSFDataValidationConstraint constraint, CellRangeAddressList regions, org.openxmlformats.schemas.spreadsheetml.x2006.main.CTDataValidation ctDataValidation) |
| Modifier and Type | Method and Description |
|---|---|
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 .
(设置提示框的标题和文本。)
|
boolean |
getEmptyCellAllowed()
Retrieve the settings for empty cells allowed
(检索允许的空单元格的设置)
|
java.lang.String |
getErrorBoxText() |
java.lang.String |
getErrorBoxTitle() |
int |
getErrorStyle()
o
(这)
|
java.lang.String |
getPromptBoxText() |
java.lang.String |
getPromptBoxTitle() |
CellRangeAddressList |
getRegions() |
boolean |
getShowErrorBox() |
boolean |
getShowPromptBox() |
boolean |
getSuppressDropDownArrow()
Useful only list validation objects .
(仅列出验证对象有用。)
|
DataValidationConstraint |
getValidationConstraint() |
java.lang.String |
prettyPrint() |
void |
setEmptyCellAllowed(boolean allowed)
Sets if this object allows empty as a valid value
(设置此对象是否允许空作为有效值)
|
void |
setErrorStyle(int errorStyle)
Sets the error style for error box
(设置错误框的错误样式)
|
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 |
setSuppressDropDownArrow(boolean suppress)
Useful for list validation objects .
(对列表验证对象很有用。)
|
public XSSFDataValidation(XSSFDataValidationConstraint constraint, CellRangeAddressList regions, org.openxmlformats.schemas.spreadsheetml.x2006.main.CTDataValidation ctDataValidation)
public void createErrorBox(java.lang.String title,
java.lang.String text)
DataValidation
createErrorBox in interface
DataValidation
(接口 DataValidation 中的 createErrorBox)
title - The error box's title
(title - 错误框的标题)
text - The error box's text
(text - 错误框的文本)
public void createPromptBox(java.lang.String title,
java.lang.String text)
DataValidation
createPromptBox in interface
DataValidation
(接口 DataValidation 中的 createPromptBox)
title - The prompt box's title
(title - 提示框的标题)
text - The prompt box's text
(text - 提示框的文本)
public boolean getEmptyCellAllowed()
DataValidation
getEmptyCellAllowed in interface
DataValidation
(接口 DataValidation 中的 getEmptyCellAllowed)
public java.lang.String getErrorBoxText()
getErrorBoxText in interface
DataValidation
(DataValidation 接口中的 getErrorBoxText)
null
(错误框的文本或 null)
public java.lang.String getErrorBoxTitle()
getErrorBoxTitle in interface
DataValidation
(DataValidation 接口中的 getErrorBoxTitle)
null
(错误框的标题或 null)
public int getErrorStyle()
DataValidation
getErrorStyle in interface
DataValidation
(DataValidation 接口中的 getErrorStyle)
DataValidation.ErrorStyle
public java.lang.String getPromptBoxText()
getPromptBoxText in interface
DataValidation
(接口 DataValidation 中的 getPromptBoxText)
null
(提示框的文本或 null)
public java.lang.String getPromptBoxTitle()
getPromptBoxTitle in interface
DataValidation
(接口 DataValidation 中的 getPromptBoxTitle)
null
(提示框的标题或 null)
public boolean getShowErrorBox()
getShowErrorBox in interface
DataValidation
(接口 DataValidation 中的 getShowErrorBox)
true if an error box should be displayed ,
false otherwise
(如果应显示错误框,则为 true ,否则为 false)
public boolean getShowPromptBox()
getShowPromptBox in interface
DataValidation
(接口 DataValidation 中的 getShowPromptBox)
true if an prompt box should be displayed ,
false otherwise
(如果应显示提示框,则为 true ,否则为 false)
public boolean getSuppressDropDownArrow()
DataValidation
getSuppressDropDownArrow in interface
DataValidation
(接口 DataValidation 中的 getSuppressDropDownArrow)
true if a list should display the values into a drop down list ,
false otherwise .
(如果列表应将值显示到下拉列表中,则为 true,否则为 false。)
public DataValidationConstraint getValidationConstraint()
getValidationConstraint in interface
DataValidation
(接口 DataValidation 中的 getValidationConstraint)
public void setEmptyCellAllowed(boolean allowed)
DataValidation
setEmptyCellAllowed in interface
DataValidation
(接口 DataValidation 中的 setEmptyCellAllowed)
allowed -
true if this object should treats empty as valid value ,
false otherwise
(allowed - 如果此对象应将空视为有效值,则为 true,否则为 false)
public void setErrorStyle(int errorStyle)
DataValidation
setErrorStyle in interface
DataValidation
(接口 DataValidation 中的 setErrorStyle)
DataValidation.ErrorStyle
public void setShowErrorBox(boolean show)
DataValidation
setShowErrorBox in interface
DataValidation
(接口 DataValidation 中的 setShowErrorBox)
show -
true if an error box should be displayed ,
false otherwise
(show - 如果应该显示错误框,则为 true,否则为 false)
public void setShowPromptBox(boolean show)
DataValidation
setShowPromptBox in interface
DataValidation
(接口 DataValidation 中的 setShowPromptBox)
show -
true if an prompt box should be displayed ,
false otherwise
(show - 如果应显示提示框,则为 true,否则为 false)
public void setSuppressDropDownArrow(boolean suppress)
DataValidation
setSuppressDropDownArrow in interface
DataValidation
(接口 DataValidation 中的 setSuppressDropDownArrow)
suppress - 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 - 如果列表应将值显示到下拉列表中,则为 True,否则为 false。换句话说,如果列表应该在其右侧显示箭头符号)
public CellRangeAddressList getRegions()
getRegions in interface
DataValidation
(接口 DataValidation 中的 getRegions)
public java.lang.String prettyPrint()
Copyright 2021 The Apache Software Foundation or its licensors, as applicable.