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

GradientFillType

Enum Class GradientFillType

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

public enum GradientFillType extends Enum<GradientFillType>
指定渐变填充的类型。

使用此枚举可以区分无渐变填充、线性渐变和路径渐变。线性渐变沿一条线过渡颜色,而路径渐变在由其边界设置定义的矩形路径内过渡颜色。


 GradientFillType fillType = GradientFillType.valueOf("Linear");
 if (fillType == GradientFillType.Linear) {
     worksheet.getRange("A1").setValue("Linear gradient fill");
 }
 
  • Enum Constant Details

    • None

      public static final GradientFillType None
      指定不应用渐变填充。
    • Linear

      public static final GradientFillType Linear
      指定此渐变填充为线性渐变类型。线性渐变类型意味着从一种颜色过渡到另一种颜色是沿着一条线进行的。
    • Path

      public static final GradientFillType Path
      指定路径渐变填充。

      在路径渐变填充中,从一种颜色到下一种颜色的过渡边界是由渐变填充的 top、bottom、left 和 right 属性定义的矩形。

  • Method Details

    • values

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