public class MissingCloneSheetProperties
extends java.lang.Object
As it turns out, Workbook#cloneSheet
doesn't clone all the
properties of a Sheet
, specifically missing things such as
Print Setup properties. The coverage is higher for HSSF than for XSSF, but
still not complete.
In addition, it seems that calling Workbook#setSheetOrder
completely messes up XSSF, including nulling out any Repeating Rows and
setting other Print Setup properties to defaults.
This object stores all such incorrectly cloned sheet properties. These properties will be read and assigned to this object prior to any cloning. After cloning and sheet moving, these properties will be the source data to put the data back.
There are other properties that have to do with Print Setup, but if they are correctly copied, then there is no reason for them to be here.
Constructor | Description |
---|---|
MissingCloneSheetProperties() |
Default constructor to set things to default values.
|
MissingCloneSheetProperties(MissingCloneSheetProperties other) |
When a
Sheet is cloned, we will of course need to clone the
missing clone sheet properties as well. |
Modifier and Type | Method | Description |
---|---|---|
short |
getCopies() |
Returns the number of copies.
|
short |
getFitHeight() |
Returns the number of pages tall to fit the sheet.
|
short |
getFitWidth() |
Returns the number of pages wide to fit the sheet.
|
short |
getHResolution() |
Returns the "H Resolution".
|
short |
getPageStart() |
Returns the starting page number.
|
short |
getPaperSize() |
Returns the paper size.
|
org.apache.poi.ss.util.CellRangeAddress |
getRepeatingColumns() |
Returns the range of columns to repeat at the left of every page.
|
org.apache.poi.ss.util.CellRangeAddress |
getRepeatingRows() |
Returns the range of rows to repeat at the top of every page.
|
short |
getScale() |
Returns the scale.
|
short |
getVResolution() |
Returns the "V resolution".
|
boolean |
isDraft() |
Returns whether it's draft quality.
|
boolean |
isLandscape() |
Returns whether it's landscape.
|
boolean |
isLeftToRight() |
Returns whether the page print order should be left to right before up to down.
|
boolean |
isNoColor() |
Returns whether to print with no color (b/w).
|
boolean |
isNotes() |
Returns whether to use "notes".
|
boolean |
isUsePage() |
Returns whether to "use page".
|
boolean |
isValidSettings() |
Returns whether the settings are "valid".
|
void |
setCopies(short copies) |
Sets the number of copies.
|
void |
setDraft(boolean draft) |
Sets whether it's draft quality.
|
void |
setFitHeight(short fitHeight) |
Sets the number of pages tall to fit the sheet.
|
void |
setFitWidth(short fitWidth) |
Sets the number of pages wide to fit the sheet.
|
void |
setHResolution(short hResolution) |
Sets the "H Resolution".
|
void |
setLandscape(boolean landscape) |
Sets whether it's landscape.
|
void |
setLeftToRight(boolean leftToRight) |
Sets whether the page print order should be left to right before up to down.
|
void |
setNoColor(boolean noColor) |
Sets whether to print with no color (b/w).
|
void |
setNotes(boolean notes) |
Sets whether to use "notes".
|
void |
setPageStart(short pageStart) |
Sets the starting page number.
|
void |
setPaperSize(short paperSize) |
Sets the paper size.
|
void |
setRepeatingColumns(org.apache.poi.ss.util.CellRangeAddress repeatingColumns) |
Sets the range of columns to repeat at the left of every page.
|
void |
setRepeatingRows(org.apache.poi.ss.util.CellRangeAddress repeatingRows) |
Sets the range of rows to repeat at the top of every page.
|
void |
setScale(short scale) |
Sets the scale.
|
void |
setUsePage(boolean usePage) |
Sets whether to "use page".
|
void |
setValidSettings(boolean validSettings) |
Sets whether the settings are "valid".
|
void |
setVResolution(short vResolution) |
Sets the "V resolution".
|
public MissingCloneSheetProperties()
public MissingCloneSheetProperties(MissingCloneSheetProperties other)
Sheet
is cloned, we will of course need to clone the
missing clone sheet properties as well. This is the copy constructor.other
- Another MissingCloneSheetProperties
.public org.apache.poi.ss.util.CellRangeAddress getRepeatingColumns()
public void setRepeatingColumns(org.apache.poi.ss.util.CellRangeAddress repeatingColumns)
repeatingColumns
- The range of columns to repeat at the left of every page.public org.apache.poi.ss.util.CellRangeAddress getRepeatingRows()
public void setRepeatingRows(org.apache.poi.ss.util.CellRangeAddress repeatingRows)
repeatingRows
- The range of rows to repeat at the top of every page.public short getCopies()
public void setCopies(short copies)
copies
- The number of copies.public boolean isDraft()
public void setDraft(boolean draft)
draft
- Whether it's draft quality.public short getFitHeight()
public void setFitHeight(short fitHeight)
fitHeight
- The number of pages tall to fit the sheet.public short getFitWidth()
public void setFitWidth(short fitWidth)
fitWidth
- The number of pages wide to fit the sheet.public short getHResolution()
public void setHResolution(short hResolution)
hResolution
- The "H Resolution".public boolean isLandscape()
public void setLandscape(boolean landscape)
landscape
- Whether it's landscape.public boolean isLeftToRight()
public void setLeftToRight(boolean leftToRight)
leftToRight
- Whether the page print order should be left to right before up to down.public boolean isNoColor()
public void setNoColor(boolean noColor)
noColor
- Whether to print with no color (b/w).public boolean isNotes()
public void setNotes(boolean notes)
notes
- Whether to use "notes".public short getPageStart()
public void setPageStart(short pageStart)
pageStart
- The starting page number.public short getPaperSize()
public void setPaperSize(short paperSize)
paperSize
- The paper size.public short getScale()
public void setScale(short scale)
scale
- The scale.public boolean isUsePage()
public void setUsePage(boolean usePage)
usePage
- Whether to "use page".public boolean isValidSettings()
public void setValidSettings(boolean validSettings)
validSettings
- Whether the settings are "valid".public short getVResolution()
public void setVResolution(short vResolution)
vResolution
- The "V resolution".Copyright © 2012–2018 Jett Team. All rights reserved.