Package io.keikai.model.impl
Class TableImpl.DummyTable
- java.lang.Object
-
- io.keikai.model.impl.TableImpl.DummyTable
-
-
Field Summary
-
Fields inherited from interface org.apache.poi.ss.usermodel.Table
isStructuredReference
-
-
Constructor Summary
Constructors Constructor Description DummyTable(STable tb)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addColumn(STableColumn column)
boolean
contains(CellReference cell)
checks if the given cell is part of the table.SAutoFilter
createAutoFilter()
Creates a new auto filter for this table the old one will be drop directly.void
deleteAutoFilter()
Delete current autofilter if it hasvoid
enableAutoFilter(boolean enable)
int
findColumnIndex(String columnHeader)
Returns the index of a given named column in the table (names are case insensitive in XSSF).SheetRegion
getAllRegion()
SAutoFilter
getAutoFilter()
Gets the auto filter information if there is.SBook
getBook()
STableColumn
getColumnAt(int colIdx)
List<STableColumn>
getColumns()
SheetRegion
getColumnsRegion(String columnName1, String columnName2)
SheetRegion
getDataRegion()
String
getDisplayName()
int
getEndColIndex()
Get the bottom-right column index on the sheetint
getEndRowIndex()
Get the bottom-right row indexint
getHeaderRowCount()
SheetRegion
getHeadersRegion()
SheetRegion
getItemRegion(TablePtg.Item item, int rowIdx)
String
getName()
Get the name of the table.String
getSheetName()
Returns the sheet name that the table belongs to.int
getStartColIndex()
Get the top-left column index relative to the sheetint
getStartRowIndex()
Get the top-left row index on the sheetTableStyleInfo
getStyle()
String
getStyleName()
STableStyleInfo
getTableStyleInfo()
SheetRegion
getThisRowRegion(int rowIdx)
SheetRegion
getTotalsRegion()
int
getTotalsRowCount()
boolean
isHasTotalsRow()
Note: This is misleading.void
setDisplayName(String name)
void
setHeaderRowCount(int count)
void
setName(String name)
void
setTotalsRowCount(int count)
-
-
-
Constructor Detail
-
DummyTable
public DummyTable(STable tb)
-
-
Method Detail
-
getAutoFilter
public SAutoFilter getAutoFilter()
Description copied from interface:STable
Gets the auto filter information if there is.- Specified by:
getAutoFilter
in interfaceSTable
- Returns:
- the auto filter, or null if not found
-
enableAutoFilter
public void enableAutoFilter(boolean enable)
- Specified by:
enableAutoFilter
in interfaceSTable
-
createAutoFilter
public SAutoFilter createAutoFilter()
Description copied from interface:STable
Creates a new auto filter for this table the old one will be drop directly.- Specified by:
createAutoFilter
in interfaceSTable
- Returns:
- the new auto filter.
-
deleteAutoFilter
public void deleteAutoFilter()
Description copied from interface:STable
Delete current autofilter if it has- Specified by:
deleteAutoFilter
in interfaceSTable
-
addColumn
public void addColumn(STableColumn column)
-
getColumns
public List<STableColumn> getColumns()
- Specified by:
getColumns
in interfaceSTable
-
getColumnAt
public STableColumn getColumnAt(int colIdx)
- Specified by:
getColumnAt
in interfaceSTable
-
getTableStyleInfo
public STableStyleInfo getTableStyleInfo()
- Specified by:
getTableStyleInfo
in interfaceSTable
-
getTotalsRowCount
public int getTotalsRowCount()
- Specified by:
getTotalsRowCount
in interfaceSTable
- Specified by:
getTotalsRowCount
in interfaceTable
- Returns:
- 0 for no totals rows, 1 for totals row shown. Values > 1 are not currently used by Excel up through 2016, and the OOXML spec doesn't define how they would be implemented.
-
setTotalsRowCount
public void setTotalsRowCount(int count)
- Specified by:
setTotalsRowCount
in interfaceSTable
-
getHeaderRowCount
public int getHeaderRowCount()
- Specified by:
getHeaderRowCount
in interfaceSTable
- Specified by:
getHeaderRowCount
in interfaceTable
- Returns:
- 0 for no header rows, 1 for table headers shown. Values > 1 might be used by Excel for pivot tables?
-
getDisplayName
public String getDisplayName()
- Specified by:
getDisplayName
in interfaceSTable
-
setDisplayName
public void setDisplayName(String name)
- Specified by:
setDisplayName
in interfaceSTable
-
getAllRegion
public SheetRegion getAllRegion()
- Specified by:
getAllRegion
in interfaceSTable
-
getDataRegion
public SheetRegion getDataRegion()
- Specified by:
getDataRegion
in interfaceSTable
-
getColumnsRegion
public SheetRegion getColumnsRegion(String columnName1, String columnName2)
- Specified by:
getColumnsRegion
in interfaceSTable
-
getHeadersRegion
public SheetRegion getHeadersRegion()
- Specified by:
getHeadersRegion
in interfaceSTable
-
getTotalsRegion
public SheetRegion getTotalsRegion()
- Specified by:
getTotalsRegion
in interfaceSTable
-
getThisRowRegion
public SheetRegion getThisRowRegion(int rowIdx)
- Specified by:
getThisRowRegion
in interfaceSTable
-
getItemRegion
public SheetRegion getItemRegion(TablePtg.Item item, int rowIdx)
- Specified by:
getItemRegion
in interfaceSTable
-
getStyle
public TableStyleInfo getStyle()
-
contains
public boolean contains(CellReference cell)
Description copied from interface:Table
checks if the given cell is part of the table. Includes checking that they are on the same sheet.
-
setHeaderRowCount
public void setHeaderRowCount(int count)
- Specified by:
setHeaderRowCount
in interfaceSTable
-
getStartColIndex
public int getStartColIndex()
Description copied from interface:Table
Get the top-left column index relative to the sheet- Specified by:
getStartColIndex
in interfaceTable
- Returns:
- table start column index on sheet
-
getStartRowIndex
public int getStartRowIndex()
Description copied from interface:Table
Get the top-left row index on the sheet- Specified by:
getStartRowIndex
in interfaceTable
- Returns:
- table start row index on sheet
-
getEndColIndex
public int getEndColIndex()
Description copied from interface:Table
Get the bottom-right column index on the sheet- Specified by:
getEndColIndex
in interfaceTable
- Returns:
- table end column index on sheet
-
getEndRowIndex
public int getEndRowIndex()
Description copied from interface:Table
Get the bottom-right row index- Specified by:
getEndRowIndex
in interfaceTable
- Returns:
- table end row index on sheet
-
getStyleName
public String getStyleName()
- Specified by:
getStyleName
in interfaceTable
- Returns:
- name of the table style, if there is one. May be a built-in name or user-defined.
-
findColumnIndex
public int findColumnIndex(String columnHeader)
Description copied from interface:Table
Returns the index of a given named column in the table (names are case insensitive in XSSF). Note this list is lazily loaded and cached for performance. Changes to the underlying table structure are not reflected in later calls unlessXSSFTable.updateHeaders()
is called to reset the cache.- Specified by:
findColumnIndex
in interfaceTable
- Parameters:
columnHeader
- the column header name to get the table column index of- Returns:
- column index corresponding to
columnHeader
-
getSheetName
public String getSheetName()
Description copied from interface:Table
Returns the sheet name that the table belongs to.- Specified by:
getSheetName
in interfaceTable
- Returns:
- sheet name
-
isHasTotalsRow
public boolean isHasTotalsRow()
Description copied from interface:Table
Note: This is misleading. The OOXML spec indicates this is true if the totals row has ever been shown, not whether or not it is currently displayed. UseTable.getTotalsRowCount()
> 0 to decide whether or not the totals row is visible.- Specified by:
isHasTotalsRow
in interfaceTable
- Returns:
- true if a totals row has ever been shown for this table
- See Also:
Table.getTotalsRowCount()
-
-