add @Override annotations to Sheet classes

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1717078 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Javen O'Neal 2015-11-29 15:27:34 +00:00
parent ee0f9b84e1
commit 0a69246abc
4 changed files with 214 additions and 13 deletions

View File

@ -170,6 +170,7 @@ public final class HSSFSheet implements org.apache.poi.ss.usermodel.Sheet {
* *
* @return the parent workbook * @return the parent workbook
*/ */
@Override
public HSSFWorkbook getWorkbook() { public HSSFWorkbook getWorkbook() {
return _workbook; return _workbook;
} }
@ -248,6 +249,7 @@ public final class HSSFSheet implements org.apache.poi.ss.usermodel.Sheet {
* @see org.apache.poi.hssf.usermodel.HSSFRow * @see org.apache.poi.hssf.usermodel.HSSFRow
* @see #removeRow(org.apache.poi.ss.usermodel.Row) * @see #removeRow(org.apache.poi.ss.usermodel.Row)
*/ */
@Override
public HSSFRow createRow(int rownum) { public HSSFRow createRow(int rownum) {
HSSFRow row = new HSSFRow(_workbook, this, rownum); HSSFRow row = new HSSFRow(_workbook, this, rownum);
// new rows inherit default height from the sheet // new rows inherit default height from the sheet
@ -278,6 +280,7 @@ public final class HSSFSheet implements org.apache.poi.ss.usermodel.Sheet {
* *
* @param row representing a row to remove. * @param row representing a row to remove.
*/ */
@Override
public void removeRow(Row row) { public void removeRow(Row row) {
HSSFRow hrow = (HSSFRow) row; HSSFRow hrow = (HSSFRow) row;
if (row.getSheet() != this) { if (row.getSheet() != this) {
@ -372,6 +375,7 @@ public final class HSSFSheet implements org.apache.poi.ss.usermodel.Sheet {
* @param rowIndex row to get * @param rowIndex row to get
* @return HSSFRow representing the row number or null if its not defined on the sheet * @return HSSFRow representing the row number or null if its not defined on the sheet
*/ */
@Override
public HSSFRow getRow(int rowIndex) { public HSSFRow getRow(int rowIndex) {
return _rows.get(Integer.valueOf(rowIndex)); return _rows.get(Integer.valueOf(rowIndex));
} }
@ -379,6 +383,7 @@ public final class HSSFSheet implements org.apache.poi.ss.usermodel.Sheet {
/** /**
* Returns the number of physically defined rows (NOT the number of rows in the sheet) * Returns the number of physically defined rows (NOT the number of rows in the sheet)
*/ */
@Override
public int getPhysicalNumberOfRows() { public int getPhysicalNumberOfRows() {
return _rows.size(); return _rows.size();
} }
@ -388,6 +393,7 @@ public final class HSSFSheet implements org.apache.poi.ss.usermodel.Sheet {
* *
* @return the number of the first logical row on the sheet, zero based * @return the number of the first logical row on the sheet, zero based
*/ */
@Override
public int getFirstRowNum() { public int getFirstRowNum() {
return _firstrow; return _firstrow;
} }
@ -405,10 +411,12 @@ public final class HSSFSheet implements org.apache.poi.ss.usermodel.Sheet {
* *
* @return the number of the last row contained in this sheet, zero based. * @return the number of the last row contained in this sheet, zero based.
*/ */
@Override
public int getLastRowNum() { public int getLastRowNum() {
return _lastrow; return _lastrow;
} }
@Override
public List<HSSFDataValidation> getDataValidations() { public List<HSSFDataValidation> getDataValidations() {
DataValidityTable dvt = _sheet.getOrCreateDataValidityTable(); DataValidityTable dvt = _sheet.getOrCreateDataValidityTable();
final List<HSSFDataValidation> hssfValidations = new ArrayList<HSSFDataValidation>(); final List<HSSFDataValidation> hssfValidations = new ArrayList<HSSFDataValidation>();
@ -443,6 +451,7 @@ public final class HSSFSheet implements org.apache.poi.ss.usermodel.Sheet {
* *
* @param dataValidation The Data validation object settings * @param dataValidation The Data validation object settings
*/ */
@Override
public void addValidationData(DataValidation dataValidation) { public void addValidationData(DataValidation dataValidation) {
if (dataValidation == null) { if (dataValidation == null) {
throw new IllegalArgumentException("objValidation must not be null"); throw new IllegalArgumentException("objValidation must not be null");
@ -460,6 +469,7 @@ public final class HSSFSheet implements org.apache.poi.ss.usermodel.Sheet {
* @param columnIndex - the column to get (0-based) * @param columnIndex - the column to get (0-based)
* @param hidden - the visiblity state of the column * @param hidden - the visiblity state of the column
*/ */
@Override
public void setColumnHidden(int columnIndex, boolean hidden) { public void setColumnHidden(int columnIndex, boolean hidden) {
_sheet.setColumnHidden(columnIndex, hidden); _sheet.setColumnHidden(columnIndex, hidden);
} }
@ -470,6 +480,7 @@ public final class HSSFSheet implements org.apache.poi.ss.usermodel.Sheet {
* @param columnIndex - the column to set (0-based) * @param columnIndex - the column to set (0-based)
* @return hidden - <code>false</code> if the column is visible * @return hidden - <code>false</code> if the column is visible
*/ */
@Override
public boolean isColumnHidden(int columnIndex) { public boolean isColumnHidden(int columnIndex) {
return _sheet.isColumnHidden(columnIndex); return _sheet.isColumnHidden(columnIndex);
} }
@ -518,6 +529,7 @@ public final class HSSFSheet implements org.apache.poi.ss.usermodel.Sheet {
* @param width - the width in units of 1/256th of a character width * @param width - the width in units of 1/256th of a character width
* @throws IllegalArgumentException if width > 255*256 (the maximum column width in Excel is 255 characters) * @throws IllegalArgumentException if width > 255*256 (the maximum column width in Excel is 255 characters)
*/ */
@Override
public void setColumnWidth(int columnIndex, int width) { public void setColumnWidth(int columnIndex, int width) {
_sheet.setColumnWidth(columnIndex, width); _sheet.setColumnWidth(columnIndex, width);
} }
@ -528,10 +540,12 @@ public final class HSSFSheet implements org.apache.poi.ss.usermodel.Sheet {
* @param columnIndex - the column to set (0-based) * @param columnIndex - the column to set (0-based)
* @return width - the width in units of 1/256th of a character width * @return width - the width in units of 1/256th of a character width
*/ */
@Override
public int getColumnWidth(int columnIndex) { public int getColumnWidth(int columnIndex) {
return _sheet.getColumnWidth(columnIndex); return _sheet.getColumnWidth(columnIndex);
} }
@Override
public float getColumnWidthInPixels(int column){ public float getColumnWidthInPixels(int column){
int cw = getColumnWidth(column); int cw = getColumnWidth(column);
int def = getDefaultColumnWidth()*256; int def = getDefaultColumnWidth()*256;
@ -546,6 +560,7 @@ public final class HSSFSheet implements org.apache.poi.ss.usermodel.Sheet {
* *
* @return default column width * @return default column width
*/ */
@Override
public int getDefaultColumnWidth() { public int getDefaultColumnWidth() {
return _sheet.getDefaultColumnWidth(); return _sheet.getDefaultColumnWidth();
} }
@ -556,6 +571,7 @@ public final class HSSFSheet implements org.apache.poi.ss.usermodel.Sheet {
* *
* @param width default column width * @param width default column width
*/ */
@Override
public void setDefaultColumnWidth(int width) { public void setDefaultColumnWidth(int width) {
_sheet.setDefaultColumnWidth(width); _sheet.setDefaultColumnWidth(width);
} }
@ -567,6 +583,7 @@ public final class HSSFSheet implements org.apache.poi.ss.usermodel.Sheet {
* *
* @return default row height * @return default row height
*/ */
@Override
public short getDefaultRowHeight() { public short getDefaultRowHeight() {
return _sheet.getDefaultRowHeight(); return _sheet.getDefaultRowHeight();
} }
@ -577,7 +594,7 @@ public final class HSSFSheet implements org.apache.poi.ss.usermodel.Sheet {
* *
* @return default row height in points * @return default row height in points
*/ */
@Override
public float getDefaultRowHeightInPoints() { public float getDefaultRowHeightInPoints() {
return ((float) _sheet.getDefaultRowHeight() / 20); return ((float) _sheet.getDefaultRowHeight() / 20);
} }
@ -588,7 +605,7 @@ public final class HSSFSheet implements org.apache.poi.ss.usermodel.Sheet {
* *
* @param height default row height * @param height default row height
*/ */
@Override
public void setDefaultRowHeight(short height) { public void setDefaultRowHeight(short height) {
_sheet.setDefaultRowHeight(height); _sheet.setDefaultRowHeight(height);
} }
@ -599,7 +616,7 @@ public final class HSSFSheet implements org.apache.poi.ss.usermodel.Sheet {
* *
* @param height default row height * @param height default row height
*/ */
@Override
public void setDefaultRowHeightInPoints(float height) { public void setDefaultRowHeightInPoints(float height) {
_sheet.setDefaultRowHeight((short) (height * 20)); _sheet.setDefaultRowHeight((short) (height * 20));
} }
@ -609,6 +626,7 @@ public final class HSSFSheet implements org.apache.poi.ss.usermodel.Sheet {
* (0 based) column, or null if no style has been * (0 based) column, or null if no style has been
* set for that column * set for that column
*/ */
@Override
public HSSFCellStyle getColumnStyle(int column) { public HSSFCellStyle getColumnStyle(int column) {
short styleIndex = _sheet.getXFIndexForColAt((short) column); short styleIndex = _sheet.getXFIndexForColAt((short) column);
@ -626,7 +644,6 @@ public final class HSSFSheet implements org.apache.poi.ss.usermodel.Sheet {
* *
* @return true if printed * @return true if printed
*/ */
public boolean isGridsPrinted() { public boolean isGridsPrinted() {
return _sheet.isGridsPrinted(); return _sheet.isGridsPrinted();
} }
@ -636,7 +653,6 @@ public final class HSSFSheet implements org.apache.poi.ss.usermodel.Sheet {
* *
* @param value false if not printed. * @param value false if not printed.
*/ */
public void setGridsPrinted(boolean value) { public void setGridsPrinted(boolean value) {
_sheet.setGridsPrinted(value); _sheet.setGridsPrinted(value);
} }
@ -649,6 +665,7 @@ public final class HSSFSheet implements org.apache.poi.ss.usermodel.Sheet {
* @throws IllegalStateException if region intersects with an existing merged region * @throws IllegalStateException if region intersects with an existing merged region
* or multi-cell array formula on this sheet * or multi-cell array formula on this sheet
*/ */
@Override
public int addMergedRegion(CellRangeAddress region) { public int addMergedRegion(CellRangeAddress region) {
region.validate(SpreadsheetVersion.EXCEL97); region.validate(SpreadsheetVersion.EXCEL97);
@ -853,6 +870,7 @@ public final class HSSFSheet implements org.apache.poi.ss.usermodel.Sheet {
* Alias for {@link #rowIterator()} to allow * Alias for {@link #rowIterator()} to allow
* foreach loops * foreach loops
*/ */
@Override
public Iterator<Row> iterator() { public Iterator<Row> iterator() {
return rowIterator(); return rowIterator();
} }
@ -864,7 +882,7 @@ public final class HSSFSheet implements org.apache.poi.ss.usermodel.Sheet {
* *
* @return Sheet - low level representation of this HSSFSheet. * @return Sheet - low level representation of this HSSFSheet.
*/ */
InternalSheet getSheet() { /*package*/ InternalSheet getSheet() {
return _sheet; return _sheet;
} }
@ -897,6 +915,7 @@ public final class HSSFSheet implements org.apache.poi.ss.usermodel.Sheet {
* *
* @param b whether to show auto page breaks * @param b whether to show auto page breaks
*/ */
@Override
public void setAutobreaks(boolean b) { public void setAutobreaks(boolean b) {
WSBoolRecord record = WSBoolRecord record =
(WSBoolRecord) _sheet.findFirstRecordBySid(WSBoolRecord.sid); (WSBoolRecord) _sheet.findFirstRecordBySid(WSBoolRecord.sid);
@ -921,6 +940,7 @@ public final class HSSFSheet implements org.apache.poi.ss.usermodel.Sheet {
* *
* @param b guts or no guts (or glory) * @param b guts or no guts (or glory)
*/ */
@Override
public void setDisplayGuts(boolean b) { public void setDisplayGuts(boolean b) {
WSBoolRecord record = WSBoolRecord record =
(WSBoolRecord) _sheet.findFirstRecordBySid(WSBoolRecord.sid); (WSBoolRecord) _sheet.findFirstRecordBySid(WSBoolRecord.sid);
@ -933,6 +953,7 @@ public final class HSSFSheet implements org.apache.poi.ss.usermodel.Sheet {
* *
* @param b fit or not * @param b fit or not
*/ */
@Override
public void setFitToPage(boolean b) { public void setFitToPage(boolean b) {
WSBoolRecord record = WSBoolRecord record =
(WSBoolRecord) _sheet.findFirstRecordBySid(WSBoolRecord.sid); (WSBoolRecord) _sheet.findFirstRecordBySid(WSBoolRecord.sid);
@ -945,6 +966,7 @@ public final class HSSFSheet implements org.apache.poi.ss.usermodel.Sheet {
* *
* @param b below or not * @param b below or not
*/ */
@Override
public void setRowSumsBelow(boolean b) { public void setRowSumsBelow(boolean b) {
WSBoolRecord record = WSBoolRecord record =
(WSBoolRecord) _sheet.findFirstRecordBySid(WSBoolRecord.sid); (WSBoolRecord) _sheet.findFirstRecordBySid(WSBoolRecord.sid);
@ -959,6 +981,7 @@ public final class HSSFSheet implements org.apache.poi.ss.usermodel.Sheet {
* *
* @param b right or not * @param b right or not
*/ */
@Override
public void setRowSumsRight(boolean b) { public void setRowSumsRight(boolean b) {
WSBoolRecord record = WSBoolRecord record =
(WSBoolRecord) _sheet.findFirstRecordBySid(WSBoolRecord.sid); (WSBoolRecord) _sheet.findFirstRecordBySid(WSBoolRecord.sid);
@ -991,6 +1014,7 @@ public final class HSSFSheet implements org.apache.poi.ss.usermodel.Sheet {
* *
* @return whether to show auto page breaks * @return whether to show auto page breaks
*/ */
@Override
public boolean getAutobreaks() { public boolean getAutobreaks() {
return ((WSBoolRecord) _sheet.findFirstRecordBySid(WSBoolRecord.sid)) return ((WSBoolRecord) _sheet.findFirstRecordBySid(WSBoolRecord.sid))
.getAutobreaks(); .getAutobreaks();
@ -1011,6 +1035,7 @@ public final class HSSFSheet implements org.apache.poi.ss.usermodel.Sheet {
* *
* @return guts or no guts (or glory) * @return guts or no guts (or glory)
*/ */
@Override
public boolean getDisplayGuts() { public boolean getDisplayGuts() {
return ((WSBoolRecord) _sheet.findFirstRecordBySid(WSBoolRecord.sid)) return ((WSBoolRecord) _sheet.findFirstRecordBySid(WSBoolRecord.sid))
.getDisplayGuts(); .getDisplayGuts();
@ -1026,6 +1051,7 @@ public final class HSSFSheet implements org.apache.poi.ss.usermodel.Sheet {
* *
* @return whether all zero values on the worksheet are displayed * @return whether all zero values on the worksheet are displayed
*/ */
@Override
public boolean isDisplayZeros() { public boolean isDisplayZeros() {
return _sheet.getWindowTwo().getDisplayZeros(); return _sheet.getWindowTwo().getDisplayZeros();
} }
@ -1039,6 +1065,7 @@ public final class HSSFSheet implements org.apache.poi.ss.usermodel.Sheet {
* *
* @param value whether to display or hide all zero values on the worksheet * @param value whether to display or hide all zero values on the worksheet
*/ */
@Override
public void setDisplayZeros(boolean value) { public void setDisplayZeros(boolean value) {
_sheet.getWindowTwo().setDisplayZeros(value); _sheet.getWindowTwo().setDisplayZeros(value);
} }
@ -1048,6 +1075,7 @@ public final class HSSFSheet implements org.apache.poi.ss.usermodel.Sheet {
* *
* @return fit or not * @return fit or not
*/ */
@Override
public boolean getFitToPage() { public boolean getFitToPage() {
return ((WSBoolRecord) _sheet.findFirstRecordBySid(WSBoolRecord.sid)) return ((WSBoolRecord) _sheet.findFirstRecordBySid(WSBoolRecord.sid))
.getFitToPage(); .getFitToPage();
@ -1058,6 +1086,7 @@ public final class HSSFSheet implements org.apache.poi.ss.usermodel.Sheet {
* *
* @return below or not * @return below or not
*/ */
@Override
public boolean getRowSumsBelow() { public boolean getRowSumsBelow() {
return ((WSBoolRecord) _sheet.findFirstRecordBySid(WSBoolRecord.sid)) return ((WSBoolRecord) _sheet.findFirstRecordBySid(WSBoolRecord.sid))
.getRowSumsBelow(); .getRowSumsBelow();
@ -1068,6 +1097,7 @@ public final class HSSFSheet implements org.apache.poi.ss.usermodel.Sheet {
* *
* @return right or not * @return right or not
*/ */
@Override
public boolean getRowSumsRight() { public boolean getRowSumsRight() {
return ((WSBoolRecord) _sheet.findFirstRecordBySid(WSBoolRecord.sid)) return ((WSBoolRecord) _sheet.findFirstRecordBySid(WSBoolRecord.sid))
.getRowSumsRight(); .getRowSumsRight();
@ -1078,6 +1108,7 @@ public final class HSSFSheet implements org.apache.poi.ss.usermodel.Sheet {
* *
* @return Gridlines are printed * @return Gridlines are printed
*/ */
@Override
public boolean isPrintGridlines() { public boolean isPrintGridlines() {
return getSheet().getPrintGridlines().getPrintGridlines(); return getSheet().getPrintGridlines().getPrintGridlines();
} }
@ -1088,6 +1119,7 @@ public final class HSSFSheet implements org.apache.poi.ss.usermodel.Sheet {
* @param newPrintGridlines boolean to turn on or off the printing of * @param newPrintGridlines boolean to turn on or off the printing of
* gridlines * gridlines
*/ */
@Override
public void setPrintGridlines(boolean newPrintGridlines) { public void setPrintGridlines(boolean newPrintGridlines) {
getSheet().getPrintGridlines().setPrintGridlines(newPrintGridlines); getSheet().getPrintGridlines().setPrintGridlines(newPrintGridlines);
} }
@ -1097,14 +1129,17 @@ public final class HSSFSheet implements org.apache.poi.ss.usermodel.Sheet {
* *
* @return The user model for the print setup object. * @return The user model for the print setup object.
*/ */
@Override
public HSSFPrintSetup getPrintSetup() { public HSSFPrintSetup getPrintSetup() {
return new HSSFPrintSetup(_sheet.getPageSettings().getPrintSetup()); return new HSSFPrintSetup(_sheet.getPageSettings().getPrintSetup());
} }
@Override
public HSSFHeader getHeader() { public HSSFHeader getHeader() {
return new HSSFHeader(_sheet.getPageSettings()); return new HSSFHeader(_sheet.getPageSettings());
} }
@Override
public HSSFFooter getFooter() { public HSSFFooter getFooter() {
return new HSSFFooter(_sheet.getPageSettings()); return new HSSFFooter(_sheet.getPageSettings());
} }
@ -1114,6 +1149,7 @@ public final class HSSFSheet implements org.apache.poi.ss.usermodel.Sheet {
* *
* @return <code>true</code> if this sheet is currently selected * @return <code>true</code> if this sheet is currently selected
*/ */
@Override
public boolean isSelected() { public boolean isSelected() {
return getSheet().getWindowTwo().getSelected(); return getSheet().getWindowTwo().getSelected();
} }
@ -1123,6 +1159,7 @@ public final class HSSFSheet implements org.apache.poi.ss.usermodel.Sheet {
* *
* @param sel Whether to select the sheet or deselect the sheet. * @param sel Whether to select the sheet or deselect the sheet.
*/ */
@Override
public void setSelected(boolean sel) { public void setSelected(boolean sel) {
getSheet().getWindowTwo().setSelected(sel); getSheet().getWindowTwo().setSelected(sel);
} }
@ -1149,6 +1186,7 @@ public final class HSSFSheet implements org.apache.poi.ss.usermodel.Sheet {
* @param margin which margin to get * @param margin which margin to get
* @return the size of the margin * @return the size of the margin
*/ */
@Override
public double getMargin(short margin) { public double getMargin(short margin) {
switch (margin) { switch (margin) {
case FooterMargin: case FooterMargin:
@ -1166,6 +1204,7 @@ public final class HSSFSheet implements org.apache.poi.ss.usermodel.Sheet {
* @param margin which margin to get * @param margin which margin to get
* @param size the size of the margin * @param size the size of the margin
*/ */
@Override
public void setMargin(short margin, double size) { public void setMargin(short margin, double size) {
switch (margin) { switch (margin) {
case FooterMargin: case FooterMargin:
@ -1188,6 +1227,7 @@ public final class HSSFSheet implements org.apache.poi.ss.usermodel.Sheet {
* *
* @return true => protection enabled; false => protection disabled * @return true => protection enabled; false => protection disabled
*/ */
@Override
public boolean getProtect() { public boolean getProtect() {
return getProtectionBlock().isSheetProtected(); return getProtectionBlock().isSheetProtected();
} }
@ -1213,6 +1253,7 @@ public final class HSSFSheet implements org.apache.poi.ss.usermodel.Sheet {
* *
* @return true => protection enabled; false => protection disabled * @return true => protection enabled; false => protection disabled
*/ */
@Override
public boolean getScenarioProtect() { public boolean getScenarioProtect() {
return getProtectionBlock().isScenarioProtected(); return getProtectionBlock().isScenarioProtected();
} }
@ -1222,6 +1263,7 @@ public final class HSSFSheet implements org.apache.poi.ss.usermodel.Sheet {
* *
* @param password to set for protection. Pass <code>null</code> to remove protection * @param password to set for protection. Pass <code>null</code> to remove protection
*/ */
@Override
public void protectSheet(String password) { public void protectSheet(String password) {
getProtectionBlock().protectSheet(password, true, true); //protect objs&scenarios(normal) getProtectionBlock().protectSheet(password, true, true); //protect objs&scenarios(normal)
} }
@ -1276,6 +1318,7 @@ public final class HSSFSheet implements org.apache.poi.ss.usermodel.Sheet {
* *
* @return short indicating the rownum (0 based) of the top row * @return short indicating the rownum (0 based) of the top row
*/ */
@Override
public short getTopRow() { public short getTopRow() {
return _sheet.getTopRow(); return _sheet.getTopRow();
} }
@ -1286,6 +1329,7 @@ public final class HSSFSheet implements org.apache.poi.ss.usermodel.Sheet {
* *
* @return short indicating the rownum (0 based) of the top row * @return short indicating the rownum (0 based) of the top row
*/ */
@Override
public short getLeftCol() { public short getLeftCol() {
return _sheet.getLeftCol(); return _sheet.getLeftCol();
} }
@ -1614,6 +1658,7 @@ public final class HSSFSheet implements org.apache.poi.ss.usermodel.Sheet {
* @param leftmostColumn Left column visible in right pane. * @param leftmostColumn Left column visible in right pane.
* @param topRow Top row visible in bottom pane * @param topRow Top row visible in bottom pane
*/ */
@Override
public void createFreezePane(int colSplit, int rowSplit, int leftmostColumn, int topRow) { public void createFreezePane(int colSplit, int rowSplit, int leftmostColumn, int topRow) {
validateColumn(colSplit); validateColumn(colSplit);
validateRow(rowSplit); validateRow(rowSplit);
@ -1634,6 +1679,7 @@ public final class HSSFSheet implements org.apache.poi.ss.usermodel.Sheet {
* @param colSplit Horizonatal position of split. * @param colSplit Horizonatal position of split.
* @param rowSplit Vertical position of split. * @param rowSplit Vertical position of split.
*/ */
@Override
public void createFreezePane(int colSplit, int rowSplit) { public void createFreezePane(int colSplit, int rowSplit) {
createFreezePane(colSplit, rowSplit, colSplit, rowSplit); createFreezePane(colSplit, rowSplit, colSplit, rowSplit);
} }
@ -1652,6 +1698,7 @@ public final class HSSFSheet implements org.apache.poi.ss.usermodel.Sheet {
* @see #PANE_UPPER_LEFT * @see #PANE_UPPER_LEFT
* @see #PANE_UPPER_RIGHT * @see #PANE_UPPER_RIGHT
*/ */
@Override
public void createSplitPane(int xSplitPos, int ySplitPos, int leftmostColumn, int topRow, int activePane) { public void createSplitPane(int xSplitPos, int ySplitPos, int leftmostColumn, int topRow, int activePane) {
getSheet().createSplitPane(xSplitPos, ySplitPos, topRow, leftmostColumn, activePane); getSheet().createSplitPane(xSplitPos, ySplitPos, topRow, leftmostColumn, activePane);
} }
@ -1661,6 +1708,7 @@ public final class HSSFSheet implements org.apache.poi.ss.usermodel.Sheet {
* *
* @return null if no pane configured, or the pane information. * @return null if no pane configured, or the pane information.
*/ */
@Override
public PaneInformation getPaneInformation() { public PaneInformation getPaneInformation() {
return getSheet().getPaneInformation(); return getSheet().getPaneInformation();
} }
@ -1670,6 +1718,7 @@ public final class HSSFSheet implements org.apache.poi.ss.usermodel.Sheet {
* *
* @param show whether to show gridlines or not * @param show whether to show gridlines or not
*/ */
@Override
public void setDisplayGridlines(boolean show) { public void setDisplayGridlines(boolean show) {
_sheet.setDisplayGridlines(show); _sheet.setDisplayGridlines(show);
} }
@ -1679,6 +1728,7 @@ public final class HSSFSheet implements org.apache.poi.ss.usermodel.Sheet {
* *
* @return whether gridlines are displayed * @return whether gridlines are displayed
*/ */
@Override
public boolean isDisplayGridlines() { public boolean isDisplayGridlines() {
return _sheet.isDisplayGridlines(); return _sheet.isDisplayGridlines();
} }
@ -1688,6 +1738,7 @@ public final class HSSFSheet implements org.apache.poi.ss.usermodel.Sheet {
* *
* @param show whether to show formulas or not * @param show whether to show formulas or not
*/ */
@Override
public void setDisplayFormulas(boolean show) { public void setDisplayFormulas(boolean show) {
_sheet.setDisplayFormulas(show); _sheet.setDisplayFormulas(show);
} }
@ -1697,6 +1748,7 @@ public final class HSSFSheet implements org.apache.poi.ss.usermodel.Sheet {
* *
* @return whether formulas are displayed * @return whether formulas are displayed
*/ */
@Override
public boolean isDisplayFormulas() { public boolean isDisplayFormulas() {
return _sheet.isDisplayFormulas(); return _sheet.isDisplayFormulas();
} }
@ -1706,6 +1758,7 @@ public final class HSSFSheet implements org.apache.poi.ss.usermodel.Sheet {
* *
* @param show whether to show RowColHeadings or not * @param show whether to show RowColHeadings or not
*/ */
@Override
public void setDisplayRowColHeadings(boolean show) { public void setDisplayRowColHeadings(boolean show) {
_sheet.setDisplayRowColHeadings(show); _sheet.setDisplayRowColHeadings(show);
} }
@ -1715,6 +1768,7 @@ public final class HSSFSheet implements org.apache.poi.ss.usermodel.Sheet {
* *
* @return whether RowColHeadings are displayed * @return whether RowColHeadings are displayed
*/ */
@Override
public boolean isDisplayRowColHeadings() { public boolean isDisplayRowColHeadings() {
return _sheet.isDisplayRowColHeadings(); return _sheet.isDisplayRowColHeadings();
} }
@ -1730,6 +1784,7 @@ public final class HSSFSheet implements org.apache.poi.ss.usermodel.Sheet {
* *
* @param row the row to break, inclusive * @param row the row to break, inclusive
*/ */
@Override
public void setRowBreak(int row) { public void setRowBreak(int row) {
validateRow(row); validateRow(row);
_sheet.getPageSettings().setRowBreak(row, (short) 0, (short) 255); _sheet.getPageSettings().setRowBreak(row, (short) 0, (short) 255);
@ -1738,6 +1793,7 @@ public final class HSSFSheet implements org.apache.poi.ss.usermodel.Sheet {
/** /**
* @return <code>true</code> if there is a page break at the indicated row * @return <code>true</code> if there is a page break at the indicated row
*/ */
@Override
public boolean isRowBroken(int row) { public boolean isRowBroken(int row) {
return _sheet.getPageSettings().isRowBroken(row); return _sheet.getPageSettings().isRowBroken(row);
} }
@ -1745,6 +1801,7 @@ public final class HSSFSheet implements org.apache.poi.ss.usermodel.Sheet {
/** /**
* Removes the page break at the indicated row * Removes the page break at the indicated row
*/ */
@Override
public void removeRowBreak(int row) { public void removeRowBreak(int row) {
_sheet.getPageSettings().removeRowBreak(row); _sheet.getPageSettings().removeRowBreak(row);
} }
@ -1752,6 +1809,7 @@ public final class HSSFSheet implements org.apache.poi.ss.usermodel.Sheet {
/** /**
* @return row indexes of all the horizontal page breaks, never <code>null</code> * @return row indexes of all the horizontal page breaks, never <code>null</code>
*/ */
@Override
public int[] getRowBreaks() { public int[] getRowBreaks() {
//we can probably cache this information, but this should be a sparsely used function //we can probably cache this information, but this should be a sparsely used function
return _sheet.getPageSettings().getRowBreaks(); return _sheet.getPageSettings().getRowBreaks();
@ -1760,6 +1818,7 @@ public final class HSSFSheet implements org.apache.poi.ss.usermodel.Sheet {
/** /**
* @return column indexes of all the vertical page breaks, never <code>null</code> * @return column indexes of all the vertical page breaks, never <code>null</code>
*/ */
@Override
public int[] getColumnBreaks() { public int[] getColumnBreaks() {
//we can probably cache this information, but this should be a sparsely used function //we can probably cache this information, but this should be a sparsely used function
return _sheet.getPageSettings().getColumnBreaks(); return _sheet.getPageSettings().getColumnBreaks();
@ -1777,6 +1836,7 @@ public final class HSSFSheet implements org.apache.poi.ss.usermodel.Sheet {
* *
* @param column the column to break, inclusive * @param column the column to break, inclusive
*/ */
@Override
public void setColumnBreak(int column) { public void setColumnBreak(int column) {
validateColumn((short) column); validateColumn((short) column);
_sheet.getPageSettings().setColumnBreak((short) column, (short) 0, (short) SpreadsheetVersion.EXCEL97.getLastRowIndex()); _sheet.getPageSettings().setColumnBreak((short) column, (short) 0, (short) SpreadsheetVersion.EXCEL97.getLastRowIndex());
@ -1788,6 +1848,7 @@ public final class HSSFSheet implements org.apache.poi.ss.usermodel.Sheet {
* @param column FIXME: Document this! * @param column FIXME: Document this!
* @return FIXME: Document this! * @return FIXME: Document this!
*/ */
@Override
public boolean isColumnBroken(int column) { public boolean isColumnBroken(int column) {
return _sheet.getPageSettings().isColumnBroken(column); return _sheet.getPageSettings().isColumnBroken(column);
} }
@ -1797,6 +1858,7 @@ public final class HSSFSheet implements org.apache.poi.ss.usermodel.Sheet {
* *
* @param column * @param column
*/ */
@Override
public void removeColumnBreak(int column) { public void removeColumnBreak(int column) {
_sheet.getPageSettings().removeColumnBreak(column); _sheet.getPageSettings().removeColumnBreak(column);
} }
@ -1874,6 +1936,7 @@ public final class HSSFSheet implements org.apache.poi.ss.usermodel.Sheet {
* *
* @return the top-level drawing patriarch, if there is one, else returns null * @return the top-level drawing patriarch, if there is one, else returns null
*/ */
@Override
public HSSFPatriarch getDrawingPatriarch() { public HSSFPatriarch getDrawingPatriarch() {
_patriarch = getPatriarch(false); _patriarch = getPatriarch(false);
return _patriarch; return _patriarch;
@ -1887,6 +1950,7 @@ public final class HSSFSheet implements org.apache.poi.ss.usermodel.Sheet {
* *
* @return The new patriarch. * @return The new patriarch.
*/ */
@Override
public HSSFPatriarch createDrawingPatriarch() { public HSSFPatriarch createDrawingPatriarch() {
_patriarch = getPatriarch(true); _patriarch = getPatriarch(true);
return _patriarch; return _patriarch;
@ -1931,6 +1995,7 @@ public final class HSSFSheet implements org.apache.poi.ss.usermodel.Sheet {
* @param columnNumber One of the columns in the group. * @param columnNumber One of the columns in the group.
* @param collapsed true = collapse group, false = expand group. * @param collapsed true = collapse group, false = expand group.
*/ */
@Override
public void setColumnGroupCollapsed(int columnNumber, boolean collapsed) { public void setColumnGroupCollapsed(int columnNumber, boolean collapsed) {
_sheet.setColumnGroupCollapsed(columnNumber, collapsed); _sheet.setColumnGroupCollapsed(columnNumber, collapsed);
} }
@ -1941,10 +2006,12 @@ public final class HSSFSheet implements org.apache.poi.ss.usermodel.Sheet {
* @param fromColumn beginning of the column range. * @param fromColumn beginning of the column range.
* @param toColumn end of the column range. * @param toColumn end of the column range.
*/ */
@Override
public void groupColumn(int fromColumn, int toColumn) { public void groupColumn(int fromColumn, int toColumn) {
_sheet.groupColumnRange(fromColumn, toColumn, true); _sheet.groupColumnRange(fromColumn, toColumn, true);
} }
@Override
public void ungroupColumn(int fromColumn, int toColumn) { public void ungroupColumn(int fromColumn, int toColumn) {
_sheet.groupColumnRange(fromColumn, toColumn, false); _sheet.groupColumnRange(fromColumn, toColumn, false);
} }
@ -1955,14 +2022,17 @@ public final class HSSFSheet implements org.apache.poi.ss.usermodel.Sheet {
* @param fromRow start row (0-based) * @param fromRow start row (0-based)
* @param toRow end row (0-based) * @param toRow end row (0-based)
*/ */
@Override
public void groupRow(int fromRow, int toRow) { public void groupRow(int fromRow, int toRow) {
_sheet.groupRowRange(fromRow, toRow, true); _sheet.groupRowRange(fromRow, toRow, true);
} }
@Override
public void ungroupRow(int fromRow, int toRow) { public void ungroupRow(int fromRow, int toRow) {
_sheet.groupRowRange(fromRow, toRow, false); _sheet.groupRowRange(fromRow, toRow, false);
} }
@Override
public void setRowGroupCollapsed(int rowIndex, boolean collapse) { public void setRowGroupCollapsed(int rowIndex, boolean collapse) {
if (collapse) { if (collapse) {
_sheet.getRowsAggregate().collapseRow(rowIndex); _sheet.getRowsAggregate().collapseRow(rowIndex);
@ -1977,6 +2047,7 @@ public final class HSSFSheet implements org.apache.poi.ss.usermodel.Sheet {
* @param column the column index * @param column the column index
* @param style the style to set * @param style the style to set
*/ */
@Override
public void setDefaultColumnStyle(int column, CellStyle style) { public void setDefaultColumnStyle(int column, CellStyle style) {
_sheet.setDefaultColumnStyle(column, ((HSSFCellStyle) style).getIndex()); _sheet.setDefaultColumnStyle(column, ((HSSFCellStyle) style).getIndex());
} }
@ -1990,6 +2061,7 @@ public final class HSSFSheet implements org.apache.poi.ss.usermodel.Sheet {
* *
* @param column the column index * @param column the column index
*/ */
@Override
public void autoSizeColumn(int column) { public void autoSizeColumn(int column) {
autoSizeColumn(column, false); autoSizeColumn(column, false);
} }
@ -2007,6 +2079,7 @@ public final class HSSFSheet implements org.apache.poi.ss.usermodel.Sheet {
* @param column the column index * @param column the column index
* @param useMergedCells whether to use the contents of merged cells when calculating the width of the column * @param useMergedCells whether to use the contents of merged cells when calculating the width of the column
*/ */
@Override
public void autoSizeColumn(int column, boolean useMergedCells) { public void autoSizeColumn(int column, boolean useMergedCells) {
double width = SheetUtil.getColumnWidth(this, column, useMergedCells); double width = SheetUtil.getColumnWidth(this, column, useMergedCells);
@ -2110,6 +2183,7 @@ public final class HSSFSheet implements org.apache.poi.ss.usermodel.Sheet {
} }
} }
@Override
public HSSFSheetConditionalFormatting getSheetConditionalFormatting() { public HSSFSheetConditionalFormatting getSheetConditionalFormatting() {
return new HSSFSheetConditionalFormatting(this); return new HSSFSheetConditionalFormatting(this);
} }
@ -2119,6 +2193,7 @@ public final class HSSFSheet implements org.apache.poi.ss.usermodel.Sheet {
* *
* @return the name of this sheet * @return the name of this sheet
*/ */
@Override
public String getSheetName() { public String getSheetName() {
HSSFWorkbook wb = getWorkbook(); HSSFWorkbook wb = getWorkbook();
int idx = wb.getSheetIndex(this); int idx = wb.getSheetIndex(this);
@ -2152,6 +2227,7 @@ public final class HSSFSheet implements org.apache.poi.ss.usermodel.Sheet {
return SSCellRange.create(firstRow, firstColumn, height, width, temp, HSSFCell.class); return SSCellRange.create(firstRow, firstColumn, height, width, temp, HSSFCell.class);
} }
@Override
public CellRange<HSSFCell> setArrayFormula(String formula, CellRangeAddress range) { public CellRange<HSSFCell> setArrayFormula(String formula, CellRangeAddress range) {
// make sure the formula parses OK first // make sure the formula parses OK first
int sheetIndex = _workbook.getSheetIndex(this); int sheetIndex = _workbook.getSheetIndex(this);
@ -2167,7 +2243,7 @@ public final class HSSFSheet implements org.apache.poi.ss.usermodel.Sheet {
return cells; return cells;
} }
@Override
public CellRange<HSSFCell> removeArrayFormula(Cell cell) { public CellRange<HSSFCell> removeArrayFormula(Cell cell) {
if (cell.getSheet() != this) { if (cell.getSheet() != this) {
throw new IllegalArgumentException("Specified cell does not belong to this sheet."); throw new IllegalArgumentException("Specified cell does not belong to this sheet.");
@ -2188,10 +2264,12 @@ public final class HSSFSheet implements org.apache.poi.ss.usermodel.Sheet {
return result; return result;
} }
@Override
public DataValidationHelper getDataValidationHelper() { public DataValidationHelper getDataValidationHelper() {
return new HSSFDataValidationHelper(this); return new HSSFDataValidationHelper(this);
} }
@Override
public HSSFAutoFilter setAutoFilter(CellRangeAddress range) { public HSSFAutoFilter setAutoFilter(CellRangeAddress range) {
InternalWorkbook workbook = _workbook.getWorkbook(); InternalWorkbook workbook = _workbook.getWorkbook();
int sheetIndex = _workbook.getSheetIndex(this); int sheetIndex = _workbook.getSheetIndex(this);
@ -2298,22 +2376,23 @@ public final class HSSFSheet implements org.apache.poi.ss.usermodel.Sheet {
} }
} }
@Override
public CellRangeAddress getRepeatingRows() { public CellRangeAddress getRepeatingRows() {
return getRepeatingRowsOrColums(true); return getRepeatingRowsOrColums(true);
} }
@Override
public CellRangeAddress getRepeatingColumns() { public CellRangeAddress getRepeatingColumns() {
return getRepeatingRowsOrColums(false); return getRepeatingRowsOrColums(false);
} }
@Override
public void setRepeatingRows(CellRangeAddress rowRangeRef) { public void setRepeatingRows(CellRangeAddress rowRangeRef) {
CellRangeAddress columnRangeRef = getRepeatingColumns(); CellRangeAddress columnRangeRef = getRepeatingColumns();
setRepeatingRowsAndColumns(rowRangeRef, columnRangeRef); setRepeatingRowsAndColumns(rowRangeRef, columnRangeRef);
} }
@Override
public void setRepeatingColumns(CellRangeAddress columnRangeRef) { public void setRepeatingColumns(CellRangeAddress columnRangeRef) {
CellRangeAddress rowRangeRef = getRepeatingRows(); CellRangeAddress rowRangeRef = getRepeatingRows();
setRepeatingRowsAndColumns(rowRangeRef, columnRangeRef); setRepeatingRowsAndColumns(rowRangeRef, columnRangeRef);
@ -2456,6 +2535,7 @@ public final class HSSFSheet implements org.apache.poi.ss.usermodel.Sheet {
* put it into more groups (outlines), reduced as * put it into more groups (outlines), reduced as
* you take it out of them. * you take it out of them.
*/ */
@Override
public int getColumnOutlineLevel(int columnIndex) { public int getColumnOutlineLevel(int columnIndex) {
return _sheet.getColumnOutlineLevel(columnIndex); return _sheet.getColumnOutlineLevel(columnIndex);
} }

View File

@ -919,6 +919,15 @@ public interface Sheet extends Iterable<Row> {
*/ */
Map<CellAddress, ? extends Comment> getCellComments(); Map<CellAddress, ? extends Comment> getCellComments();
/**
* Return the sheet's existing drawing, or null if there isn't yet one.
*
* Use {@link #createDrawingPatriarch()} to get or create
*
* @return a SpreadsheetML drawing
*/
Drawing getDrawingPatriarch();
/** /**
* Creates the top-level drawing patriarch. * Creates the top-level drawing patriarch.
* <p>This may then be used to add graphics or charts.</p> * <p>This may then be used to add graphics or charts.</p>

View File

@ -43,6 +43,7 @@ import org.apache.poi.ss.usermodel.Workbook;
import org.apache.poi.ss.util.CellAddress; import org.apache.poi.ss.util.CellAddress;
import org.apache.poi.ss.util.CellRangeAddress; import org.apache.poi.ss.util.CellRangeAddress;
import org.apache.poi.ss.util.SheetUtil; import org.apache.poi.ss.util.SheetUtil;
import org.apache.poi.util.Internal;
import org.apache.poi.xssf.usermodel.XSSFComment; import org.apache.poi.xssf.usermodel.XSSFComment;
import org.apache.poi.xssf.usermodel.XSSFDataValidation; import org.apache.poi.xssf.usermodel.XSSFDataValidation;
import org.apache.poi.xssf.usermodel.XSSFHyperlink; import org.apache.poi.xssf.usermodel.XSSFHyperlink;
@ -74,6 +75,7 @@ public class SXSSFSheet implements Sheet, Cloneable
/** /**
* for testing purposes only * for testing purposes only
*/ */
@Internal
SheetDataWriter getSheetDataWriter(){ SheetDataWriter getSheetDataWriter(){
return _writer; return _writer;
} }
@ -88,6 +90,7 @@ public class SXSSFSheet implements Sheet, Cloneable
} }
//start of interface implementation //start of interface implementation
@Override
public Iterator<Row> iterator() public Iterator<Row> iterator()
{ {
return rowIterator(); return rowIterator();
@ -102,6 +105,7 @@ public class SXSSFSheet implements Sheet, Cloneable
* a rownum is provided where the row is already flushed to disk. * a rownum is provided where the row is already flushed to disk.
* @see #removeRow(Row) * @see #removeRow(Row)
*/ */
@Override
public SXSSFRow createRow(int rownum) public SXSSFRow createRow(int rownum)
{ {
int maxrow = SpreadsheetVersion.EXCEL2007.getLastRowIndex(); int maxrow = SpreadsheetVersion.EXCEL2007.getLastRowIndex();
@ -158,6 +162,7 @@ public class SXSSFSheet implements Sheet, Cloneable
* *
* @param row representing a row to remove. * @param row representing a row to remove.
*/ */
@Override
public void removeRow(Row row) public void removeRow(Row row)
{ {
if (row.getSheet() != this) { if (row.getSheet() != this) {
@ -182,6 +187,7 @@ public class SXSSFSheet implements Sheet, Cloneable
* @param rownum row to get (0-based) * @param rownum row to get (0-based)
* @return Row representing the rownumber or null if its not defined on the sheet * @return Row representing the rownumber or null if its not defined on the sheet
*/ */
@Override
public SXSSFRow getRow(int rownum) public SXSSFRow getRow(int rownum)
{ {
return _rows.get(rownum); return _rows.get(rownum);
@ -192,6 +198,7 @@ public class SXSSFSheet implements Sheet, Cloneable
* *
* @return the number of physically defined rows in this sheet * @return the number of physically defined rows in this sheet
*/ */
@Override
public int getPhysicalNumberOfRows() public int getPhysicalNumberOfRows()
{ {
return _rows.size()+_writer.getNumberOfFlushedRows(); return _rows.size()+_writer.getNumberOfFlushedRows();
@ -202,6 +209,7 @@ public class SXSSFSheet implements Sheet, Cloneable
* *
* @return the number of the first logical row on the sheet (0-based) * @return the number of the first logical row on the sheet (0-based)
*/ */
@Override
public int getFirstRowNum() public int getFirstRowNum()
{ {
if(_writer.getNumberOfFlushedRows() > 0) if(_writer.getNumberOfFlushedRows() > 0)
@ -214,6 +222,7 @@ public class SXSSFSheet implements Sheet, Cloneable
* *
* @return last row contained n this sheet (0-based) * @return last row contained n this sheet (0-based)
*/ */
@Override
public int getLastRowNum() public int getLastRowNum()
{ {
return _rows.size() == 0 ? 0 : _rows.lastKey(); return _rows.size() == 0 ? 0 : _rows.lastKey();
@ -225,6 +234,7 @@ public class SXSSFSheet implements Sheet, Cloneable
* @param columnIndex - the column to get (0-based) * @param columnIndex - the column to get (0-based)
* @param hidden - the visiblity state of the column * @param hidden - the visiblity state of the column
*/ */
@Override
public void setColumnHidden(int columnIndex, boolean hidden) public void setColumnHidden(int columnIndex, boolean hidden)
{ {
_sh.setColumnHidden(columnIndex,hidden); _sh.setColumnHidden(columnIndex,hidden);
@ -236,6 +246,7 @@ public class SXSSFSheet implements Sheet, Cloneable
* @param columnIndex - the column to set (0-based) * @param columnIndex - the column to set (0-based)
* @return hidden - <code>false</code> if the column is visible * @return hidden - <code>false</code> if the column is visible
*/ */
@Override
public boolean isColumnHidden(int columnIndex) public boolean isColumnHidden(int columnIndex)
{ {
return _sh.isColumnHidden(columnIndex); return _sh.isColumnHidden(columnIndex);
@ -252,6 +263,7 @@ public class SXSSFSheet implements Sheet, Cloneable
* @param columnIndex - the column to set (0-based) * @param columnIndex - the column to set (0-based)
* @param width - the width in units of 1/256th of a character width * @param width - the width in units of 1/256th of a character width
*/ */
@Override
public void setColumnWidth(int columnIndex, int width) public void setColumnWidth(int columnIndex, int width)
{ {
_sh.setColumnWidth(columnIndex,width); _sh.setColumnWidth(columnIndex,width);
@ -262,6 +274,7 @@ public class SXSSFSheet implements Sheet, Cloneable
* @param columnIndex - the column to set (0-based) * @param columnIndex - the column to set (0-based)
* @return width - the width in units of 1/256th of a character width * @return width - the width in units of 1/256th of a character width
*/ */
@Override
public int getColumnWidth(int columnIndex) public int getColumnWidth(int columnIndex)
{ {
return _sh.getColumnWidth(columnIndex); return _sh.getColumnWidth(columnIndex);
@ -286,6 +299,7 @@ public class SXSSFSheet implements Sheet, Cloneable
* *
* @param width default column width measured in characters * @param width default column width measured in characters
*/ */
@Override
public void setDefaultColumnWidth(int width) public void setDefaultColumnWidth(int width)
{ {
_sh.setDefaultColumnWidth(width); _sh.setDefaultColumnWidth(width);
@ -297,6 +311,7 @@ public class SXSSFSheet implements Sheet, Cloneable
* *
* @return default column width measured in characters * @return default column width measured in characters
*/ */
@Override
public int getDefaultColumnWidth() public int getDefaultColumnWidth()
{ {
return _sh.getDefaultColumnWidth(); return _sh.getDefaultColumnWidth();
@ -309,6 +324,7 @@ public class SXSSFSheet implements Sheet, Cloneable
* *
* @return default row height measured in twips (1/20 of a point) * @return default row height measured in twips (1/20 of a point)
*/ */
@Override
public short getDefaultRowHeight() public short getDefaultRowHeight()
{ {
return _sh.getDefaultRowHeight(); return _sh.getDefaultRowHeight();
@ -320,6 +336,7 @@ public class SXSSFSheet implements Sheet, Cloneable
* *
* @return default row height in points * @return default row height in points
*/ */
@Override
public float getDefaultRowHeightInPoints() public float getDefaultRowHeightInPoints()
{ {
return _sh.getDefaultRowHeightInPoints(); return _sh.getDefaultRowHeightInPoints();
@ -331,6 +348,7 @@ public class SXSSFSheet implements Sheet, Cloneable
* *
* @param height default row height measured in twips (1/20 of a point) * @param height default row height measured in twips (1/20 of a point)
*/ */
@Override
public void setDefaultRowHeight(short height) public void setDefaultRowHeight(short height)
{ {
_sh.setDefaultRowHeight(height); _sh.setDefaultRowHeight(height);
@ -341,6 +359,7 @@ public class SXSSFSheet implements Sheet, Cloneable
* points * points
* @param height default row height * @param height default row height
*/ */
@Override
public void setDefaultRowHeightInPoints(float height) public void setDefaultRowHeightInPoints(float height)
{ {
_sh.setDefaultRowHeightInPoints(height); _sh.setDefaultRowHeightInPoints(height);
@ -352,6 +371,7 @@ public class SXSSFSheet implements Sheet, Cloneable
* (0 based) column, or null if no style has been * (0 based) column, or null if no style has been
* set for that column * set for that column
*/ */
@Override
public CellStyle getColumnStyle(int column) public CellStyle getColumnStyle(int column)
{ {
return _sh.getColumnStyle(column); return _sh.getColumnStyle(column);
@ -369,6 +389,7 @@ public class SXSSFSheet implements Sheet, Cloneable
* @param region (rowfrom/colfrom-rowto/colto) to merge * @param region (rowfrom/colfrom-rowto/colto) to merge
* @return index of this region * @return index of this region
*/ */
@Override
public int addMergedRegion(CellRangeAddress region) public int addMergedRegion(CellRangeAddress region)
{ {
return _sh.addMergedRegion(region); return _sh.addMergedRegion(region);
@ -379,6 +400,7 @@ public class SXSSFSheet implements Sheet, Cloneable
* *
* @param value true to vertically center, false otherwise. * @param value true to vertically center, false otherwise.
*/ */
@Override
public void setVerticallyCenter(boolean value) public void setVerticallyCenter(boolean value)
{ {
_sh.setVerticallyCenter(value); _sh.setVerticallyCenter(value);
@ -389,6 +411,7 @@ public class SXSSFSheet implements Sheet, Cloneable
* *
* @param value true to horizontally center, false otherwise. * @param value true to horizontally center, false otherwise.
*/ */
@Override
public void setHorizontallyCenter(boolean value) public void setHorizontallyCenter(boolean value)
{ {
_sh.setHorizontallyCenter(value); _sh.setHorizontallyCenter(value);
@ -397,7 +420,7 @@ public class SXSSFSheet implements Sheet, Cloneable
/** /**
* Determine whether printed output for this sheet will be horizontally centered. * Determine whether printed output for this sheet will be horizontally centered.
*/ */
@Override
public boolean getHorizontallyCenter() public boolean getHorizontallyCenter()
{ {
return _sh.getHorizontallyCenter(); return _sh.getHorizontallyCenter();
@ -406,6 +429,7 @@ public class SXSSFSheet implements Sheet, Cloneable
/** /**
* Determine whether printed output for this sheet will be vertically centered. * Determine whether printed output for this sheet will be vertically centered.
*/ */
@Override
public boolean getVerticallyCenter() public boolean getVerticallyCenter()
{ {
return _sh.getVerticallyCenter(); return _sh.getVerticallyCenter();
@ -416,6 +440,7 @@ public class SXSSFSheet implements Sheet, Cloneable
* *
* @param index of the region to unmerge * @param index of the region to unmerge
*/ */
@Override
public void removeMergedRegion(int index) public void removeMergedRegion(int index)
{ {
_sh.removeMergedRegion(index); _sh.removeMergedRegion(index);
@ -426,6 +451,7 @@ public class SXSSFSheet implements Sheet, Cloneable
* *
* @return number of merged regions * @return number of merged regions
*/ */
@Override
public int getNumMergedRegions() public int getNumMergedRegions()
{ {
return _sh.getNumMergedRegions(); return _sh.getNumMergedRegions();
@ -438,6 +464,7 @@ public class SXSSFSheet implements Sheet, Cloneable
* *
* @return the merged region at the specified index * @return the merged region at the specified index
*/ */
@Override
public CellRangeAddress getMergedRegion(int index) public CellRangeAddress getMergedRegion(int index)
{ {
return _sh.getMergedRegion(index); return _sh.getMergedRegion(index);
@ -460,6 +487,7 @@ public class SXSSFSheet implements Sheet, Cloneable
* @return an iterator of the PHYSICAL rows. Meaning the 3rd element may not * @return an iterator of the PHYSICAL rows. Meaning the 3rd element may not
* be the third row if say for instance the second row is undefined. * be the third row if say for instance the second row is undefined.
*/ */
@Override
public Iterator<Row> rowIterator() public Iterator<Row> rowIterator()
{ {
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
@ -472,6 +500,7 @@ public class SXSSFSheet implements Sheet, Cloneable
* *
* @param value <code>true</code> if the sheet displays Automatic Page Breaks. * @param value <code>true</code> if the sheet displays Automatic Page Breaks.
*/ */
@Override
public void setAutobreaks(boolean value) public void setAutobreaks(boolean value)
{ {
_sh.setAutobreaks(value); _sh.setAutobreaks(value);
@ -482,6 +511,7 @@ public class SXSSFSheet implements Sheet, Cloneable
* *
* @param value - guts or no guts * @param value - guts or no guts
*/ */
@Override
public void setDisplayGuts(boolean value) public void setDisplayGuts(boolean value)
{ {
_sh.setDisplayGuts(value); _sh.setDisplayGuts(value);
@ -493,6 +523,7 @@ public class SXSSFSheet implements Sheet, Cloneable
* *
* @param value whether to display or hide all zero values on the worksheet * @param value whether to display or hide all zero values on the worksheet
*/ */
@Override
public void setDisplayZeros(boolean value) public void setDisplayZeros(boolean value)
{ {
_sh.setDisplayZeros(value); _sh.setDisplayZeros(value);
@ -505,6 +536,7 @@ public class SXSSFSheet implements Sheet, Cloneable
* *
* @return whether all zero values on the worksheet are displayed * @return whether all zero values on the worksheet are displayed
*/ */
@Override
public boolean isDisplayZeros() public boolean isDisplayZeros()
{ {
return _sh.isDisplayZeros(); return _sh.isDisplayZeros();
@ -515,6 +547,7 @@ public class SXSSFSheet implements Sheet, Cloneable
* *
* @param value true for right to left, false otherwise. * @param value true for right to left, false otherwise.
*/ */
@Override
public void setRightToLeft(boolean value) public void setRightToLeft(boolean value)
{ {
_sh.setRightToLeft(value); _sh.setRightToLeft(value);
@ -525,6 +558,7 @@ public class SXSSFSheet implements Sheet, Cloneable
* *
* @return whether the text is displayed in right-to-left mode in the window * @return whether the text is displayed in right-to-left mode in the window
*/ */
@Override
public boolean isRightToLeft() public boolean isRightToLeft()
{ {
return _sh.isRightToLeft(); return _sh.isRightToLeft();
@ -535,6 +569,7 @@ public class SXSSFSheet implements Sheet, Cloneable
* *
* @param value <code>true</code> if the Fit to Page print option is enabled. * @param value <code>true</code> if the Fit to Page print option is enabled.
*/ */
@Override
public void setFitToPage(boolean value) public void setFitToPage(boolean value)
{ {
_sh.setFitToPage(value); _sh.setFitToPage(value);
@ -553,6 +588,7 @@ public class SXSSFSheet implements Sheet, Cloneable
* </p> * </p>
* @param value <code>true</code> if row summaries appear below detail in the outline * @param value <code>true</code> if row summaries appear below detail in the outline
*/ */
@Override
public void setRowSumsBelow(boolean value) public void setRowSumsBelow(boolean value)
{ {
_sh.setRowSumsBelow(value); _sh.setRowSumsBelow(value);
@ -571,6 +607,7 @@ public class SXSSFSheet implements Sheet, Cloneable
* </p> * </p>
* @param value <code>true</code> if col summaries appear right of the detail in the outline * @param value <code>true</code> if col summaries appear right of the detail in the outline
*/ */
@Override
public void setRowSumsRight(boolean value) public void setRowSumsRight(boolean value)
{ {
_sh.setRowSumsRight(value); _sh.setRowSumsRight(value);
@ -581,6 +618,7 @@ public class SXSSFSheet implements Sheet, Cloneable
* *
* @return <code>true</code> if the sheet displays Automatic Page Breaks. * @return <code>true</code> if the sheet displays Automatic Page Breaks.
*/ */
@Override
public boolean getAutobreaks() public boolean getAutobreaks()
{ {
return _sh.getAutobreaks(); return _sh.getAutobreaks();
@ -592,6 +630,7 @@ public class SXSSFSheet implements Sheet, Cloneable
* *
* @return boolean - guts or no guts * @return boolean - guts or no guts
*/ */
@Override
public boolean getDisplayGuts() public boolean getDisplayGuts()
{ {
return _sh.getDisplayGuts(); return _sh.getDisplayGuts();
@ -602,6 +641,7 @@ public class SXSSFSheet implements Sheet, Cloneable
* *
* @return <code>true</code> if the Fit to Page print option is enabled. * @return <code>true</code> if the Fit to Page print option is enabled.
*/ */
@Override
public boolean getFitToPage() public boolean getFitToPage()
{ {
return _sh.getFitToPage(); return _sh.getFitToPage();
@ -620,6 +660,7 @@ public class SXSSFSheet implements Sheet, Cloneable
* </p> * </p>
* @return <code>true</code> if row summaries appear below detail in the outline * @return <code>true</code> if row summaries appear below detail in the outline
*/ */
@Override
public boolean getRowSumsBelow() public boolean getRowSumsBelow()
{ {
return _sh.getRowSumsBelow(); return _sh.getRowSumsBelow();
@ -638,6 +679,7 @@ public class SXSSFSheet implements Sheet, Cloneable
* </p> * </p>
* @return <code>true</code> if col summaries appear right of the detail in the outline * @return <code>true</code> if col summaries appear right of the detail in the outline
*/ */
@Override
public boolean getRowSumsRight() public boolean getRowSumsRight()
{ {
return _sh.getRowSumsRight(); return _sh.getRowSumsRight();
@ -650,6 +692,7 @@ public class SXSSFSheet implements Sheet, Cloneable
* @return <code>true</code> if this sheet displays gridlines. * @return <code>true</code> if this sheet displays gridlines.
* @see #isPrintGridlines() to check if printing of gridlines is turned on or off * @see #isPrintGridlines() to check if printing of gridlines is turned on or off
*/ */
@Override
public boolean isPrintGridlines() public boolean isPrintGridlines()
{ {
return _sh.isPrintGridlines(); return _sh.isPrintGridlines();
@ -664,6 +707,7 @@ public class SXSSFSheet implements Sheet, Cloneable
* @param show <code>true</code> if this sheet should display gridlines. * @param show <code>true</code> if this sheet should display gridlines.
* @see #setPrintGridlines(boolean) * @see #setPrintGridlines(boolean)
*/ */
@Override
public void setPrintGridlines(boolean show) public void setPrintGridlines(boolean show)
{ {
_sh.setPrintGridlines(show); _sh.setPrintGridlines(show);
@ -674,6 +718,7 @@ public class SXSSFSheet implements Sheet, Cloneable
* *
* @return The user model for the print setup object. * @return The user model for the print setup object.
*/ */
@Override
public PrintSetup getPrintSetup() public PrintSetup getPrintSetup()
{ {
return _sh.getPrintSetup(); return _sh.getPrintSetup();
@ -686,6 +731,7 @@ public class SXSSFSheet implements Sheet, Cloneable
* </p> * </p>
* @return the document header. Never <code>null</code> * @return the document header. Never <code>null</code>
*/ */
@Override
public Header getHeader() public Header getHeader()
{ {
return _sh.getHeader(); return _sh.getHeader();
@ -698,6 +744,7 @@ public class SXSSFSheet implements Sheet, Cloneable
* *
* @return the document footer. Never <code>null</code> * @return the document footer. Never <code>null</code>
*/ */
@Override
public Footer getFooter() public Footer getFooter()
{ {
return _sh.getFooter(); return _sh.getFooter();
@ -711,6 +758,7 @@ public class SXSSFSheet implements Sheet, Cloneable
* @param value <code>true</code> if this sheet is selected * @param value <code>true</code> if this sheet is selected
* @see Workbook#setActiveSheet(int) * @see Workbook#setActiveSheet(int)
*/ */
@Override
public void setSelected(boolean value) public void setSelected(boolean value)
{ {
_sh.setSelected(value); _sh.setSelected(value);
@ -722,6 +770,7 @@ public class SXSSFSheet implements Sheet, Cloneable
* @param margin which margin to get * @param margin which margin to get
* @return the size of the margin * @return the size of the margin
*/ */
@Override
public double getMargin(short margin) public double getMargin(short margin)
{ {
return _sh.getMargin(margin); return _sh.getMargin(margin);
@ -733,6 +782,7 @@ public class SXSSFSheet implements Sheet, Cloneable
* @param margin which margin to get * @param margin which margin to get
* @param size the size of the margin * @param size the size of the margin
*/ */
@Override
public void setMargin(short margin, double size) public void setMargin(short margin, double size)
{ {
_sh.setMargin(margin,size); _sh.setMargin(margin,size);
@ -743,6 +793,7 @@ public class SXSSFSheet implements Sheet, Cloneable
* *
* @return true => protection enabled; false => protection disabled * @return true => protection enabled; false => protection disabled
*/ */
@Override
public boolean getProtect() public boolean getProtect()
{ {
return _sh.getProtect(); return _sh.getProtect();
@ -852,6 +903,7 @@ public class SXSSFSheet implements Sheet, Cloneable
* recommended solution, but this may be used for certain cases where * recommended solution, but this may be used for certain cases where
* evaluation in POI is not possible. * evaluation in POI is not possible.
*/ */
@Override
public void setForceFormulaRecalculation(boolean value) { public void setForceFormulaRecalculation(boolean value) {
_sh.setForceFormulaRecalculation(value); _sh.setForceFormulaRecalculation(value);
} }
@ -860,11 +912,14 @@ public class SXSSFSheet implements Sheet, Cloneable
* Whether Excel will be asked to recalculate all formulas when the * Whether Excel will be asked to recalculate all formulas when the
* workbook is opened. * workbook is opened.
*/ */
@Override
public boolean getForceFormulaRecalculation() { public boolean getForceFormulaRecalculation() {
return _sh.getForceFormulaRecalculation(); return _sh.getForceFormulaRecalculation();
} }
/** /**
* <i>Not implemented for SXSSFSheets</i>
*
* Shifts rows between startRow and endRow n number of rows. * Shifts rows between startRow and endRow n number of rows.
* If you use a negative number, it will shift rows up. * If you use a negative number, it will shift rows up.
* Code ensures that rows don't wrap around. * Code ensures that rows don't wrap around.
@ -878,12 +933,15 @@ public class SXSSFSheet implements Sheet, Cloneable
* @param endRow the row to end shifting * @param endRow the row to end shifting
* @param n the number of rows to shift * @param n the number of rows to shift
*/ */
@Override
public void shiftRows(int startRow, int endRow, int n) public void shiftRows(int startRow, int endRow, int n)
{ {
throw new RuntimeException("NotImplemented"); throw new RuntimeException("NotImplemented");
} }
/** /**
* <i>Not implemented for SXSSFSheets</i>
*
* Shifts rows between startRow and endRow n number of rows. * Shifts rows between startRow and endRow n number of rows.
* If you use a negative number, it will shift rows up. * If you use a negative number, it will shift rows up.
* Code ensures that rows don't wrap around * Code ensures that rows don't wrap around
@ -898,6 +956,7 @@ public class SXSSFSheet implements Sheet, Cloneable
* @param copyRowHeight whether to copy the row height during the shift * @param copyRowHeight whether to copy the row height during the shift
* @param resetOriginalRowHeight whether to set the original row's height to the default * @param resetOriginalRowHeight whether to set the original row's height to the default
*/ */
@Override
public void shiftRows(int startRow, int endRow, int n, boolean copyRowHeight, boolean resetOriginalRowHeight) public void shiftRows(int startRow, int endRow, int n, boolean copyRowHeight, boolean resetOriginalRowHeight)
{ {
throw new RuntimeException("NotImplemented"); throw new RuntimeException("NotImplemented");
@ -910,6 +969,7 @@ public class SXSSFSheet implements Sheet, Cloneable
* @param leftmostColumn Left column visible in right pane. * @param leftmostColumn Left column visible in right pane.
* @param topRow Top row visible in bottom pane * @param topRow Top row visible in bottom pane
*/ */
@Override
public void createFreezePane(int colSplit, int rowSplit, int leftmostColumn, int topRow) public void createFreezePane(int colSplit, int rowSplit, int leftmostColumn, int topRow)
{ {
_sh.createFreezePane(colSplit, rowSplit, leftmostColumn, topRow); _sh.createFreezePane(colSplit, rowSplit, leftmostColumn, topRow);
@ -920,6 +980,7 @@ public class SXSSFSheet implements Sheet, Cloneable
* @param colSplit Horizonatal position of split. * @param colSplit Horizonatal position of split.
* @param rowSplit Vertical position of split. * @param rowSplit Vertical position of split.
*/ */
@Override
public void createFreezePane(int colSplit, int rowSplit) public void createFreezePane(int colSplit, int rowSplit)
{ {
_sh.createFreezePane(colSplit,rowSplit); _sh.createFreezePane(colSplit,rowSplit);
@ -938,6 +999,7 @@ public class SXSSFSheet implements Sheet, Cloneable
* @see #PANE_UPPER_LEFT * @see #PANE_UPPER_LEFT
* @see #PANE_UPPER_RIGHT * @see #PANE_UPPER_RIGHT
*/ */
@Override
public void createSplitPane(int xSplitPos, int ySplitPos, int leftmostColumn, int topRow, int activePane) public void createSplitPane(int xSplitPos, int ySplitPos, int leftmostColumn, int topRow, int activePane)
{ {
_sh.createSplitPane(xSplitPos, ySplitPos, leftmostColumn, topRow, activePane); _sh.createSplitPane(xSplitPos, ySplitPos, leftmostColumn, topRow, activePane);
@ -948,6 +1010,7 @@ public class SXSSFSheet implements Sheet, Cloneable
* *
* @return null if no pane configured, or the pane information. * @return null if no pane configured, or the pane information.
*/ */
@Override
public PaneInformation getPaneInformation() public PaneInformation getPaneInformation()
{ {
return _sh.getPaneInformation(); return _sh.getPaneInformation();
@ -958,6 +1021,7 @@ public class SXSSFSheet implements Sheet, Cloneable
* *
* @param show whether to show gridlines or not * @param show whether to show gridlines or not
*/ */
@Override
public void setDisplayGridlines(boolean show) public void setDisplayGridlines(boolean show)
{ {
_sh.setDisplayGridlines(show); _sh.setDisplayGridlines(show);
@ -968,6 +1032,7 @@ public class SXSSFSheet implements Sheet, Cloneable
* *
* @return whether gridlines are displayed * @return whether gridlines are displayed
*/ */
@Override
public boolean isDisplayGridlines() public boolean isDisplayGridlines()
{ {
return _sh.isDisplayGridlines(); return _sh.isDisplayGridlines();
@ -978,6 +1043,7 @@ public class SXSSFSheet implements Sheet, Cloneable
* *
* @param show whether to show formulas or not * @param show whether to show formulas or not
*/ */
@Override
public void setDisplayFormulas(boolean show) public void setDisplayFormulas(boolean show)
{ {
_sh.setDisplayFormulas(show); _sh.setDisplayFormulas(show);
@ -988,6 +1054,7 @@ public class SXSSFSheet implements Sheet, Cloneable
* *
* @return whether formulas are displayed * @return whether formulas are displayed
*/ */
@Override
public boolean isDisplayFormulas() public boolean isDisplayFormulas()
{ {
return _sh.isDisplayFormulas(); return _sh.isDisplayFormulas();
@ -998,6 +1065,7 @@ public class SXSSFSheet implements Sheet, Cloneable
* *
* @param show whether to show RowColHeadings or not * @param show whether to show RowColHeadings or not
*/ */
@Override
public void setDisplayRowColHeadings(boolean show) public void setDisplayRowColHeadings(boolean show)
{ {
_sh.setDisplayRowColHeadings(show); _sh.setDisplayRowColHeadings(show);
@ -1007,6 +1075,7 @@ public class SXSSFSheet implements Sheet, Cloneable
* Returns if RowColHeadings are displayed. * Returns if RowColHeadings are displayed.
* @return whether RowColHeadings are displayed * @return whether RowColHeadings are displayed
*/ */
@Override
public boolean isDisplayRowColHeadings() public boolean isDisplayRowColHeadings()
{ {
return _sh.isDisplayRowColHeadings(); return _sh.isDisplayRowColHeadings();
@ -1016,6 +1085,7 @@ public class SXSSFSheet implements Sheet, Cloneable
* Sets a page break at the indicated row * Sets a page break at the indicated row
* @param row FIXME: Document this! * @param row FIXME: Document this!
*/ */
@Override
public void setRowBreak(int row) public void setRowBreak(int row)
{ {
_sh.setRowBreak(row); _sh.setRowBreak(row);
@ -1026,6 +1096,7 @@ public class SXSSFSheet implements Sheet, Cloneable
* @param row FIXME: Document this! * @param row FIXME: Document this!
* @return FIXME: Document this! * @return FIXME: Document this!
*/ */
@Override
public boolean isRowBroken(int row) public boolean isRowBroken(int row)
{ {
return _sh.isRowBroken(row); return _sh.isRowBroken(row);
@ -1035,6 +1106,7 @@ public class SXSSFSheet implements Sheet, Cloneable
* Removes the page break at the indicated row * Removes the page break at the indicated row
* @param row * @param row
*/ */
@Override
public void removeRowBreak(int row) public void removeRowBreak(int row)
{ {
_sh.removeRowBreak(row); _sh.removeRowBreak(row);
@ -1044,6 +1116,7 @@ public class SXSSFSheet implements Sheet, Cloneable
* Retrieves all the horizontal page breaks * Retrieves all the horizontal page breaks
* @return all the horizontal page breaks, or null if there are no row page breaks * @return all the horizontal page breaks, or null if there are no row page breaks
*/ */
@Override
public int[] getRowBreaks() public int[] getRowBreaks()
{ {
return _sh.getRowBreaks(); return _sh.getRowBreaks();
@ -1053,6 +1126,7 @@ public class SXSSFSheet implements Sheet, Cloneable
* Retrieves all the vertical page breaks * Retrieves all the vertical page breaks
* @return all the vertical page breaks, or null if there are no column page breaks * @return all the vertical page breaks, or null if there are no column page breaks
*/ */
@Override
public int[] getColumnBreaks() public int[] getColumnBreaks()
{ {
return _sh.getColumnBreaks(); return _sh.getColumnBreaks();
@ -1062,6 +1136,7 @@ public class SXSSFSheet implements Sheet, Cloneable
* Sets a page break at the indicated column * Sets a page break at the indicated column
* @param column * @param column
*/ */
@Override
public void setColumnBreak(int column) public void setColumnBreak(int column)
{ {
_sh.setColumnBreak(column); _sh.setColumnBreak(column);
@ -1072,6 +1147,7 @@ public class SXSSFSheet implements Sheet, Cloneable
* @param column FIXME: Document this! * @param column FIXME: Document this!
* @return FIXME: Document this! * @return FIXME: Document this!
*/ */
@Override
public boolean isColumnBroken(int column) public boolean isColumnBroken(int column)
{ {
return _sh.isColumnBroken(column); return _sh.isColumnBroken(column);
@ -1081,6 +1157,7 @@ public class SXSSFSheet implements Sheet, Cloneable
* Removes a page break at the indicated column * Removes a page break at the indicated column
* @param column * @param column
*/ */
@Override
public void removeColumnBreak(int column) public void removeColumnBreak(int column)
{ {
_sh.removeColumnBreak(column); _sh.removeColumnBreak(column);
@ -1092,6 +1169,7 @@ public class SXSSFSheet implements Sheet, Cloneable
* @param columnNumber One of the columns in the group. * @param columnNumber One of the columns in the group.
* @param collapsed true = collapse group, false = expand group. * @param collapsed true = collapse group, false = expand group.
*/ */
@Override
public void setColumnGroupCollapsed(int columnNumber, boolean collapsed) public void setColumnGroupCollapsed(int columnNumber, boolean collapsed)
{ {
_sh.setColumnGroupCollapsed(columnNumber, collapsed); _sh.setColumnGroupCollapsed(columnNumber, collapsed);
@ -1103,6 +1181,7 @@ public class SXSSFSheet implements Sheet, Cloneable
* @param fromColumn beginning of the column range. * @param fromColumn beginning of the column range.
* @param toColumn end of the column range. * @param toColumn end of the column range.
*/ */
@Override
public void groupColumn(int fromColumn, int toColumn) public void groupColumn(int fromColumn, int toColumn)
{ {
_sh.groupColumn(fromColumn,toColumn); _sh.groupColumn(fromColumn,toColumn);
@ -1114,6 +1193,7 @@ public class SXSSFSheet implements Sheet, Cloneable
* @param fromColumn start column (0-based) * @param fromColumn start column (0-based)
* @param toColumn end column (0-based) * @param toColumn end column (0-based)
*/ */
@Override
public void ungroupColumn(int fromColumn, int toColumn) public void ungroupColumn(int fromColumn, int toColumn)
{ {
_sh.ungroupColumn(fromColumn, toColumn); _sh.ungroupColumn(fromColumn, toColumn);
@ -1156,6 +1236,7 @@ public class SXSSFSheet implements Sheet, Cloneable
* @param fromRow start row (0-based) * @param fromRow start row (0-based)
* @param toRow end row (0-based) * @param toRow end row (0-based)
*/ */
@Override
public void groupRow(int fromRow, int toRow) public void groupRow(int fromRow, int toRow)
{ {
for(SXSSFRow row : _rows.subMap(fromRow, toRow + 1).values()){ for(SXSSFRow row : _rows.subMap(fromRow, toRow + 1).values()){
@ -1206,6 +1287,7 @@ public class SXSSFSheet implements Sheet, Cloneable
* @param fromRow start row (0-based) * @param fromRow start row (0-based)
* @param toRow end row (0-based) * @param toRow end row (0-based)
*/ */
@Override
public void ungroupRow(int fromRow, int toRow) public void ungroupRow(int fromRow, int toRow)
{ {
_sh.ungroupRow(fromRow, toRow); _sh.ungroupRow(fromRow, toRow);
@ -1217,6 +1299,7 @@ public class SXSSFSheet implements Sheet, Cloneable
* @param row start row of a groupped range of rows (0-based) * @param row start row of a groupped range of rows (0-based)
* @param collapse whether to expand/collapse the detail rows * @param collapse whether to expand/collapse the detail rows
*/ */
@Override
public void setRowGroupCollapsed(int row, boolean collapse) public void setRowGroupCollapsed(int row, boolean collapse)
{ {
if (collapse) { if (collapse) {
@ -1286,6 +1369,7 @@ public class SXSSFSheet implements Sheet, Cloneable
* @param column the column index * @param column the column index
* @param style the style to set * @param style the style to set
*/ */
@Override
public void setDefaultColumnStyle(int column, CellStyle style) public void setDefaultColumnStyle(int column, CellStyle style)
{ {
_sh.setDefaultColumnStyle(column, style); _sh.setDefaultColumnStyle(column, style);
@ -1304,6 +1388,7 @@ public class SXSSFSheet implements Sheet, Cloneable
* *
* @param column the column index * @param column the column index
*/ */
@Override
public void autoSizeColumn(int column) public void autoSizeColumn(int column)
{ {
autoSizeColumn(column, false); autoSizeColumn(column, false);
@ -1322,6 +1407,7 @@ public class SXSSFSheet implements Sheet, Cloneable
* @param column the column index * @param column the column index
* @param useMergedCells whether to use the contents of merged cells when calculating the width of the column * @param useMergedCells whether to use the contents of merged cells when calculating the width of the column
*/ */
@Override
public void autoSizeColumn(int column, boolean useMergedCells) public void autoSizeColumn(int column, boolean useMergedCells)
{ {
double width = SheetUtil.getColumnWidth(this, column, useMergedCells); double width = SheetUtil.getColumnWidth(this, column, useMergedCells);
@ -1390,12 +1476,22 @@ public class SXSSFSheet implements Sheet, Cloneable
public List<XSSFHyperlink> getHyperlinkList() { public List<XSSFHyperlink> getHyperlinkList() {
return _sh.getHyperlinkList(); return _sh.getHyperlinkList();
} }
/**
* {@inheritDoc}
*/
@Override
public Drawing getDrawingPatriarch()
{
return _sh.getDrawingPatriarch();
}
/** /**
* Creates the top-level drawing patriarch. * Creates the top-level drawing patriarch.
* *
* @return The new drawing patriarch. * @return The new drawing patriarch.
*/ */
@Override
public Drawing createDrawingPatriarch() public Drawing createDrawingPatriarch()
{ {
return _sh.createDrawingPatriarch(); return _sh.createDrawingPatriarch();
@ -1407,6 +1503,7 @@ public class SXSSFSheet implements Sheet, Cloneable
* *
* @return the parent workbook * @return the parent workbook
*/ */
@Override
public SXSSFWorkbook getWorkbook() public SXSSFWorkbook getWorkbook()
{ {
return _workbook; return _workbook;
@ -1417,6 +1514,7 @@ public class SXSSFSheet implements Sheet, Cloneable
* *
* @return the name of this sheet * @return the name of this sheet
*/ */
@Override
public String getSheetName() public String getSheetName()
{ {
return _sh.getSheetName(); return _sh.getSheetName();
@ -1426,6 +1524,7 @@ public class SXSSFSheet implements Sheet, Cloneable
* Note - this is not the same as whether the sheet is focused (isActive) * Note - this is not the same as whether the sheet is focused (isActive)
* @return <code>true</code> if this sheet is currently selected * @return <code>true</code> if this sheet is currently selected
*/ */
@Override
public boolean isSelected() public boolean isSelected()
{ {
return _sh.isSelected(); return _sh.isSelected();
@ -1439,6 +1538,7 @@ public class SXSSFSheet implements Sheet, Cloneable
* @param range Region of array formula for result. * @param range Region of array formula for result.
* @return the {@link CellRange} of cells affected by this change * @return the {@link CellRange} of cells affected by this change
*/ */
@Override
public CellRange<? extends Cell> setArrayFormula(String formula, CellRangeAddress range) public CellRange<? extends Cell> setArrayFormula(String formula, CellRangeAddress range)
{ {
return _sh.setArrayFormula(formula, range); return _sh.setArrayFormula(formula, range);
@ -1450,16 +1550,19 @@ public class SXSSFSheet implements Sheet, Cloneable
* @param cell any cell within Array Formula range * @param cell any cell within Array Formula range
* @return the {@link CellRange} of cells affected by this change * @return the {@link CellRange} of cells affected by this change
*/ */
@Override
public CellRange<? extends Cell> removeArrayFormula(Cell cell) public CellRange<? extends Cell> removeArrayFormula(Cell cell)
{ {
return _sh.removeArrayFormula(cell); return _sh.removeArrayFormula(cell);
} }
@Override
public DataValidationHelper getDataValidationHelper() public DataValidationHelper getDataValidationHelper()
{ {
return _sh.getDataValidationHelper(); return _sh.getDataValidationHelper();
} }
@Override
public List<XSSFDataValidation> getDataValidations() public List<XSSFDataValidation> getDataValidations()
{ {
return _sh.getDataValidations(); return _sh.getDataValidations();
@ -1469,6 +1572,7 @@ public class SXSSFSheet implements Sheet, Cloneable
* Creates a data validation object * Creates a data validation object
* @param dataValidation The Data validation object settings * @param dataValidation The Data validation object settings
*/ */
@Override
public void addValidationData(DataValidation dataValidation) public void addValidationData(DataValidation dataValidation)
{ {
_sh.addValidationData(dataValidation); _sh.addValidationData(dataValidation);
@ -1479,28 +1583,34 @@ public class SXSSFSheet implements Sheet, Cloneable
* *
* @param range the range of cells to filter * @param range the range of cells to filter
*/ */
@Override
public AutoFilter setAutoFilter(CellRangeAddress range) public AutoFilter setAutoFilter(CellRangeAddress range)
{ {
return _sh.setAutoFilter(range); return _sh.setAutoFilter(range);
} }
@Override
public SheetConditionalFormatting getSheetConditionalFormatting(){ public SheetConditionalFormatting getSheetConditionalFormatting(){
return _sh.getSheetConditionalFormatting(); return _sh.getSheetConditionalFormatting();
} }
@Override
public CellRangeAddress getRepeatingRows() { public CellRangeAddress getRepeatingRows() {
return _sh.getRepeatingRows(); return _sh.getRepeatingRows();
} }
@Override
public CellRangeAddress getRepeatingColumns() { public CellRangeAddress getRepeatingColumns() {
return _sh.getRepeatingColumns(); return _sh.getRepeatingColumns();
} }
@Override
public void setRepeatingRows(CellRangeAddress rowRangeRef) { public void setRepeatingRows(CellRangeAddress rowRangeRef) {
_sh.setRepeatingRows(rowRangeRef); _sh.setRepeatingRows(rowRangeRef);
} }
@Override
public void setRepeatingColumns(CellRangeAddress columnRangeRef) { public void setRepeatingColumns(CellRangeAddress columnRangeRef) {
_sh.setRepeatingColumns(columnRangeRef); _sh.setRepeatingColumns(columnRangeRef);
} }
@ -1600,6 +1710,7 @@ public class SXSSFSheet implements Sheet, Cloneable
return _writer.dispose(); return _writer.dispose();
} }
@Override
public int getColumnOutlineLevel(int columnIndex) { public int getColumnOutlineLevel(int columnIndex) {
return _sh.getColumnOutlineLevel(columnIndex); return _sh.getColumnOutlineLevel(columnIndex);
} }

View File

@ -26,13 +26,13 @@ import java.io.InputStream;
import java.io.OutputStream; import java.io.OutputStream;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
import java.util.Collection;
import java.util.Collections; import java.util.Collections;
import java.util.Comparator; import java.util.Comparator;
import java.util.HashMap; import java.util.HashMap;
import java.util.Iterator; import java.util.Iterator;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Set;
import java.util.SortedMap; import java.util.SortedMap;
import java.util.TreeMap; import java.util.TreeMap;
@ -446,6 +446,7 @@ public class XSSFSheet extends POIXMLDocumentPart implements Sheet {
* *
* @return a SpreadsheetML drawing * @return a SpreadsheetML drawing
*/ */
@Override
public XSSFDrawing getDrawingPatriarch() { public XSSFDrawing getDrawingPatriarch() {
CTDrawing ctDrawing = getCTDrawing(); CTDrawing ctDrawing = getCTDrawing();
if (ctDrawing != null) { if (ctDrawing != null) {
@ -1761,7 +1762,7 @@ public class XSSFSheet extends POIXMLDocumentPart implements Sheet {
* @param indices A set of the regions to unmerge * @param indices A set of the regions to unmerge
*/ */
@SuppressWarnings("deprecation") @SuppressWarnings("deprecation")
public void removeMergedRegions(Set<Integer> indices) { public void removeMergedRegions(Collection<Integer> indices) {
if (!worksheet.isSetMergeCells()) return; if (!worksheet.isSetMergeCells()) return;
CTMergeCells ctMergeCells = worksheet.getMergeCells(); CTMergeCells ctMergeCells = worksheet.getMergeCells();