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

DataBarDirection

Enum Class DataBarDirection

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

public enum DataBarDirection extends Enum<DataBarDirection>
指定数据条的方向。

将此枚举与 IDataBar.setDirection(DataBarDirection) 一起使用,可以控制使用数据条条件格式的单元格中数据条的显示方式。


 worksheet.getRange("A1:A3").setValue(new Object[][] {{10}, {20}, {30}});
 IDataBar dataBar = worksheet.getRange("A1:A3").getFormatConditions().addDatabar();
 dataBar.setDirection(DataBarDirection.RightToLeft);
 DataBarDirection direction = dataBar.getDirection();
 
  • Enum Constant Details

    • Context

      public static final DataBarDirection Context
      指定数据条方向继承自当前上下文。
    • LeftToRight

      public static final DataBarDirection LeftToRight
      指定数据条从左到右显示。
    • RightToLeft

      public static final DataBarDirection RightToLeft
      指定数据条从右到左显示。
  • Method Details

    • values

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