Package org.apache.poi.ss.usermodel
Enum TableStyleType
- java.lang.Object
-
- java.lang.Enum<TableStyleType>
-
- org.apache.poi.ss.usermodel.TableStyleType
-
- All Implemented Interfaces:
Serializable
,Comparable<TableStyleType>
public enum TableStyleType extends 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
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method 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)
CellRangeAddressBase
getRange(Table table, CellReference cell)
static TableStyleType
valueOf(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.
-
-
-
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(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:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- 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
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
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
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
public final CellRangeAddressBase getRange(Table table, Cell cell)
CallsgetRange(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
-
-