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

BordersIndex

Enum Class BordersIndex

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

public enum BordersIndex extends Enum<BordersIndex>
指定要获取单元格或区域的哪个边框。

将此枚举与 IBorders.get(BordersIndex) 一起使用,以访问区域的特定边缘、内部边框或对角线边框,并应用各自的边框设置。


 IRange range = worksheet.getRange("B2:C3");
 range.getBorders().setLineStyle(BorderLineStyle.Thin);
 range.getBorders().get(BordersIndex.InsideHorizontal).setLineStyle(BorderLineStyle.Double);
 range.getBorders().get(BordersIndex.EdgeBottom).setColor(Color.GetBlue());
 
  • Enum Constant Details

    • DiagonalDown

      public static final BordersIndex DiagonalDown
      指定边框从范围中每个单元格的左上角延伸到右下角。
    • DiagonalUp

      public static final BordersIndex DiagonalUp
      指定边框从范围中每个单元格的左下角延伸到右上角。
    • EdgeBottom

      public static final BordersIndex EdgeBottom
      指定边框位于范围底部。
    • EdgeLeft

      public static final BordersIndex EdgeLeft
      指定边框位于范围的最左侧边缘。
    • EdgeRight

      public static final BordersIndex EdgeRight
      指定边框位于范围右侧边缘。
    • EdgeTop

      public static final BordersIndex EdgeTop
      指定边框位于范围顶部。
    • InsideHorizontal

      public static final BordersIndex InsideHorizontal
      指定范围内所有单元格都有水平边框,但范围外部的边框除外。
    • InsideVertical

      public static final BordersIndex InsideVertical
      指定范围内的所有单元格都有垂直边框,但范围外的边框除外。
  • Method Details

    • values

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