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

TableStyleElementType

Enum Class TableStyleElementType

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

public enum TableStyleElementType extends Enum<TableStyleElementType>
指定表样式元素的类型。

使用此枚举可标识表、数据透视表、切片器或时间线样式中的特定部分,例如整个表、标题行、汇总行、条纹行或特殊选择状态。它通常与 ITableStyleElements.get(TableStyleElementType)一起使用,以访问对应的 ITableStyleElement。


 ITableStyle tableStyle = workbook.getTableStyles().add("CustomStyle");
 ITableStyleElement headerRow = tableStyle.getTableStyleElements().get(TableStyleElementType.HeaderRow);
 headerRow.getInterior().setColor(Color.GetBlue());
 Color headerColor = headerRow.getInterior().getColor();
 
  • Enum Constant Details

    • WholeTable

      public static final TableStyleElementType WholeTable
      指定整个表区域。

      此元素用于定义应用于整个表的基本格式,不包括可单独设置样式的更具体区域,例如标题行、汇总行或条纹区域。

    • HeaderRow

      public static final TableStyleElementType HeaderRow
      指定应用于表标题行的样式元素。
    • TotalRow

      public static final TableStyleElementType TotalRow
      指定应用于表汇总行的样式元素。

      此元素表示表底部显示汇总值或聚合值的行,并在专门为该行定义格式时使用。

    • GrandTotalRow

      public static final TableStyleElementType GrandTotalRow
      指定数据透视表样式中的总计行区域。

      此元素用于定义应用于显示整个数据透视表总计值的行的格式。

    • FirstColumn

      public static final TableStyleElementType FirstColumn
      指定启用第一列格式时表第一列的样式元素。
    • LastColumn

      public static final TableStyleElementType LastColumn
      指定最后一列的样式元素。

      当表或数据透视表样式配置为突出显示最后一列时,此元素表示应用于最右侧列的格式。

    • GrandTotalColumn

      public static final TableStyleElementType GrandTotalColumn
      指定数据透视表样式中的总计列区域。

      此元素用于为数据透视表中显示总计值的列应用格式。

    • FirstRowStripe

      public static final TableStyleElementType FirstRowStripe
      指定第一个行条纹格式元素。

      此元素定义表或 PivotTable 样式中应用于交替行条纹图案中第一个带的样式。

    • SecondRowStripe

      public static final TableStyleElementType SecondRowStripe
      指定第二个行条纹带。
    • FirstColumnStripe

      public static final TableStyleElementType FirstColumnStripe
      指定表或数据透视表样式中的第一个带状列条纹元素。

      使用列条纹时,此元素定义应用于交替列带状图案中第一个条纹的格式。

    • SecondColumnStripe

      public static final TableStyleElementType SecondColumnStripe
      指定表或数据透视表样式中的第二个列条纹元素。

      启用带状列时,此元素用于定义应用于第二个交替列带的格式。

    • FirstHeaderCell

      public static final TableStyleElementType FirstHeaderCell
      指定标题区域中的第一个单元格,用于为表或数据透视表的起始标题单元格应用不同的样式。
    • LastHeaderCell

      public static final TableStyleElementType LastHeaderCell
      指定表标题行中最后一个单元格的样式元素。

      使用此值可标识或自定义表样式中应用于最后一列标题单元格的格式。

    • FirstTotalCell

      public static final TableStyleElementType FirstTotalCell
      指定表样式中汇总行的第一个单元格。
    • LastTotalCell

      public static final TableStyleElementType LastTotalCell
      指定表汇总行中的最后一个单元格。

      此元素用于定义专门应用于表汇总行最右侧单元格的样式,使其可以不同于汇总行的其余部分或不同于 FirstTotalCell。

    • FirstSubtotalColumn

      public static final TableStyleElementType FirstSubtotalColumn
      指定将格式应用于 PivotTable 中第一个小计列的表样式元素。
    • SecondSubtotalColumn

      public static final TableStyleElementType SecondSubtotalColumn
      指定 PivotTable 样式中的第二个小计列。

      当 PivotTable 显示列小计时,此元素标识应用于第二级小计列的样式区域。

    • ThirdSubtotalColumn

      public static final TableStyleElementType ThirdSubtotalColumn
      指定 PivotTable 样式中的第三个小计列元素。

      使用此元素类型可以定义应用于 PivotTable 中第三个小计列的格式。

    • FirstSubtotalRow

      public static final TableStyleElementType FirstSubtotalRow
      指定 PivotTable 中的第一个小计行。
    • SecondSubtotalRow

      public static final TableStyleElementType SecondSubtotalRow
      指定应用于 PivotTable 中第二个小计行的表样式元素。
    • ThirdSubtotalRow

      public static final TableStyleElementType ThirdSubtotalRow
      指定数据透视表中第三个小计行的样式元素。
    • BlankRow

      public static final TableStyleElementType BlankRow
      指定插入 PivotTable 布局中的空白行的样式元素。
    • FirstColumnSubheading

      public static final TableStyleElementType FirstColumnSubheading
      指定 PivotTable 中第一列副标题级别的样式元素。
    • SecondColumnSubheading

      public static final TableStyleElementType SecondColumnSubheading
      指定 PivotTable 样式中的第二列副标题。
    • ThirdColumnSubheading

      public static final TableStyleElementType ThirdColumnSubheading
      指定 PivotTable 中的第三列副标题。
    • FirstRowSubheading

      public static final TableStyleElementType FirstRowSubheading
      指定应用于 PivotTable 中第一行副标题区域的样式元素。
    • SecondRowSubheading

      public static final TableStyleElementType SecondRowSubheading
      指定应用于 PivotTable 中第二行副标题区域的样式元素。
    • ThirdRowSubheading

      public static final TableStyleElementType ThirdRowSubheading
      指定 PivotTable 中第三行副标题的样式元素。
    • PageFieldLabels

      public static final TableStyleElementType PageFieldLabels
      指定应用于数据透视表中页字段标签的表样式元素。
    • PageFieldValues

      public static final TableStyleElementType PageFieldValues
      指定 PivotTable 中页字段的值区域。

      此样式元素应用于显示当前页字段值的单元格,而不是页字段标签。

    • UnselectedItemWithData

      public static final TableStyleElementType UnselectedItemWithData
      指定包含数据且未选中的切片器项。
    • UnselectedItemWithNoData

      public static final TableStyleElementType UnselectedItemWithNoData
      指定未选中且不包含数据的切片器项的样式元素。

      使用此值可以定义不可用切片器项在其正常未选中状态下的外观。

    • SelectedItemWithData

      public static final TableStyleElementType SelectedItemWithData
      指定包含数据的选中切片器项的样式元素。
    • SelectedItemWithNoData

      public static final TableStyleElementType SelectedItemWithNoData
      指定不包含数据的选中切片器项。
    • HoveredUnselectedItemWithData

      public static final TableStyleElementType HoveredUnselectedItemWithData
      指定包含数据、当前被用户悬停但未选中的切片器项。
    • HoveredSelectedItemWithData

      public static final TableStyleElementType HoveredSelectedItemWithData
      指定一个包含数据的项目,该项目被用户悬停选中。
    • HoveredUnselectedItemWithNoData

      public static final TableStyleElementType HoveredUnselectedItemWithNoData
      指定用户悬停、未选中且不包含数据的项。
    • HoveredSelectedItemWithNoData

      public static final TableStyleElementType HoveredSelectedItemWithNoData
      指定一个不包含数据且当前正被用户悬停的选中项。
    • TimelineSelectionLabel

      public static final TableStyleElementType TimelineSelectionLabel
      指定时间线选择标签。
    • TimelineTimeLevel

      public static final TableStyleElementType TimelineTimeLevel
      指定时间线级别。
    • TimelinePeriodLabels1

      public static final TableStyleElementType TimelinePeriodLabels1
      指定时间线周期标签。
    • TimelinePeriodLabels2

      public static final TableStyleElementType TimelinePeriodLabels2
      指定附加的时间线周期标签。
    • TimelineSelectedTimeBlock

      public static final TableStyleElementType TimelineSelectedTimeBlock
      指定选中的时间线时间块。
    • TimelineUnselectedTimeBlock

      public static final TableStyleElementType TimelineUnselectedTimeBlock
      指定未选中的时间线时间块。
    • TimelineSelectedTimeBlockSpace

      public static final TableStyleElementType TimelineSelectedTimeBlockSpace
      指定选中的时间线时间块间距。
  • Method Details

    • values

      public static TableStyleElementType[] 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 TableStyleElementType 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
    • getValue

      public int getValue()
    • forValue

      public static TableStyleElementType forValue(int value)