[]
        
(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>
Specifies the icon used in message boxes displayed during validation.

Use this enum with data validation APIs such as IValidation.add(ValidationType,ValidationAlertStyle,ValidationOperator,Object,Object) and IValidation.setAlertStyle(ValidationAlertStyle) to control whether the validation alert is shown with a stop, warning, or information icon.


 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
      Specifies the stop icon used in data validation alert message boxes.
    • Warning

      public static final ValidationAlertStyle Warning
      Specifies the warning icon displayed in the validation error alert.
    • Information

      public static final ValidationAlertStyle Information
      Specifies the information icon displayed in the validation error alert.
  • 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