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 SChart
addChart(SChart.ChartType type, ViewAnchor anchor)
SConditionalFormatting
addConditionalFormatting(CellRegion srcrgn, CellRegion dstrgn, SConditionalFormatting src, int rowOff, int colOff)
Paste from src a new ConditionalFormatting at the specified region.void
addConditionalFormatting(SConditionalFormatting scf)
SDataValidation
addDataValidation(CellRegion region)
SDataValidation
addDataValidation(CellRegion region, SDataValidation src)
void
addDirectlyMergedRegion(CellRegion region)
void
addMergedRegion(CellRegion region)
Add a merged area, you can't assign a area that overlaps existed merged area.SPicture
addPicture(int picDataIndex, ViewAnchor anchor)
Add a picture into the sheet with known picture data index.SPicture
addPicture(SPicture.Format format, byte[] data, ViewAnchor anchor)
Add a picture into this sheet with raw picture data and format.void
addTable(STable table)
Add a new tableCellRegion
checkMergedRegion(CellRegion region)
void
checkOrphan()
protected void
checkOwnership(SChart chart)
protected void
checkOwnership(SDataValidation validation)
protected void
checkOwnership(SPicture picture)
void
clearAutoFilter()
Clear auto filter if there is.void
clearCell(int rowIdx, int columnIdx, int rowIdx2, int columnIdx2)
void
clearCell(CellRegion region)
Clear cells in specified regionvoid
clearTables()
SAutoFilter
createAutoFilter(CellRegion region)
Creates a new auto filter, the old one will be drop directly.void
deleteAutoFilter()
Delete current autofilter if it hasvoid
deleteCell(int rowIdx, int columnIdx, int lastRowIdx, int lastColumnIdx, boolean horizontal)
void
deleteCell(CellRegion region, boolean horizontal)
Delete a region of cells and shift existing cells.void
deleteChart(SChart chart)
void
deleteColumn(int columnIdx, int lastColumnIdx)
delete columns specified by first and last indexvoid
deleteConditionalFormatting(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.void
deleteDataValidation(SDataValidation validationid)
List<SDataValidation>
deleteDataValidationRegion(CellRegion region)
Delete data validations that are covered by the specified region.void
deletePicture(SPicture picture)
void
deleteRow(int rowIdx, int lastRowIdx)
delete rows specified by first and last indexvoid
destroy()
Destroy / release this model object, for example all the dependency, parent linking.void
dump(StringBuilder builder)
String
getAlgName()
List<CellRegion>
getAllArrayFormulas()
Returns all cell regions of array formula in the given sheetObject
getAttribute(String name)
Get the runtime custom attribute that stored in this sheetMap<String,Object>
getAttributes()
Get the unmodifiable runtime attributes mapSAutoFilter
getAutoFilter()
Gets the auto filter information if there is.SBook
getBook()
Get the owner bookSCell
getCell(int rowIdx, int columnIdx)
This method always returns not-null cell object.SCell
getCell(String cellRef)
Iterator<SCell>
getCellIterator(int row)
CellRegion
getCellRegionInArrayFormula(SCell cell)
Returns the cell regin if the given cell is in an array formula.SChart
getChart(int idx)
SChart
getChart(String picid)
List<SChart>
getCharts()
SColumn
getColumn(int columnIdx)
SColumnArray
getColumnArray(int columnIdx)
Iterator<SColumnArray>
getColumnArrayIterator()
Iterator<SColumn>
getColumnIterator()
SConditionalFormatting
getConditionalFormatting(int id)
SConditionalFormatting
getConditionalFormatting(int row, int col)
List<SConditionalFormatting>
getConditionalFormattings()
Returns the conditional formatting applied to this sheet.ConditionalStyleImpl
getConditionalFormattingStyle(int row, int col)
List<CellRegion>
getContainsMergedRegions(CellRegion region)
Get the merged region that are contained by region.CellRegion
getDataRegion()
Returns the region which contains data(including chart, picture, and fills) in this sheet; return null if empty sheet.SDataValidation
getDataValidation(int idx)
SDataValidation
getDataValidation(int rowIdx, int columnIdx)
SDataValidation
getDataValidation(String validationid)
List<SDataValidation>
getDataValidations()
int
getDefaultColumnWidth()
int
getDefaultRowHeight()
int
getEndCellIndex(int rowIdx)
int
getEndColumnIndex()
int
getEndRowIndex()
short
getHashedPassword()
Internal Use only.String
getHashValue()
String
getId()
CellRegion
getMergedRegion(int idx)
CellRegion
getMergedRegion(int row, int column)
CellRegion
getMergedRegion(String cellRef)
List<CellRegion>
getMergedRegions()
int
getMergeOutOfSync()
int
getNumOfChart()
int
getNumOfDataValidation()
int
getNumOfMergedRegion()
int
getNumOfPicture()
int
getOutlineLevelCol()
Returns the maximum outline level for column represent.OutlineLevelTree
getOutlineLevelColTree()
int
getOutlineLevelRow()
Returns the maximum outline level for row represent.OutlineLevelTree
getOutlineLevelRowTree()
List<CellRegion>
getOverlapsMergedRegions(CellRegion region, boolean excludeContains)
Get the merged region that overlapped the regionSPicture
getPicture(int idx)
SPicture
getPicture(String picid)
List<SPicture>
getPictures()
SPrintSetup
getPrintSetup()
SRow
getRow(int rowIdx)
Iterator<SRow>
getRowIterator()
Iterator<AbstractRowAdv>
getRowIterator(boolean reverse, int start, int end)
Iterator<SRow>
getRowIterator(int start, int end)
String
getSaltValue()
List<SConditionalFormatting>
getSheetConditionalFormattings()
String
getSheetName()
Get the sheet nameSSheetProtection
getSheetProtection()
Gets enhanced protection.SSheet.SheetVisible
getSheetVisible()
Get the sheet current visible state.String
getSpinCount()
int
getStartCellIndex(int rowIdx)
int
getStartColumnIndex()
int
getStartRowIndex()
String
getTabColor()
STable
getTableByRowCol(int rowIdx, int colIdx)
List<STable>
getTables()
Get tables in this sheetSSheetViewInfo
getViewInfo()
void
insertCell(int rowIdx, int columnIdx, int lastRowIdx, int lastColumnIdx, boolean horizontal)
void
insertCell(CellRegion region, boolean horizontal)
Insert a region of cells and shift existing cells.void
insertColumn(int columnIdx, int lastColumnIdx)
insert columns specified by first and last indexvoid
insertRow(int rowIdx, int lastRowIdx)
insert rows specified by first and last indexboolean
isApplyStyles()
Returns whether to apply the styles in outline.boolean
isFiltered()
boolean
isHidden(int rowIdx, int colIdx)
boolean
isProtected()
Check if the sheet is protectedboolean
isRowHidden(int rowIdx)
boolean
isShowOutlineSymbols()
Returns whether to display outline symbols.boolean
isSummaryBelow()
Returns whether to display summary below in outline for rows.boolean
isSummaryRight()
Returns whether to display summary right in outline for columns.void
moveCell(int rowIdx, int columnIdx, int lastRowIdx, int lastColumnIdx, int rowOffset, int columnOffset)
Move a region of cells specified by 4 indexes.void
moveCell(CellRegion region, int rowOffset, int columnOffset)
Move one or more cells.int
nextConditionalId()
CellRegion
pasteCell(SheetRegion src, CellRegion dest, PasteOption option)
paste cell from src sheet to this sheet, the sheets must in same bookCellRegion
removeArrayFormula(SCell cell)
Remove an Array Formula from this sheet.void
removeConditionalFormatting(SConditionalFormatting scf)
void
removeConditionalFormattingRegion(CellRegion region)
Remove a region from conditional formatting.void
removeMergedRegion(CellRegion region, boolean removeOverlaps)
Remove the merged area that are contained by regionvoid
removeTable(STable table)
void
removeTable(String name)
Remove the table of the specified table name.void
removeTables(Set<String> tableNames)
void
setAlgName(String algName)
New way of hashing sheet protection password.void
setApplyStyles(boolean applyStyles)
Sets to apply with the styles in outline.CellRegion
setArrayFormula(String formula, CellRegion region)
Sets array formula to specified region for result.Object
setAttribute(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.void
setDefaultColumnWidth(int width)
set default column width in pixelsvoid
setDefaultRowHeight(int height)
set default row height in pixelsvoid
setHashedPassword(short hashpass)
Internal User only.void
setHashValue(String hashValue)
New way of hashing sheet protection password.void
setMergeOutOfSync(int state)
void
setOutlineLevelCol(int outlineLevelCol)
Sets the maximum outline level for column represent of this sheet.void
setOutlineLevelRow(int outlineLevelRow)
Sets the maximum outline level for row represent of this sheet.void
setPassword(String password)
Sets password to protect sheet, set null to unprotect it.void
setSaltValue(String saltValue)
New way of hashing sheet protection password.void
setSheetVisible(SSheet.SheetVisible state)
Set the sheet current visible state.void
setShowOutlineSymbols(boolean showOutlineSymbols)
Sets whether to display outline symbols.void
setSpinCount(String spinCount)
New way of hashing sheet protection password.void
setSummaryBelow(boolean summaryBelow)
Sets to display summary below in outline for rows.void
setSummaryRight(boolean summaryRight)
Sets whether to display summary right in outline for columns.void
setTabColor(String tabColor)
Set sheet tab colorSColumnArray
setupColumnArray(int index, int lastIndex)
Set up a column array, if one array range overlaps another, it throws IllegalStateException.void
syncOutlineLevelColTree()
void
syncOutlineLevelRowTree()
-
-
-
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:SSheet
Get the owner book- Returns:
- the owner book
-
getSheetName
public String getSheetName()
Description copied from interface:SSheet
Get 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:SSheet
Set 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 unexpectedSColumnArray
for 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:SSheet
This 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:SSheet
Clear 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:SSheet
insert rows specified by first and last index
-
deleteRow
public void deleteRow(int rowIdx, int lastRowIdx)
Description copied from interface:SSheet
delete rows specified by first and last index
-
insertCell
public void insertCell(CellRegion region, boolean horizontal)
Description copied from interface:SSheet
Insert 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:SSheet
Delete 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:SSheet
insert columns specified by first and last index
-
deleteColumn
public void deleteColumn(int columnIdx, int lastColumnIdx)
Description copied from interface:SSheet
delete columns specified by first and last index
-
moveCell
public void moveCell(CellRegion region, int rowOffset, int columnOffset)
Description copied from interface:SSheet
Move 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:SSheet
Move 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:LinkedModelObject
Destroy / 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:SSheet
Add a picture into this sheet with raw picture data and format.- Parameters:
format
- picture format as specified inSPicture.Format
data
- 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:SSheet
Add a picture into the sheet with known picture data index.- Parameters:
picDataIndex
-SPictureData
indexanchor
- where to anchor this picture- Returns:
- the
SPicture
added
-
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:SSheet
Remove 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:SSheet
Add 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:SSheet
Get the merged region that overlapped the region- Returns:
- the regions that overlaps
-
getContainsMergedRegions
public List<CellRegion> getContainsMergedRegions(CellRegion region)
Description copied from interface:SSheet
Get 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:SSheet
Get 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:SSheet
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.- Parameters:
name
- name the attribute namevalue
- the attribute value
-
getAttributes
public Map<String,Object> getAttributes()
Description copied from interface:SSheet
Get 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:
getRowIterator
in 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:SSheet
set default row height in pixels
-
setDefaultColumnWidth
public void setDefaultColumnWidth(int width)
Description copied from interface:SSheet
set default column width in pixels
-
getNumOfMergedRegion
public int getNumOfMergedRegion()
-
getMergedRegion
public CellRegion getMergedRegion(int idx)
-
isProtected
public boolean isProtected()
Description copied from interface:SSheet
Check if the sheet is protected- Returns:
-
setTabColor
public void setTabColor(String tabColor)
Description copied from interface:SSheet
Set sheet tab color
-
getTabColor
public String getTabColor()
- Returns:
- sheet tab color
-
setPassword
public void setPassword(String password)
Description copied from interface:SSheet
Sets password to protect sheet, set null to unprotect it.
-
getHashedPassword
public short getHashedPassword()
Description copied from interface:SSheet
Internal 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:SSheet
Delete 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:SSheet
Gets 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:SSheet
Creates 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:SSheet
Delete current autofilter if it has
-
clearAutoFilter
public void clearAutoFilter()
Description copied from interface:SSheet
Clear auto filter if there is.
-
pasteCell
public CellRegion pasteCell(SheetRegion src, CellRegion dest, PasteOption option)
Description copied from interface:SSheet
paste 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:SSheet
Gets enhanced protection.
-
setHashedPassword
public void setHashedPassword(short hashpass)
Description copied from interface:SSheet
Internal User only.
-
getSheetVisible
public SSheet.SheetVisible getSheetVisible()
Description copied from interface:SSheet
Get the sheet current visible state.
-
setSheetVisible
public void setSheetVisible(SSheet.SheetVisible state)
Description copied from interface:SSheet
Set the sheet current visible state.
-
addTable
public void addTable(STable table)
Description copied from interface:SSheet
Add a new table
-
getTables
public List<STable> getTables()
Description copied from interface:SSheet
Get tables in this sheet- Returns:
-
removeTable
public void removeTable(String name)
Description copied from interface:SSheet
Remove the table of the specified table name.
-
getTableByRowCol
public STable getTableByRowCol(int rowIdx, int colIdx)
- Specified by:
getTableByRowCol
in classAbstractSheetAdv
-
isHidden
public boolean isHidden(int rowIdx, int colIdx)
- Specified by:
isHidden
in classAbstractSheetAdv
-
isRowHidden
public boolean isRowHidden(int rowIdx)
- Specified by:
isRowHidden
in classAbstractSheetAdv
-
isFiltered
public boolean isFiltered()
- Specified by:
isFiltered
in classAbstractSheetAdv
-
removeTables
public void removeTables(Set<String> tableNames)
- Specified by:
removeTables
in classAbstractSheetAdv
-
removeTable
public void removeTable(STable table)
- Specified by:
removeTable
in classAbstractSheetAdv
-
clearTables
public void clearTables()
- Specified by:
clearTables
in classAbstractSheetAdv
-
setHashValue
public void setHashValue(String hashValue)
Description copied from interface:SSheet
New way of hashing sheet protection password.
-
getHashValue
public String getHashValue()
-
setSpinCount
public void setSpinCount(String spinCount)
Description copied from interface:SSheet
New way of hashing sheet protection password.
-
getSpinCount
public String getSpinCount()
-
setSaltValue
public void setSaltValue(String saltValue)
Description copied from interface:SSheet
New way of hashing sheet protection password.
-
getSaltValue
public String getSaltValue()
-
setAlgName
public void setAlgName(String algName)
Description copied from interface:SSheet
New 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:SSheet
Returns the conditional formatting applied to this sheet.- Returns:
-
getSheetConditionalFormattings
public List<SConditionalFormatting> getSheetConditionalFormattings()
- Specified by:
getSheetConditionalFormattings
in classAbstractSheetAdv
-
addConditionalFormatting
public void addConditionalFormatting(SConditionalFormatting scf)
- Specified by:
addConditionalFormatting
in classAbstractSheetAdv
-
setMergeOutOfSync
public void setMergeOutOfSync(int state)
- Specified by:
setMergeOutOfSync
in classAbstractSheetAdv
-
getMergeOutOfSync
public int getMergeOutOfSync()
- Specified by:
getMergeOutOfSync
in classAbstractSheetAdv
-
getDataRegion
public CellRegion getDataRegion()
Description copied from interface:SSheet
Returns 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:
getConditionalFormattingStyle
in classAbstractSheetAdv
-
removeConditionalFormatting
public void removeConditionalFormatting(SConditionalFormatting scf)
- Specified by:
removeConditionalFormatting
in classAbstractSheetAdv
-
addConditionalFormatting
public SConditionalFormatting addConditionalFormatting(CellRegion srcrgn, CellRegion dstrgn, SConditionalFormatting src, int rowOff, int colOff)
Description copied from class:AbstractSheetAdv
Paste from src a new ConditionalFormatting at the specified region.- Specified by:
addConditionalFormatting
in classAbstractSheetAdv
- Returns:
-
nextConditionalId
public int nextConditionalId()
- Specified by:
nextConditionalId
in classAbstractSheetAdv
-
getConditionalFormatting
public SConditionalFormatting getConditionalFormatting(int id)
- Specified by:
getConditionalFormatting
in classAbstractSheetAdv
-
getConditionalFormatting
public SConditionalFormatting getConditionalFormatting(int row, int col)
- Specified by:
getConditionalFormatting
in classAbstractSheetAdv
- Returns:
- the associated conditionalFormattingRule
-
deleteConditionalFormatting
public void deleteConditionalFormatting(SConditionalFormatting cfmt)
Description copied from class:AbstractSheetAdv
Delete a conditional formatting from this sheet.- Specified by:
deleteConditionalFormatting
in classAbstractSheetAdv
-
removeConditionalFormattingRegion
public void removeConditionalFormattingRegion(CellRegion region)
Description copied from class:AbstractSheetAdv
Remove a region from conditional formatting.- Specified by:
removeConditionalFormattingRegion
in classAbstractSheetAdv
-
deleteConditionalFormattingRegion
public List<SConditionalFormatting> deleteConditionalFormattingRegion(CellRegion region)
Description copied from class:AbstractSheetAdv
Delete a region from conditional formatting and return the deleted conditional formatting.- Specified by:
deleteConditionalFormattingRegion
in classAbstractSheetAdv
- Returns:
-
setArrayFormula
public CellRegion setArrayFormula(String formula, CellRegion region)
Description copied from interface:SSheet
Sets array formula to specified region for result.Note if there are shared formulas this will invalidate any
FormulaEvaluator
instances based on this workbook- Parameters:
formula
- text representation of the formularegion
- Region of array formula for result.- Returns:
- the
CellRegion
of cells affected by this change
-
removeArrayFormula
public CellRegion removeArrayFormula(SCell cell)
Description copied from interface:SSheet
Remove 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
CellRegion
of cells affected by this change
-
getCellRegionInArrayFormula
public CellRegion getCellRegionInArrayFormula(SCell cell)
Description copied from interface:SSheet
Returns the cell regin if the given cell is in an array formula.
-
getAllArrayFormulas
public List<CellRegion> getAllArrayFormulas()
Description copied from interface:SSheet
Returns all cell regions of array formula in the given sheet- Specified by:
getAllArrayFormulas
in interfaceSSheet
- Specified by:
getAllArrayFormulas
in classAbstractSheetAdv
-
setOutlineLevelRow
public void setOutlineLevelRow(int outlineLevelRow)
Description copied from interface:SSheet
Sets the maximum outline level for row represent of this sheet.
-
getOutlineLevelRow
public int getOutlineLevelRow()
Description copied from interface:SSheet
Returns the maximum outline level for row represent.
-
setOutlineLevelCol
public void setOutlineLevelCol(int outlineLevelCol)
Description copied from interface:SSheet
Sets the maximum outline level for column represent of this sheet.
-
getOutlineLevelCol
public int getOutlineLevelCol()
Description copied from interface:SSheet
Returns the maximum outline level for column represent.
-
isApplyStyles
public boolean isApplyStyles()
Description copied from interface:SSheet
Returns whether to apply the styles in outline.Default:
false
-
setApplyStyles
public void setApplyStyles(boolean applyStyles)
Description copied from interface:SSheet
Sets 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:SSheet
Returns whether to display summary below in outline for rows.Default:
true
-
setSummaryBelow
public void setSummaryBelow(boolean summaryBelow)
Description copied from interface:SSheet
Sets 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:SSheet
Returns whether to display summary right in outline for columns.Default:
true
-
setSummaryRight
public void setSummaryRight(boolean summaryRight)
Description copied from interface:SSheet
Sets 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:SSheet
Returns whether to display outline symbols.Default:
true
-
setShowOutlineSymbols
public void setShowOutlineSymbols(boolean showOutlineSymbols)
Description copied from interface:SSheet
Sets 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()
-
-