Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.poi.xssf.usermodel
Class XSSFTableStyle

    java.lang.Object
      org.apache.poi.xssf.usermodel.XSSFTableStyle

All Implemented Interfaces:
  TableStyle

    public class XSSFTableStyle

extends java.lang.Object
implements TableStyle

`TableStyle` implementation for styles defined in the OOXML styles.xml. Also used for built-in styles via dummy XML generated from presetTableStyles.xml.

Constructor Summary
`XSSFTableStyle(int index, org.openxmlformats.schemas.spreadsheetml.x2006.main.CTDxfs dxfs, org.openxmlformats.schemas.spreadsheetml.x2006.main.CTTableStyle tableStyle, IndexedColorMap colorMap)`

Method Summary
`int` | `getIndex()` Some clients may care where in the table style list this definition came from, so we'll track it.
`java.lang.String` | `getName()`
`DifferentialStyleProvider` | `getStyle(TableStyleType type)`
`boolean` | `isBuiltin()` Always false for these, these are user defined styles

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### XSSFTableStyle

    public XSSFTableStyle(int index,
                          org.openxmlformats.schemas.spreadsheetml.x2006.main.CTDxfs dxfs,
                          org.openxmlformats.schemas.spreadsheetml.x2006.main.CTTableStyle tableStyle,
                          IndexedColorMap colorMap)

Parameters:
  `index` - style definition index or built-in ordinal depending on use
  `dxfs` -
  `tableStyle` -
  `colorMap` - indexed color map - default or custom
See Also:
  `TableStyle.getIndex()`

Method Detail

### getName

    public java.lang.String getName()

  Specified by:
    `getName` in interface `TableStyle`
  Returns:
    name (may be a built-in name)

### getIndex

    public int getIndex()

  Description copied from interface: `TableStyle`
  Some clients may care where in the table style list this definition came from, so we'll track it. The spec only references these by name, unlike Dxf records, which these definitions reference by index (XML definition order). Nice of MS to be consistent when defining the ECMA standard. Use org.apache.poi.xssf.usermodel.XSSFBuiltinTableStyle.isBuiltinStyle(TableStyle) to determine whether the index is for a built-in style or explicit user style

  Specified by:
    `getIndex` in interface `TableStyle`
  Returns:
    index from org.apache.poi.xssf.model.StylesTable.getExplicitTableStyle(String) or org.apache.poi.xssf.usermodel.XSSFBuiltinTableStyle.ordinal()

### isBuiltin

    public boolean isBuiltin()

  Always false for these, these are user defined styles

  Specified by:
    `isBuiltin` in interface `TableStyle`
  Returns:
    true if this is a built-in style defined in the OOXML specification, false if it is a user style

### getStyle

    public DifferentialStyleProvider getStyle(TableStyleType type)

  Specified by:
    `getStyle` in interface `TableStyle`
  Returns:
    style definition for the given type, or null if not defined in this style.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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