[]
        
首页
开发者学堂
文档
论坛
市场
生态机会
活动
立即试用
(Showing Draft Content)

ValidationAlertStyle

Enum Class ValidationAlertStyle

java.lang.Object
java.lang.Enum<ValidationAlertStyle>
com.grapecity.documents.excel.ValidationAlertStyle
All Implemented Interfaces:
Serializable, Comparable<ValidationAlertStyle>, Constable

public enum ValidationAlertStyle extends Enum<ValidationAlertStyle>
指定验证期间显示的消息框中使用的图标。

将此枚举与数据验证 API(如 IValidation.add(ValidationType,ValidationAlertStyle,ValidationOperator,Object,Object) 和 IValidation.setAlertStyle(ValidationAlertStyle))一起使用,以控制验证警告显示为停止、警告还是信息图标。


 IValidation validation = worksheet.getRange("A1").getValidation();
 validation.add(ValidationType.Whole, ValidationAlertStyle.Stop, ValidationOperator.Between, 1, 10);
 validation.setAlertStyle(ValidationAlertStyle.Warning);
 
  • Enum Constant Details

    • Stop

      public static final ValidationAlertStyle Stop
      指定数据验证警告消息框中使用的停止图标。
    • Warning

      public static final ValidationAlertStyle Warning
      指定数据验证错误警告中显示的警告图标。
    • Information

      public static final ValidationAlertStyle Information
      指定数据验证错误警告中显示的信息图标。
  • Method Details

    • values

      public static ValidationAlertStyle[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static ValidationAlertStyle valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null