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

DataBarNegativeColorType

Enum Class DataBarNegativeColorType

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

public enum DataBarNegativeColorType extends Enum<DataBarNegativeColorType>
指定负值数据条是使用专用颜色,还是使用与正值数据条相同的颜色。

此枚举由 INegativeBarFormat 使用,用于控制数据条条件格式规则中负值的填充颜色和边框颜色行为。


 IDataBar dataBar = worksheet.getRange("A1:A4").getFormatConditions().addDatabar();
 INegativeBarFormat negativeBarFormat = dataBar.getNegativeBarFormat();
 negativeBarFormat.setColorType(DataBarNegativeColorType.SameAsPositive);
 negativeBarFormat.setBorderColorType(DataBarNegativeColorType.Color);
 
  • Enum Constant Details

    • Color

      public static final DataBarNegativeColorType Color
      使用为负值数据条指定的专用颜色,而不是正值数据条颜色。
    • SameAsPositive

      public static final DataBarNegativeColorType SameAsPositive
      负值数据条使用与正值数据条相同的颜色。
  • Method Details

    • values

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