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

CellControlType

Enum Class CellControlType

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

public enum CellControlType extends Enum<CellControlType>
指定应用于区域的单元格控件类型。

单元格控件是区域上的格式属性,用于定义复选框等交互行为。使用 ICellControl.getType() 可检索给定区域的控件类型。

示例:


 IRange range = worksheet.getRange("A1");
 range.setValue(true);
 range.getCellControl().setCheckbox();
 CellControlType type = range.getCellControl().getType();
 
  • Enum Constant Details

    • None

      public static final CellControlType None
      表示单元格控件的默认类型。对于未应用单元格控件格式的区域,其类型返回为 None。
    • Unknown

      public static final CellControlType Unknown
      表示为兼容未来单元格控件对象而保留的类型。
    • Checkbox

      public static final CellControlType Checkbox
      表示单元格控件类型为复选框。
  • Method Details

    • values

      public static CellControlType[] 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 CellControlType 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