Package io.keikai.model.impl
Class SheetImpl
- java.lang.Object
-
- io.keikai.model.impl.AbstractSheetAdv
-
- io.keikai.model.impl.SheetImpl
-
- All Implemented Interfaces:
LinkedModelObject,SSheet,Serializable
public class SheetImpl extends AbstractSheetAdv
- Since:
- 3.5.0
- Author:
- dennis
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface io.keikai.model.SSheet
SSheet.SheetVisible
-
-
Constructor Summary
Constructors Constructor Description SheetImpl(AbstractBookAdv book, String id)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SChartaddChart(SChart.ChartType type, ViewAnchor anchor)SConditionalFormattingaddConditionalFormatting(CellRegion srcrgn, CellRegion dstrgn, SConditionalFormatting src, int rowOff, int colOff)Paste from src a new ConditionalFormatting at the specified region.voidaddConditionalFormatting(SConditionalFormatting scf)SDataValidationaddDataValidation(CellRegion region)SDataValidationaddDataValidation(CellRegion region, SDataValidation src)voidaddDirectlyMergedRegion(CellRegion region)voidaddMergedRegion(CellRegion region)Add a merged area, you can't assign a area that overlaps existed merged area.SPictureaddPicture(int picDataIndex, ViewAnchor anchor)Add a picture into the sheet with known picture data index.SPictureaddPicture(SPicture.Format format, byte[] data, ViewAnchor anchor)Add a picture into this sheet with raw picture data and format.voidaddTable(STable table)Add a new tableCellRegioncheckMergedRegion(CellRegion region)voidcheckOrphan()protected voidcheckOwnership(SChart chart)protected voidcheckOwnership(SDataValidation validation)protected voidcheckOwnership(SPicture picture)voidclearAutoFilter()Clear auto filter if there is.voidclearCell(int rowIdx, int columnIdx, int rowIdx2, int columnIdx2)voidclearCell(CellRegion region)Clear cells in specified regionvoidclearTables()SAutoFiltercreateAutoFilter(CellRegion region)Creates a new auto filter, the old one will be drop directly.voiddeleteAutoFilter()Delete current autofilter if it hasvoiddeleteCell(int rowIdx, int columnIdx, int lastRowIdx, int lastColumnIdx, boolean horizontal)voiddeleteCell(CellRegion region, boolean horizontal)Delete a region of cells and shift existing cells.voiddeleteChart(SChart chart)voiddeleteColumn(int columnIdx, int lastColumnIdx)delete columns specified by first and last indexvoiddeleteConditionalFormatting(SConditionalFormatting cfmt)Delete a conditional formatting from this sheet.List<SConditionalFormatting>deleteConditionalFormattingRegion(CellRegion region)Delete a region from conditional formatting and return the deleted conditional formatting.voiddeleteDataValidation(SDataValidation validationid)List<SDataValidation>deleteDataValidationRegion(CellRegion region)Delete data validations that are covered by the specified region.voiddeletePicture(SPicture picture)voiddeleteRow(int rowIdx, int lastRowIdx)delete rows specified by first and last indexvoiddestroy()Destroy / release this model object, for example all the dependency, parent linking.voiddump(StringBuilder builder)StringgetAlgName()List<CellRegion>getAllArrayFormulas()Returns all cell regions of array formula in the given sheetObjectgetAttribute(String name)Get the runtime custom attribute that stored in this sheetMap<String,Object>getAttributes()Get the unmodifiable runtime attributes mapSAutoFiltergetAutoFilter()Gets the auto filter information if there is.SBookgetBook()Get the owner bookSCellgetCell(int rowIdx, int columnIdx)This method always returns not-null cell object.SCellgetCell(String cellRef)Iterator<SCell>getCellIterator(int row)CellRegiongetCellRegionInArrayFormula(SCell cell)Returns the cell regin if the given cell is in an array formula.SChartgetChart(int idx)SChartgetChart(String picid)List<SChart>getCharts()SColumngetColumn(int columnIdx)SColumnArraygetColumnArray(int columnIdx)Iterator<SColumnArray>getColumnArrayIterator()Iterator<SColumn>getColumnIterator()SConditionalFormattinggetConditionalFormatting(int id)SConditionalFormattinggetConditionalFormatting(int row, int col)List<SConditionalFormatting>getConditionalFormattings()Returns the conditional formatting applied to this sheet.ConditionalStyleImplgetConditionalFormattingStyle(int row, int col)List<CellRegion>getContainsMergedRegions(CellRegion region)Get the merged region that are contained by region.CellRegiongetDataRegion()Returns the region which contains data(including chart, picture, and fills) in this sheet; return null if empty sheet.SDataValidationgetDataValidation(int idx)SDataValidationgetDataValidation(int rowIdx, int columnIdx)SDataValidationgetDataValidation(String validationid)List<SDataValidation>getDataValidations()intgetDefaultColumnWidth()intgetDefaultRowHeight()intgetEndCellIndex(int rowIdx)intgetEndColumnIndex()intgetEndRowIndex()shortgetHashedPassword()Internal Use only.StringgetHashValue()StringgetId()CellRegiongetMergedRegion(int idx)CellRegiongetMergedRegion(int row, int column)CellRegiongetMergedRegion(String cellRef)List<CellRegion>getMergedRegions()intgetMergeOutOfSync()intgetNumOfChart()intgetNumOfDataValidation()intgetNumOfMergedRegion()intgetNumOfPicture()intgetOutlineLevelCol()Returns the maximum outline level for column represent.OutlineLevelTreegetOutlineLevelColTree()intgetOutlineLevelRow()Returns the maximum outline level for row represent.OutlineLevelTreegetOutlineLevelRowTree()List<CellRegion>getOverlapsMergedRegions(CellRegion region, boolean excludeContains)Get the merged region that overlapped the regionSPicturegetPicture(int idx)SPicturegetPicture(String picid)List<SPicture>getPictures()SPrintSetupgetPrintSetup()SRowgetRow(int rowIdx)Iterator<SRow>getRowIterator()Iterator<AbstractRowAdv>getRowIterator(boolean reverse, int start, int end)Iterator<SRow>getRowIterator(int start, int end)StringgetSaltValue()List<SConditionalFormatting>getSheetConditionalFormattings()StringgetSheetName()Get the sheet nameSSheetProtectiongetSheetProtection()Gets enhanced protection.SSheet.SheetVisiblegetSheetVisible()Get the sheet current visible state.StringgetSpinCount()intgetStartCellIndex(int rowIdx)intgetStartColumnIndex()intgetStartRowIndex()StringgetTabColor()STablegetTableByRowCol(int rowIdx, int colIdx)List<STable>getTables()Get tables in this sheetSSheetViewInfogetViewInfo()voidinsertCell(int rowIdx, int columnIdx, int lastRowIdx, int lastColumnIdx, boolean horizontal)voidinsertCell(CellRegion region, boolean horizontal)Insert a region of cells and shift existing cells.voidinsertColumn(int columnIdx, int lastColumnIdx)insert columns specified by first and last indexvoidinsertRow(int rowIdx, int lastRowIdx)insert rows specified by first and last indexbooleanisApplyStyles()Returns whether to apply the styles in outline.booleanisFiltered()booleanisHidden(int rowIdx, int colIdx)booleanisProtected()Check if the sheet is protectedbooleanisRowHidden(int rowIdx)booleanisShowOutlineSymbols()Returns whether to display outline symbols.booleanisSummaryBelow()Returns whether to display summary below in outline for rows.booleanisSummaryRight()Returns whether to display summary right in outline for columns.voidmoveCell(int rowIdx, int columnIdx, int lastRowIdx, int lastColumnIdx, int rowOffset, int columnOffset)Move a region of cells specified by 4 indexes.voidmoveCell(CellRegion region, int rowOffset, int columnOffset)Move one or more cells.intnextConditionalId()CellRegionpasteCell(SheetRegion src, CellRegion dest, PasteOption option)paste cell from src sheet to this sheet, the sheets must in same bookCellRegionremoveArrayFormula(SCell cell)Remove an Array Formula from this sheet.voidremoveConditionalFormatting(SConditionalFormatting scf)voidremoveConditionalFormattingRegion(CellRegion region)Remove a region from conditional formatting.voidremoveMergedRegion(CellRegion region, boolean removeOverlaps)Remove the merged area that are contained by regionvoidremoveTable(STable table)voidremoveTable(String name)Remove the table of the specified table name.voidremoveTables(Set<String> tableNames)voidsetAlgName(String algName)New way of hashing sheet protection password.voidsetApplyStyles(boolean applyStyles)Sets to apply with the styles in outline.CellRegionsetArrayFormula(String formula, CellRegion region)Sets array formula to specified region for result.ObjectsetAttribute(String name, Object value)Set the runtime custom attribute to stored in this sheet, the attribute is only use for developer to stored runtime data in the sheet, values will not stored to excel when exporting.voidsetDefaultColumnWidth(int width)set default column width in pixelsvoidsetDefaultRowHeight(int height)set default row height in pixelsvoidsetHashedPassword(short hashpass)Internal User only.voidsetHashValue(String hashValue)New way of hashing sheet protection password.voidsetMergeOutOfSync(int state)voidsetOutlineLevelCol(int outlineLevelCol)Sets the maximum outline level for column represent of this sheet.voidsetOutlineLevelRow(int outlineLevelRow)Sets the maximum outline level for row represent of this sheet.voidsetPassword(String password)Sets password to protect sheet, set null to unprotect it.voidsetSaltValue(String saltValue)New way of hashing sheet protection password.voidsetSheetVisible(SSheet.SheetVisible state)Set the sheet current visible state.voidsetShowOutlineSymbols(boolean showOutlineSymbols)Sets whether to display outline symbols.voidsetSpinCount(String spinCount)New way of hashing sheet protection password.voidsetSummaryBelow(boolean summaryBelow)Sets to display summary below in outline for rows.voidsetSummaryRight(boolean summaryRight)Sets whether to display summary right in outline for columns.voidsetTabColor(String tabColor)Set sheet tab colorSColumnArraysetupColumnArray(int index, int lastIndex)Set up a column array, if one array range overlaps another, it throws IllegalStateException.voidsyncOutlineLevelColTree()voidsyncOutlineLevelRowTree()
-
-
-
Constructor Detail
-
SheetImpl
public SheetImpl(AbstractBookAdv book, String id)
-
-
Method Detail
-
checkOwnership
protected void checkOwnership(SPicture picture)
-
checkOwnership
protected void checkOwnership(SChart chart)
-
checkOwnership
protected void checkOwnership(SDataValidation validation)
-
getBook
public SBook getBook()
Description copied from interface:SSheetGet the owner book- Returns:
- the owner book
-
getSheetName
public String getSheetName()
Description copied from interface:SSheetGet the sheet name- Returns:
- the sheet name
-
getRow
public SRow getRow(int rowIdx)
-
getColumn
public SColumn getColumn(int columnIdx)
-
getColumnArray
public SColumnArray getColumnArray(int columnIdx)
- See Also:
SSheet.setupColumnArray(int, int)
-
setupColumnArray
public SColumnArray setupColumnArray(int index, int lastIndex)
Description copied from interface:SSheetSet up a column array, if one array range overlaps another, it throws IllegalStateException. If you setup a column array that is not continuous, (for example, 0~2, 5~6), then it will create a missing column array automatically to make them continuous.(3~4 in the example). It's required to set up in ascending order of starting column index (min), or it will create unexpectedSColumnArrayfor columns are not continuous.- Parameters:
index- index of the starting columnlastIndex- index of the end column- Returns:
- the new created column array
-
getCell
public SCell getCell(int rowIdx, int columnIdx)
Description copied from interface:SSheetThis method always returns not-null cell object. UseSCell.isNull()to know it's null (blank) or not.
-
getCell
public SCell getCell(String cellRef)
- Returns:
- return a cell with specified cell reference, e.g. A2, B3. Area reference, A1:A2, is not acceptable.
- See Also:
SSheet.getCell(int, int)
-
getStartRowIndex
public int getStartRowIndex()
-
getEndRowIndex
public int getEndRowIndex()
-
getStartColumnIndex
public int getStartColumnIndex()
-
getEndColumnIndex
public int getEndColumnIndex()
-
getStartCellIndex
public int getStartCellIndex(int rowIdx)
-
getEndCellIndex
public int getEndCellIndex(int rowIdx)
-
clearCell
public void clearCell(CellRegion region)
Description copied from interface:SSheetClear cells in specified region
-
clearCell
public void clearCell(int rowIdx, int columnIdx, int rowIdx2, int columnIdx2)- See Also:
SSheet.clearCell(CellRegion)
-
insertRow
public void insertRow(int rowIdx, int lastRowIdx)Description copied from interface:SSheetinsert rows specified by first and last index
-
deleteRow
public void deleteRow(int rowIdx, int lastRowIdx)Description copied from interface:SSheetdelete rows specified by first and last index
-
insertCell
public void insertCell(CellRegion region, boolean horizontal)
Description copied from interface:SSheetInsert a region of cells and shift existing cells.- Parameters:
region- the region of cells to inserthorizontal- TRUE for shifting right, FALSE for shifting down
-
insertCell
public void insertCell(int rowIdx, int columnIdx, int lastRowIdx, int lastColumnIdx, boolean horizontal)- See Also:
SSheet.insertCell(CellRegion, boolean)
-
deleteCell
public void deleteCell(CellRegion region, boolean horizontal)
Description copied from interface:SSheetDelete a region of cells and shift existing cells.- Parameters:
region- the region of cells to deletehorizontal- TRUE for shifting left, FALSE for shifting up
-
deleteCell
public void deleteCell(int rowIdx, int columnIdx, int lastRowIdx, int lastColumnIdx, boolean horizontal)- See Also:
SSheet.deleteCell(CellRegion, boolean)
-
dump
public void dump(StringBuilder builder)
-
insertColumn
public void insertColumn(int columnIdx, int lastColumnIdx)Description copied from interface:SSheetinsert columns specified by first and last index
-
deleteColumn
public void deleteColumn(int columnIdx, int lastColumnIdx)Description copied from interface:SSheetdelete columns specified by first and last index
-
moveCell
public void moveCell(CellRegion region, int rowOffset, int columnOffset)
Description copied from interface:SSheetMove one or more cells.- Parameters:
region- the region of cells to moverowOffset- positive number to move down, negative to move upcolumnOffset- positive number to move right, negative to move left
-
moveCell
public void moveCell(int rowIdx, int columnIdx, int lastRowIdx, int lastColumnIdx, int rowOffset, int columnOffset)Description copied from interface:SSheetMove a region of cells specified by 4 indexes.- See Also:
SSheet.moveCell(CellRegion, int, int)
-
checkOrphan
public void checkOrphan()
-
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
-
getId
public String getId()
- Returns:
- interal sheet object ID
-
addPicture
public SPicture addPicture(SPicture.Format format, byte[] data, ViewAnchor anchor)
Description copied from interface:SSheetAdd a picture into this sheet with raw picture data and format.- Parameters:
format- picture format as specified inSPicture.Formatdata- raw byte data of the pictureanchor- where to anchor this picture- Returns:
- the added
SPicture
-
addPicture
public SPicture addPicture(int picDataIndex, ViewAnchor anchor)
Description copied from interface:SSheetAdd a picture into the sheet with known picture data index.- Parameters:
picDataIndex-SPictureDataindexanchor- where to anchor this picture- Returns:
- the
SPictureadded
-
deletePicture
public void deletePicture(SPicture picture)
-
getNumOfPicture
public int getNumOfPicture()
-
getPicture
public SPicture getPicture(int idx)
-
addChart
public SChart addChart(SChart.ChartType type, ViewAnchor anchor)
-
deleteChart
public void deleteChart(SChart chart)
-
getNumOfChart
public int getNumOfChart()
-
getChart
public SChart getChart(int idx)
-
getMergedRegions
public List<CellRegion> getMergedRegions()
-
removeMergedRegion
public void removeMergedRegion(CellRegion region, boolean removeOverlaps)
Description copied from interface:SSheetRemove the merged area that are contained by regionremoveOverlaps- true if you want to remove the merged areas that are just overlapped.
-
addMergedRegion
public void addMergedRegion(CellRegion region)
Description copied from interface:SSheetAdd a merged area, you can't assign a area that overlaps existed merged area.
-
getOverlapsMergedRegions
public List<CellRegion> getOverlapsMergedRegions(CellRegion region, boolean excludeContains)
Description copied from interface:SSheetGet the merged region that overlapped the region- Returns:
- the regions that overlaps
-
getContainsMergedRegions
public List<CellRegion> getContainsMergedRegions(CellRegion region)
Description copied from interface:SSheetGet the merged region that are contained by region.- Returns:
- the regions that are contained
-
getMergedRegion
public CellRegion getMergedRegion(String cellRef)
-
getMergedRegion
public CellRegion getMergedRegion(int row, int column)
-
getAttribute
public Object getAttribute(String name)
Description copied from interface:SSheetGet the runtime custom attribute that stored in this sheet- Parameters:
name- the attribute name- Returns:
- the value, or null if not found
-
setAttribute
public Object setAttribute(String name, Object value)
Description copied from interface:SSheetSet the runtime custom attribute to stored in this sheet, the attribute is only use for developer to stored runtime data in the sheet, values will not stored to excel when exporting.- Parameters:
name- name the attribute namevalue- the attribute value
-
getAttributes
public Map<String,Object> getAttributes()
Description copied from interface:SSheetGet the unmodifiable runtime attributes map- Returns:
-
getRowIterator
public Iterator<SRow> getRowIterator()
- Returns:
- an iterator of existing rows excluding those blank rows
-
getRowIterator
public Iterator<SRow> getRowIterator(int start, int end)
- Parameters:
start- the start indexend- the end index- Returns:
- an iterator of existing rows excluding those blank rows
-
getRowIterator
public Iterator<AbstractRowAdv> getRowIterator(boolean reverse, int start, int end)
- Specified by:
getRowIteratorin classAbstractSheetAdv
-
getColumnArrayIterator
public Iterator<SColumnArray> getColumnArrayIterator()
-
getColumnIterator
public Iterator<SColumn> getColumnIterator()
- Returns:
- an iterator of existing columns excluding those blank columns
-
getDefaultRowHeight
public int getDefaultRowHeight()
- Returns:
- default row height in pixels
-
getDefaultColumnWidth
public int getDefaultColumnWidth()
- Returns:
- default column width in pixels
-
setDefaultRowHeight
public void setDefaultRowHeight(int height)
Description copied from interface:SSheetset default row height in pixels
-
setDefaultColumnWidth
public void setDefaultColumnWidth(int width)
Description copied from interface:SSheetset default column width in pixels
-
getNumOfMergedRegion
public int getNumOfMergedRegion()
-
getMergedRegion
public CellRegion getMergedRegion(int idx)
-
isProtected
public boolean isProtected()
Description copied from interface:SSheetCheck if the sheet is protected- Returns:
-
setTabColor
public void setTabColor(String tabColor)
Description copied from interface:SSheetSet sheet tab color
-
getTabColor
public String getTabColor()
- Returns:
- sheet tab color
-
setPassword
public void setPassword(String password)
Description copied from interface:SSheetSets password to protect sheet, set null to unprotect it.
-
getHashedPassword
public short getHashedPassword()
Description copied from interface:SSheetInternal Use only.- Returns:
-
getViewInfo
public SSheetViewInfo getViewInfo()
-
getPrintSetup
public SPrintSetup getPrintSetup()
-
addDataValidation
public SDataValidation addDataValidation(CellRegion region)
-
addDataValidation
public SDataValidation addDataValidation(CellRegion region, SDataValidation src)
-
getDataValidation
public SDataValidation getDataValidation(String validationid)
-
deleteDataValidation
public void deleteDataValidation(SDataValidation validationid)
-
deleteDataValidationRegion
public List<SDataValidation> deleteDataValidationRegion(CellRegion region)
Description copied from interface:SSheetDelete data validations that are covered by the specified region.- Parameters:
region- the cover region- Returns:
- the data validations deleted
-
getDataValidations
public List<SDataValidation> getDataValidations()
-
getNumOfDataValidation
public int getNumOfDataValidation()
-
getDataValidation
public SDataValidation getDataValidation(int idx)
-
getDataValidation
public SDataValidation getDataValidation(int rowIdx, int columnIdx)
- Returns:
- the first data validation at row, column
-
getAutoFilter
public SAutoFilter getAutoFilter()
Description copied from interface:SSheetGets the auto filter information if there is.- Returns:
- the auto filter, or null if not found
-
createAutoFilter
public SAutoFilter createAutoFilter(CellRegion region)
Description copied from interface:SSheetCreates a new auto filter, the old one will be drop directly.- Parameters:
region- the auto filter region- Returns:
- the new auto filter.
-
deleteAutoFilter
public void deleteAutoFilter()
Description copied from interface:SSheetDelete current autofilter if it has
-
clearAutoFilter
public void clearAutoFilter()
Description copied from interface:SSheetClear auto filter if there is.
-
pasteCell
public CellRegion pasteCell(SheetRegion src, CellRegion dest, PasteOption option)
Description copied from interface:SSheetpaste cell from src sheet to this sheet, the sheets must in same book- Parameters:
src- src sheet and it's region to pastedest- destination region in this sheetoption- the copy option- Returns:
- the final effected region
-
getSheetProtection
public SSheetProtection getSheetProtection()
Description copied from interface:SSheetGets enhanced protection.
-
setHashedPassword
public void setHashedPassword(short hashpass)
Description copied from interface:SSheetInternal User only.
-
getSheetVisible
public SSheet.SheetVisible getSheetVisible()
Description copied from interface:SSheetGet the sheet current visible state.
-
setSheetVisible
public void setSheetVisible(SSheet.SheetVisible state)
Description copied from interface:SSheetSet the sheet current visible state.
-
addTable
public void addTable(STable table)
Description copied from interface:SSheetAdd a new table
-
getTables
public List<STable> getTables()
Description copied from interface:SSheetGet tables in this sheet- Returns:
-
removeTable
public void removeTable(String name)
Description copied from interface:SSheetRemove the table of the specified table name.
-
getTableByRowCol
public STable getTableByRowCol(int rowIdx, int colIdx)
- Specified by:
getTableByRowColin classAbstractSheetAdv
-
isHidden
public boolean isHidden(int rowIdx, int colIdx)- Specified by:
isHiddenin classAbstractSheetAdv
-
isRowHidden
public boolean isRowHidden(int rowIdx)
- Specified by:
isRowHiddenin classAbstractSheetAdv
-
isFiltered
public boolean isFiltered()
- Specified by:
isFilteredin classAbstractSheetAdv
-
removeTables
public void removeTables(Set<String> tableNames)
- Specified by:
removeTablesin classAbstractSheetAdv
-
removeTable
public void removeTable(STable table)
- Specified by:
removeTablein classAbstractSheetAdv
-
clearTables
public void clearTables()
- Specified by:
clearTablesin classAbstractSheetAdv
-
setHashValue
public void setHashValue(String hashValue)
Description copied from interface:SSheetNew way of hashing sheet protection password.
-
getHashValue
public String getHashValue()
-
setSpinCount
public void setSpinCount(String spinCount)
Description copied from interface:SSheetNew way of hashing sheet protection password.
-
getSpinCount
public String getSpinCount()
-
setSaltValue
public void setSaltValue(String saltValue)
Description copied from interface:SSheetNew way of hashing sheet protection password.
-
getSaltValue
public String getSaltValue()
-
setAlgName
public void setAlgName(String algName)
Description copied from interface:SSheetNew way of hashing sheet protection password.
-
getAlgName
public String getAlgName()
-
checkMergedRegion
public CellRegion checkMergedRegion(CellRegion region)
-
addDirectlyMergedRegion
public void addDirectlyMergedRegion(CellRegion region)
-
getConditionalFormattings
public List<SConditionalFormatting> getConditionalFormattings()
Description copied from interface:SSheetReturns the conditional formatting applied to this sheet.- Returns:
-
getSheetConditionalFormattings
public List<SConditionalFormatting> getSheetConditionalFormattings()
- Specified by:
getSheetConditionalFormattingsin classAbstractSheetAdv
-
addConditionalFormatting
public void addConditionalFormatting(SConditionalFormatting scf)
- Specified by:
addConditionalFormattingin classAbstractSheetAdv
-
setMergeOutOfSync
public void setMergeOutOfSync(int state)
- Specified by:
setMergeOutOfSyncin classAbstractSheetAdv
-
getMergeOutOfSync
public int getMergeOutOfSync()
- Specified by:
getMergeOutOfSyncin classAbstractSheetAdv
-
getDataRegion
public CellRegion getDataRegion()
Description copied from interface:SSheetReturns the region which contains data(including chart, picture, and fills) in this sheet; return null if empty sheet.- Returns:
- the region which contains data(including chart, picture, and fills) in this sheet; return null if empty sheet.
-
getConditionalFormattingStyle
public ConditionalStyleImpl getConditionalFormattingStyle(int row, int col)
- Specified by:
getConditionalFormattingStylein classAbstractSheetAdv
-
removeConditionalFormatting
public void removeConditionalFormatting(SConditionalFormatting scf)
- Specified by:
removeConditionalFormattingin classAbstractSheetAdv
-
addConditionalFormatting
public SConditionalFormatting addConditionalFormatting(CellRegion srcrgn, CellRegion dstrgn, SConditionalFormatting src, int rowOff, int colOff)
Description copied from class:AbstractSheetAdvPaste from src a new ConditionalFormatting at the specified region.- Specified by:
addConditionalFormattingin classAbstractSheetAdv- Returns:
-
nextConditionalId
public int nextConditionalId()
- Specified by:
nextConditionalIdin classAbstractSheetAdv
-
getConditionalFormatting
public SConditionalFormatting getConditionalFormatting(int id)
- Specified by:
getConditionalFormattingin classAbstractSheetAdv
-
getConditionalFormatting
public SConditionalFormatting getConditionalFormatting(int row, int col)
- Specified by:
getConditionalFormattingin classAbstractSheetAdv- Returns:
- the associated conditionalFormattingRule
-
deleteConditionalFormatting
public void deleteConditionalFormatting(SConditionalFormatting cfmt)
Description copied from class:AbstractSheetAdvDelete a conditional formatting from this sheet.- Specified by:
deleteConditionalFormattingin classAbstractSheetAdv
-
removeConditionalFormattingRegion
public void removeConditionalFormattingRegion(CellRegion region)
Description copied from class:AbstractSheetAdvRemove a region from conditional formatting.- Specified by:
removeConditionalFormattingRegionin classAbstractSheetAdv
-
deleteConditionalFormattingRegion
public List<SConditionalFormatting> deleteConditionalFormattingRegion(CellRegion region)
Description copied from class:AbstractSheetAdvDelete a region from conditional formatting and return the deleted conditional formatting.- Specified by:
deleteConditionalFormattingRegionin classAbstractSheetAdv- Returns:
-
setArrayFormula
public CellRegion setArrayFormula(String formula, CellRegion region)
Description copied from interface:SSheetSets array formula to specified region for result.Note if there are shared formulas this will invalidate any
FormulaEvaluatorinstances based on this workbook- Parameters:
formula- text representation of the formularegion- Region of array formula for result.- Returns:
- the
CellRegionof cells affected by this change
-
removeArrayFormula
public CellRegion removeArrayFormula(SCell cell)
Description copied from interface:SSheetRemove an Array Formula from this sheet. All cells contained in the Array Formula range are removed as well- Parameters:
cell- any cell within Array Formula range- Returns:
- the
CellRegionof cells affected by this change
-
getCellRegionInArrayFormula
public CellRegion getCellRegionInArrayFormula(SCell cell)
Description copied from interface:SSheetReturns the cell regin if the given cell is in an array formula.
-
getAllArrayFormulas
public List<CellRegion> getAllArrayFormulas()
Description copied from interface:SSheetReturns all cell regions of array formula in the given sheet- Specified by:
getAllArrayFormulasin interfaceSSheet- Specified by:
getAllArrayFormulasin classAbstractSheetAdv
-
setOutlineLevelRow
public void setOutlineLevelRow(int outlineLevelRow)
Description copied from interface:SSheetSets the maximum outline level for row represent of this sheet.
-
getOutlineLevelRow
public int getOutlineLevelRow()
Description copied from interface:SSheetReturns the maximum outline level for row represent.
-
setOutlineLevelCol
public void setOutlineLevelCol(int outlineLevelCol)
Description copied from interface:SSheetSets the maximum outline level for column represent of this sheet.
-
getOutlineLevelCol
public int getOutlineLevelCol()
Description copied from interface:SSheetReturns the maximum outline level for column represent.
-
isApplyStyles
public boolean isApplyStyles()
Description copied from interface:SSheetReturns whether to apply the styles in outline.Default:
false
-
setApplyStyles
public void setApplyStyles(boolean applyStyles)
Description copied from interface:SSheetSets to apply with the styles in outline.Note: Only used for maintaining model state. (not implemented for UI parts)
- Parameters:
applyStyles- false not to apply
-
isSummaryBelow
public boolean isSummaryBelow()
Description copied from interface:SSheetReturns whether to display summary below in outline for rows.Default:
true
-
setSummaryBelow
public void setSummaryBelow(boolean summaryBelow)
Description copied from interface:SSheetSets to display summary below in outline for rows.Default:
true- Parameters:
summaryBelow- false to display on top.
-
isSummaryRight
public boolean isSummaryRight()
Description copied from interface:SSheetReturns whether to display summary right in outline for columns.Default:
true
-
setSummaryRight
public void setSummaryRight(boolean summaryRight)
Description copied from interface:SSheetSets whether to display summary right in outline for columns.Default:
true- Parameters:
summaryRight- false to display on left.
-
isShowOutlineSymbols
public boolean isShowOutlineSymbols()
Description copied from interface:SSheetReturns whether to display outline symbols.Default:
true
-
setShowOutlineSymbols
public void setShowOutlineSymbols(boolean showOutlineSymbols)
Description copied from interface:SSheetSets whether to display outline symbols.Default:
true- Parameters:
showOutlineSymbols- false not to show.
-
syncOutlineLevelRowTree
public void syncOutlineLevelRowTree()
-
syncOutlineLevelColTree
public void syncOutlineLevelColTree()
-
getOutlineLevelRowTree
public OutlineLevelTree getOutlineLevelRowTree()
-
getOutlineLevelColTree
public OutlineLevelTree getOutlineLevelColTree()
-
-