Package org.apache.poi.ss.usermodel
Enum Class TableStyleType
- All Implemented Interfaces:
Serializable
,Comparable<TableStyleType>
,Constable
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
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescription -
Method Summary
Modifier and TypeMethodDescriptionA range is returned only for the part of the table matching this enum instance and containing the given cell.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.final CellRangeAddressBase
getRange
(Table table, CellReference cell) static TableStyleType
Returns the enum constant of this class with the specified name.static TableStyleType[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
wholeTable
-
pageFieldLabels
-
pageFieldValues
-
firstColumnStripe
-
secondColumnStripe
-
firstRowStripe
-
secondRowStripe
-
lastColumn
-
firstColumn
-
headerRow
-
totalRow
-
firstHeaderCell
-
lastHeaderCell
-
firstTotalCell
-
lastTotalCell
-
firstSubtotalColumn
-
secondSubtotalColumn
-
thirdSubtotalColumn
-
blankRow
-
firstSubtotalRow
-
secondSubtotalRow
-
thirdSubtotalRow
-
firstColumnSubheading
-
secondColumnSubheading
-
thirdColumnSubheading
-
firstRowSubheading
-
secondRowSubheading
-
thirdRowSubheading
-
-
Method Details
-
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
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 nameNullPointerException
- if the argument is null
-
appliesTo
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
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 evaluatecell
- 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
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
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 evaluatecell
- 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
CallsgetRange(Table, CellReference)
. Use that instead for performance.- Parameters:
table
-cell
-- Returns:
- default is unimplemented/null
- See Also:
-
getRange
- Parameters:
table
-cell
-- Returns:
- default is unimplemented/null
-