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 voidaddColumn(STableColumn column)booleancontains(CellReference cell)checks if the given cell is part of the table.SAutoFiltercreateAutoFilter()Creates a new auto filter for this table the old one will be drop directly.voiddeleteAutoFilter()Delete current autofilter if it hasvoidenableAutoFilter(boolean enable)intfindColumnIndex(String columnHeader)Returns the index of a given named column in the table (names are case insensitive in XSSF).SheetRegiongetAllRegion()SAutoFiltergetAutoFilter()Gets the auto filter information if there is.SBookgetBook()STableColumngetColumnAt(int colIdx)List<STableColumn>getColumns()SheetRegiongetColumnsRegion(String columnName1, String columnName2)SheetRegiongetDataRegion()StringgetDisplayName()intgetEndColIndex()Get the bottom-right column index on the sheetintgetEndRowIndex()Get the bottom-right row indexintgetHeaderRowCount()SheetRegiongetHeadersRegion()SheetRegiongetItemRegion(TablePtg.Item item, int rowIdx)StringgetName()Get the name of the table.StringgetSheetName()Returns the sheet name that the table belongs to.intgetStartColIndex()Get the top-left column index relative to the sheetintgetStartRowIndex()Get the top-left row index on the sheetTableStyleInfogetStyle()StringgetStyleName()STableStyleInfogetTableStyleInfo()SheetRegiongetThisRowRegion(int rowIdx)SheetRegiongetTotalsRegion()intgetTotalsRowCount()booleanisHasTotalsRow()Note: This is misleading.voidsetDisplayName(String name)voidsetHeaderRowCount(int count)voidsetName(String name)voidsetTotalsRowCount(int count)
-
-
-
Constructor Detail
-
DummyTable
public DummyTable(STable tb)
-
-
Method Detail
-
getAutoFilter
public SAutoFilter getAutoFilter()
Description copied from interface:STableGets the auto filter information if there is.- Specified by:
getAutoFilterin interfaceSTable- Returns:
- the auto filter, or null if not found
-
enableAutoFilter
public void enableAutoFilter(boolean enable)
- Specified by:
enableAutoFilterin interfaceSTable
-
createAutoFilter
public SAutoFilter createAutoFilter()
Description copied from interface:STableCreates a new auto filter for this table the old one will be drop directly.- Specified by:
createAutoFilterin interfaceSTable- Returns:
- the new auto filter.
-
deleteAutoFilter
public void deleteAutoFilter()
Description copied from interface:STableDelete current autofilter if it has- Specified by:
deleteAutoFilterin interfaceSTable
-
addColumn
public void addColumn(STableColumn column)
-
getColumns
public List<STableColumn> getColumns()
- Specified by:
getColumnsin interfaceSTable
-
getColumnAt
public STableColumn getColumnAt(int colIdx)
- Specified by:
getColumnAtin interfaceSTable
-
getTableStyleInfo
public STableStyleInfo getTableStyleInfo()
- Specified by:
getTableStyleInfoin interfaceSTable
-
getTotalsRowCount
public int getTotalsRowCount()
- Specified by:
getTotalsRowCountin interfaceSTable- Specified by:
getTotalsRowCountin 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:
setTotalsRowCountin interfaceSTable
-
getHeaderRowCount
public int getHeaderRowCount()
- Specified by:
getHeaderRowCountin interfaceSTable- Specified by:
getHeaderRowCountin 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:
getDisplayNamein interfaceSTable
-
setDisplayName
public void setDisplayName(String name)
- Specified by:
setDisplayNamein interfaceSTable
-
getAllRegion
public SheetRegion getAllRegion()
- Specified by:
getAllRegionin interfaceSTable
-
getDataRegion
public SheetRegion getDataRegion()
- Specified by:
getDataRegionin interfaceSTable
-
getColumnsRegion
public SheetRegion getColumnsRegion(String columnName1, String columnName2)
- Specified by:
getColumnsRegionin interfaceSTable
-
getHeadersRegion
public SheetRegion getHeadersRegion()
- Specified by:
getHeadersRegionin interfaceSTable
-
getTotalsRegion
public SheetRegion getTotalsRegion()
- Specified by:
getTotalsRegionin interfaceSTable
-
getThisRowRegion
public SheetRegion getThisRowRegion(int rowIdx)
- Specified by:
getThisRowRegionin interfaceSTable
-
getItemRegion
public SheetRegion getItemRegion(TablePtg.Item item, int rowIdx)
- Specified by:
getItemRegionin interfaceSTable
-
getStyle
public TableStyleInfo getStyle()
-
contains
public boolean contains(CellReference cell)
Description copied from interface:Tablechecks 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:
setHeaderRowCountin interfaceSTable
-
getStartColIndex
public int getStartColIndex()
Description copied from interface:TableGet the top-left column index relative to the sheet- Specified by:
getStartColIndexin interfaceTable- Returns:
- table start column index on sheet
-
getStartRowIndex
public int getStartRowIndex()
Description copied from interface:TableGet the top-left row index on the sheet- Specified by:
getStartRowIndexin interfaceTable- Returns:
- table start row index on sheet
-
getEndColIndex
public int getEndColIndex()
Description copied from interface:TableGet the bottom-right column index on the sheet- Specified by:
getEndColIndexin interfaceTable- Returns:
- table end column index on sheet
-
getEndRowIndex
public int getEndRowIndex()
Description copied from interface:TableGet the bottom-right row index- Specified by:
getEndRowIndexin interfaceTable- Returns:
- table end row index on sheet
-
getStyleName
public String getStyleName()
- Specified by:
getStyleNamein 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:TableReturns 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:
findColumnIndexin 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:TableReturns the sheet name that the table belongs to.- Specified by:
getSheetNamein interfaceTable- Returns:
- sheet name
-
isHasTotalsRow
public boolean isHasTotalsRow()
Description copied from interface:TableNote: 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:
isHasTotalsRowin interfaceTable- Returns:
- true if a totals row has ever been shown for this table
- See Also:
Table.getTotalsRowCount()
-
-