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

UnderlineType

Enum Class UnderlineType

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

public enum UnderlineType extends Enum<UnderlineType>
指定文本的下划线样式。

将此枚举与 IFont.setUnderline(UnderlineType) 一起使用,可以控制文本是否不使用下划线、使用单下划线、双下划线或会计下划线样式。


 IRange cell = worksheet.getRange("A1");
 cell.setValue("Total");
 cell.getFont().setUnderline(UnderlineType.DoubleAccounting);
 
  • Enum Constant Details

    • None

      public static final UnderlineType None
      指定文本不带下划线。
    • Single

      public static final UnderlineType Single
      指定文本具有单下划线。
    • Double

      public static final UnderlineType Double
      指定文本具有双下划线。
    • SingleAccounting

      public static final UnderlineType SingleAccounting
      指定文本具有单会计下划线,这会为整个单元格添加下划线,而不仅是文本本身。
    • DoubleAccounting

      public static final UnderlineType DoubleAccounting
      指定文本具有双重会计下划线,这将导致整个单元格被下划线而不是仅单元格文本。
  • Method Details

    • values

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