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

ColorScaleType

Enum Class ColorScaleType

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

public enum ColorScaleType extends Enum<ColorScaleType>
指定颜色刻度规则的类型。

将此枚举与 IFormatConditions.addColorScale(ColorScaleType) 一起使用,可以选择条件格式颜色刻度使用两种颜色还是三种颜色。


 IRange range = worksheet.getRange("A1:A5");
 range.setValue(new Object[][] {{10}, {20}, {30}, {40}, {50}});
 range.getFormatConditions().addColorScale(ColorScaleType.ThreeColorScale);
 
  • Enum Constant Details

    • TwoColorScale

      public static final ColorScaleType TwoColorScale
      指定双色刻度。
    • ThreeColorScale

      public static final ColorScaleType ThreeColorScale
      指定三色刻度。
  • Method Details

    • values

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