org.apache.poi.ss.usermodel

## Enum TableStyleType

- java.lang.Object
- - java.lang.Enum<TableStyleType>
  - - org.apache.poi.ss.usermodel.TableStyleType

- All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<TableStyleType>

      public enum TableStyleType
      extends java.lang.Enum<TableStyleType>

  Ordered list of table style elements, for both data tables and pivot tables. Some elements only apply to pivot tables, but any style definition can omit any number, so having them in one list should not be a problem.

  The order is the specification order of application, with later elements overriding previous ones, if style properties conflict.

  Processing could iterate bottom-up if looking for specific properties, and stop when the first style is found defining a value for that property.

  Enum names match the OOXML spec values exactly, so `valueOf(String)` will work.

  Since:
    3.17 beta 1

- - ### Enum Constant Summary

    Enum Constants
    Enum Constant and Description
    `blankRow`
    `firstColumn`
    `firstColumnStripe`
    `firstColumnSubheading`
    `firstHeaderCell`
    `firstRowStripe`
    `firstRowSubheading`
    `firstSubtotalColumn`
    `firstSubtotalRow`
    `firstTotalCell`
    `headerRow`
    `lastColumn`
    `lastHeaderCell`
    `lastTotalCell`
    `pageFieldLabels`
    `pageFieldValues`
    `secondColumnStripe`
    `secondColumnSubheading`
    `secondRowStripe`
    `secondRowSubheading`
    `secondSubtotalColumn`
    `secondSubtotalRow`
    `thirdColumnSubheading`
    `thirdRowSubheading`
    `thirdSubtotalColumn`
    `thirdSubtotalRow`
    `totalRow`
    `wholeTable`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `CellRangeAddressBase` | `appliesTo(Table table, Cell cell)` A range is returned only for the part of the table matching this enum instance and containing the given cell.
    `CellRangeAddressBase` | `appliesTo(Table table, CellReference cell)` A range is returned only for the part of the table matching this enum instance and containing the given cell reference.
    `CellRangeAddressBase` | `getRange(Table table, Cell cell)` Calls `getRange(Table, CellReference)`.
    `CellRangeAddressBase` | `getRange(Table table, CellReference cell)`
    `static TableStyleType` | `valueOf(java.lang.String name)` Returns the enum constant of this type with the specified name.
    `static TableStyleType[]` | `values()` Returns an array containing the constants of this enum type, in the order they are declared.

    - ### Methods inherited from class java.lang.Enum

      `clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

    - ### Methods inherited from class java.lang.Object

      `getClass, notify, notifyAll, wait, wait, wait`

- - ### Enum Constant Detail

    - #### wholeTable

          public static final TableStyleType wholeTable

    - #### pageFieldLabels

          public static final TableStyleType pageFieldLabels

    - #### pageFieldValues

          public static final TableStyleType pageFieldValues

    - #### firstColumnStripe

          public static final TableStyleType firstColumnStripe

    - #### secondColumnStripe

          public static final TableStyleType secondColumnStripe

    - #### firstRowStripe

          public static final TableStyleType firstRowStripe

    - #### secondRowStripe

          public static final TableStyleType secondRowStripe

    - #### lastColumn

          public static final TableStyleType lastColumn

    - #### firstColumn

          public static final TableStyleType firstColumn

    - #### headerRow

          public static final TableStyleType headerRow

    - #### totalRow

          public static final TableStyleType totalRow

    - #### firstHeaderCell

          public static final TableStyleType firstHeaderCell

    - #### lastHeaderCell

          public static final TableStyleType lastHeaderCell

    - #### firstTotalCell

          public static final TableStyleType firstTotalCell

    - #### lastTotalCell

          public static final TableStyleType lastTotalCell

    - #### firstSubtotalColumn

          public static final TableStyleType firstSubtotalColumn

    - #### secondSubtotalColumn

          public static final TableStyleType secondSubtotalColumn

    - #### thirdSubtotalColumn

          public static final TableStyleType thirdSubtotalColumn

    - #### blankRow

          public static final TableStyleType blankRow

    - #### firstSubtotalRow

          public static final TableStyleType firstSubtotalRow

    - #### secondSubtotalRow

          public static final TableStyleType secondSubtotalRow

    - #### thirdSubtotalRow

          public static final TableStyleType thirdSubtotalRow

    - #### firstColumnSubheading

          public static final TableStyleType firstColumnSubheading

    - #### secondColumnSubheading

          public static final TableStyleType secondColumnSubheading

    - #### thirdColumnSubheading

          public static final TableStyleType thirdColumnSubheading

    - #### firstRowSubheading

          public static final TableStyleType firstRowSubheading

    - #### secondRowSubheading

          public static final TableStyleType secondRowSubheading

    - #### thirdRowSubheading

          public static final TableStyleType thirdRowSubheading

  - ### Method Detail

    - #### values

          public static TableStyleType[] values()

      Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:

          for (TableStyleType c : TableStyleType.values())
              System.out.println(c);

      Returns:
        an array containing the constants of this enum type, in the order they are declared

    - #### valueOf

          public static TableStyleType valueOf(java.lang.String name)

      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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:
        `java.lang.IllegalArgumentException` - if this enum type has no constant with the specified name
        `java.lang.NullPointerException` - if the argument is null

    - #### appliesTo

          public CellRangeAddressBase appliesTo(Table table,
                                                Cell cell)

      A range is returned only for the part of the table matching this enum instance and containing the given cell. Null is returned for all other cases, such as:
      - Cell on a different sheet than the table
      - Cell outside the table
      - this Enum part is not included in the table (i.e. no header/totals row)
      - this Enum is for a table part not yet implemented in POI, such as pivot table elements
      The returned range can be used to determine how style options may or may not apply to this cell. For example, `wholeTable` borders only apply to the outer boundary of a table, while the rest of the styling, such as font and color, could apply to all the interior cells as well.
      Parameters:
        `table` - table to evaluate
        `cell` - to evaluate
      Returns:
        range in the table representing this class of cells, if it contains the given cell, or null if not applicable. Stripe style types return only the stripe range containing the given cell, or null.

    - #### appliesTo

          public CellRangeAddressBase appliesTo(Table table,
                                                CellReference cell)

      A range is returned only for the part of the table matching this enum instance and containing the given cell reference. Null is returned for all other cases, such as:
      - Cell on a different sheet than the table
      - Cell outside the table
      - this Enum part is not included in the table (i.e. no header/totals row)
      - this Enum is for a table part not yet implemented in POI, such as pivot table elements
      The returned range can be used to determine how style options may or may not apply to this cell. For example, `wholeTable` borders only apply to the outer boundary of a table, while the rest of the styling, such as font and color, could apply to all the interior cells as well.
      Parameters:
        `table` - table to evaluate
        `cell` - CellReference to evaluate
      Returns:
        range in the table representing this class of cells, if it contains the given cell, or null if not applicable. Stripe style types return only the stripe range containing the given cell, or null.

    - #### getRange

          public final CellRangeAddressBase getRange(Table table,
                                                     Cell cell)

      Calls `getRange(Table, CellReference)`. Use that instead for performance.
      Parameters:
        `table` -
        `cell` -
      Returns:
        default is unimplemented/null
      See Also:
        `getRange(Table, CellReference)`

    - #### getRange

          public CellRangeAddressBase getRange(Table table,
                                               CellReference cell)

      Parameters:
        `table` -
        `cell` -
      Returns:
        default is unimplemented/null

Copyright 2020 The Apache Software Foundation or its licensors, as applicable.