Package io.keikai.model.impl
Class TableImpl
- java.lang.Object
-
- io.keikai.model.impl.AbstractTableAdv
-
- io.keikai.model.impl.TableImpl
-
- All Implemented Interfaces:
LinkedModelObject,STable,java.io.Serializable,org.apache.poi.ss.usermodel.Table
public class TableImpl extends AbstractTableAdv implements LinkedModelObject
- Since:
- 3.8.0
- Author:
- henri
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classTableImpl.DummyTable
-
Constructor Summary
Constructors Constructor Description TableImpl(AbstractBookAdv book, java.lang.String name, java.lang.String displayName, SheetRegion region, int headerRowCount, int totalsRowCount, STableStyleInfo info)TableImpl(AbstractBookAdv book, java.lang.String name, java.lang.String displayName, SheetRegion region, int headerRowCount, int totalsRowCount, STableStyleInfo info, boolean totalsRowShown)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddColumn(STableColumn column)voidcheckOrphan()booleancontains(org.apache.poi.ss.util.CellReference cell)SAutoFiltercreateAutoFilter()Creates a new auto filter for this table the old one will be drop directly.voiddeleteAutoFilter()Delete current autofilter if it hasvoiddeleteCols(int col1, int col2)voiddeleteRows(int row1, int row2)voiddestroy()Destroy / release this model object, for example all the dependency, parent linking.voidenableAutoFilter(boolean enable)intfindColumnIndex(java.lang.String columnHeader)SheetRegiongetAllRegion()SAutoFiltergetAutoFilter()Gets the auto filter information if there is.SBookgetBook()SCellStylegetCellStyle(int row, int col)STableColumngetColumnAt(int colIdx)java.util.List<STableColumn>getColumns()SheetRegiongetColumnsRegion(java.lang.String columnName1, java.lang.String columnName2)SheetRegiongetDataRegion()java.lang.StringgetDisplayName()intgetEndColIndex()intgetEndRowIndex()intgetHeaderRowCount()SheetRegiongetHeadersRegion()SheetRegiongetItemRegion(org.apache.poi.ss.formula.ptg.TablePtg.Item item, int rowIdx)java.lang.StringgetName()java.lang.StringgetSheetName()intgetStartColIndex()intgetStartRowIndex()org.apache.poi.ss.usermodel.TableStyleInfogetStyle()java.lang.StringgetStyleName()STableStyleInfogetTableStyleInfo()SheetRegiongetThisRowRegion(int rowIdx)SheetRegiongetTotalsRegion()intgetTotalsRowCount()voidinsertCols(int col1, int col2, boolean insertLeft)voidinsertRows(int row1, int row2)booleanisHasTotalsRow()voidrefreshFilter()voidrefreshStyle()voidsetDisplayName(java.lang.String name)voidsetHeaderRowCount(int count)voidsetName(java.lang.String newname)voidsetTableStyle(STableStyleInfo style)voidsetTotalsRowCount(int count)booleanshiftCols(int diff)booleanshiftRows(int diff)
-
-
-
Constructor Detail
-
TableImpl
public TableImpl(AbstractBookAdv book, java.lang.String name, java.lang.String displayName, SheetRegion region, int headerRowCount, int totalsRowCount, STableStyleInfo info)
-
TableImpl
public TableImpl(AbstractBookAdv book, java.lang.String name, java.lang.String displayName, SheetRegion region, int headerRowCount, int totalsRowCount, STableStyleInfo info, boolean totalsRowShown)
-
-
Method Detail
-
getColumns
public java.util.List<STableColumn> getColumns()
- Specified by:
getColumnsin interfaceSTable
-
addColumn
public void addColumn(STableColumn column)
-
getTableStyleInfo
public STableStyleInfo getTableStyleInfo()
- Specified by:
getTableStyleInfoin interfaceSTable
-
setTableStyle
public void setTableStyle(STableStyleInfo style)
-
getTotalsRowCount
public int getTotalsRowCount()
- Specified by:
getTotalsRowCountin interfaceSTable- Specified by:
getTotalsRowCountin interfaceorg.apache.poi.ss.usermodel.Table
-
getHeaderRowCount
public int getHeaderRowCount()
- Specified by:
getHeaderRowCountin interfaceSTable- Specified by:
getHeaderRowCountin interfaceorg.apache.poi.ss.usermodel.Table
-
setTotalsRowCount
public void setTotalsRowCount(int count)
- Specified by:
setTotalsRowCountin interfaceSTable
-
setHeaderRowCount
public void setHeaderRowCount(int count)
- Specified by:
setHeaderRowCountin interfaceSTable
-
getDisplayName
public java.lang.String getDisplayName()
- Specified by:
getDisplayNamein interfaceSTable
-
setDisplayName
public void setDisplayName(java.lang.String name)
- Specified by:
setDisplayNamein interfaceSTable
-
getDataRegion
public SheetRegion getDataRegion()
- Specified by:
getDataRegionin interfaceSTable
-
getColumnsRegion
public SheetRegion getColumnsRegion(java.lang.String columnName1, java.lang.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(org.apache.poi.ss.formula.ptg.TablePtg.Item item, int rowIdx)
- Specified by:
getItemRegionin interfaceSTable
-
destroy
public void destroy()
Description copied from interface:LinkedModelObjectDestroy / release this model object, for example all the dependency, parent linking. this method has to be called before remove this linking from parent object- Specified by:
destroyin interfaceLinkedModelObject
-
checkOrphan
public void checkOrphan()
- Specified by:
checkOrphanin interfaceLinkedModelObject
-
getColumnAt
public STableColumn getColumnAt(int colIdx)
- Specified by:
getColumnAtin interfaceSTable
-
getCellStyle
public SCellStyle getCellStyle(int row, int col)
- Specified by:
getCellStylein classAbstractTableAdv
-
deleteRows
public void deleteRows(int row1, int row2)- Specified by:
deleteRowsin classAbstractTableAdv
-
deleteCols
public void deleteCols(int col1, int col2)- Specified by:
deleteColsin classAbstractTableAdv
-
shiftCols
public boolean shiftCols(int diff)
- Specified by:
shiftColsin classAbstractTableAdv
-
shiftRows
public boolean shiftRows(int diff)
- Specified by:
shiftRowsin classAbstractTableAdv
-
insertRows
public void insertRows(int row1, int row2)- Specified by:
insertRowsin classAbstractTableAdv
-
insertCols
public void insertCols(int col1, int col2, boolean insertLeft)- Specified by:
insertColsin classAbstractTableAdv
-
enableAutoFilter
public void enableAutoFilter(boolean enable)
- Specified by:
enableAutoFilterin interfaceSTable
-
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
-
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
-
refreshFilter
public void refreshFilter()
- Specified by:
refreshFilterin classAbstractTableAdv
-
refreshStyle
public void refreshStyle()
- Specified by:
refreshStylein classAbstractTableAdv
-
getStyle
public org.apache.poi.ss.usermodel.TableStyleInfo getStyle()
- Specified by:
getStylein interfaceorg.apache.poi.ss.usermodel.Table
-
contains
public boolean contains(org.apache.poi.ss.util.CellReference cell)
- Specified by:
containsin interfaceorg.apache.poi.ss.usermodel.Table
-
getAllRegion
public SheetRegion getAllRegion()
- Specified by:
getAllRegionin interfaceSTable
-
getStartColIndex
public int getStartColIndex()
- Specified by:
getStartColIndexin interfaceorg.apache.poi.ss.usermodel.Table
-
getStartRowIndex
public int getStartRowIndex()
- Specified by:
getStartRowIndexin interfaceorg.apache.poi.ss.usermodel.Table
-
getEndColIndex
public int getEndColIndex()
- Specified by:
getEndColIndexin interfaceorg.apache.poi.ss.usermodel.Table
-
getEndRowIndex
public int getEndRowIndex()
- Specified by:
getEndRowIndexin interfaceorg.apache.poi.ss.usermodel.Table
-
getName
public java.lang.String getName()
-
getStyleName
public java.lang.String getStyleName()
- Specified by:
getStyleNamein interfaceorg.apache.poi.ss.usermodel.Table
-
findColumnIndex
public int findColumnIndex(java.lang.String columnHeader)
- Specified by:
findColumnIndexin interfaceorg.apache.poi.ss.usermodel.Table
-
getSheetName
public java.lang.String getSheetName()
- Specified by:
getSheetNamein interfaceorg.apache.poi.ss.usermodel.Table
-
isHasTotalsRow
public boolean isHasTotalsRow()
- Specified by:
isHasTotalsRowin interfaceorg.apache.poi.ss.usermodel.Table
-
-