public class PrintSetupImpl extends Object implements SPrintSetup, Serializable
SPrintSetup.PaperSize
Constructor and Description |
---|
PrintSetupImpl() |
Modifier and Type | Method and Description |
---|---|
void |
copyFrom(PrintSetupImpl src) |
double |
getBottomMargin() |
int |
getCommentsMode() |
int |
getErrorPrintMode() |
SFooter |
getEvenFooter() |
SHeader |
getEvenHeader() |
SFooter |
getFirstFooter() |
SHeader |
getFirstHeader() |
int |
getFitHeight() |
int |
getFitWidth() |
SFooter |
getFooter() |
double |
getFooterMargin() |
SHeader |
getHeader() |
double |
getHeaderMargin() |
double |
getLeftMargin() |
int |
getPageStart() |
SPrintSetup.PaperSize |
getPaperSize() |
String |
getPrintArea() |
CellRegion |
getRepeatingColumnsTitle() |
CellRegion |
getRepeatingRowsTitle() |
double |
getRightMargin() |
int |
getScale() |
double |
getTopMargin() |
boolean |
isAlignWithMargins() |
boolean |
isDifferentFirstPage() |
boolean |
isDifferentOddEvenPage() |
boolean |
isHCenter() |
boolean |
isLandscape() |
boolean |
isLeftToRight() |
boolean |
isPrintGridlines() |
boolean |
isPrintHeadings() |
boolean |
isScaleWithDoc() |
boolean |
isVCenter() |
void |
setAlignWithMargins(boolean flag)
Set true to align header/footer with page margins.
|
void |
setBottomMargin(double bottomMargin) |
void |
setCommentsMode(int mode)
Set how to print comments:
0: none
1: at end of sheet
2: as displayed on the sheet
|
void |
setDifferentFirstPage(boolean flag)
Set true to print first page with special header and footer for first
page;
SPrintSetup.getFirstHeader() and SPrintSetup.getFirstFooter() . |
void |
setDifferentOddEvenPage(boolean flag)
Set true to print even page with special header and footer for even
page;
SPrintSetup.getEvenHeader() and SPrintSetup.getEvenFooter() . |
void |
setErrorPrintMode(int mode)
Set how to handle errors in the cell data;
0: print errors as displayed on the sheet
1: print errors as blank
2: print errors as dashes ("--")
3: print errors as "#N/A".
|
void |
setEvenFooter(SFooter footer)
Set even page footer; valid only if
SPrintSetup.isDifferentOddEvenPage() is true. |
void |
setEvenHeader(SHeader header)
Set even page footer; valid only if
SPrintSetup.isDifferentOddEvenPage() is true. |
void |
setFirstFooter(SFooter footer)
Set first page footer; valid only if
SPrintSetup.isDifferentFirstPage() is true. |
void |
setFirstHeader(SHeader header)
Set first page footer; valid only if
SPrintSetup.isDifferentFirstPage() is true. |
void |
setFitHeight(int numPages)
Set the number of pages the sheet height
is fit to.
|
void |
setFitWidth(int numPages)
Set the number of pages the sheet width
is fit to.
|
void |
setFooter(SFooter footer)
Set general footer or odd page footer.
|
void |
setFooterMargin(double footerMargin) |
void |
setHCenter(boolean center)
Set true to print sheet center horizontally on page.
|
void |
setHeader(SHeader header)
Set general Header or odd page header.
|
void |
setHeaderMargin(double headerMargin) |
void |
setLandscape(boolean landscape)
Set true to print in landscape orientation.
|
void |
setLeftMargin(double leftMargin) |
void |
setLeftToRight(boolean flag)
Set true to output multiple pages in the order of left-to-right first
and then top-to-bottom; false in the order of top-to-bottom first and
then left-to-right.
|
void |
setPageStart(int start) |
void |
setPaperSize(SPrintSetup.PaperSize size) |
void |
setPrintArea(String formula)
Set the print area as an area formula; e.g.
|
void |
setPrintGridlines(boolean enable) |
void |
setPrintHeadings(boolean flag)
Set true to also out row and column headings.
|
void |
setRepeatingColumnsTitle(int firstCol,
int lastCol)
Set the first column of the repeat title columns for each left-to-right
pages.
|
void |
setRepeatingRowsTitle(int firstRow,
int lastRow)
Set the first row of the repeat title rows for each top-to-bottom pages.
|
void |
setRightMargin(double rightMargin) |
void |
setScale(int scale) |
void |
setScaleWithDoc(boolean flag)
Set true to scale header/footer with document.
|
void |
setTopMargin(double topMargin) |
void |
setVCenter(boolean center)
Set true to print sheet center vertically on page.
|
public boolean isPrintGridlines()
isPrintGridlines
in interface SPrintSetup
public void setPrintGridlines(boolean enable)
setPrintGridlines
in interface SPrintSetup
public double getHeaderMargin()
getHeaderMargin
in interface SPrintSetup
public void setHeaderMargin(double headerMargin)
setHeaderMargin
in interface SPrintSetup
public double getFooterMargin()
getFooterMargin
in interface SPrintSetup
public void setFooterMargin(double footerMargin)
setFooterMargin
in interface SPrintSetup
public double getLeftMargin()
getLeftMargin
in interface SPrintSetup
public void setLeftMargin(double leftMargin)
setLeftMargin
in interface SPrintSetup
public double getRightMargin()
getRightMargin
in interface SPrintSetup
public void setRightMargin(double rightMargin)
setRightMargin
in interface SPrintSetup
public double getTopMargin()
getTopMargin
in interface SPrintSetup
public void setTopMargin(double topMargin)
setTopMargin
in interface SPrintSetup
public double getBottomMargin()
getBottomMargin
in interface SPrintSetup
public void setBottomMargin(double bottomMargin)
setBottomMargin
in interface SPrintSetup
public void setPaperSize(SPrintSetup.PaperSize size)
setPaperSize
in interface SPrintSetup
public SPrintSetup.PaperSize getPaperSize()
getPaperSize
in interface SPrintSetup
public void setLandscape(boolean landscape)
SPrintSetup
setLandscape
in interface SPrintSetup
public boolean isLandscape()
isLandscape
in interface SPrintSetup
public void setScale(int scale)
setScale
in interface SPrintSetup
scale
- must be between 10 ~ 400 (inclusive).public int getScale()
getScale
in interface SPrintSetup
public void copyFrom(PrintSetupImpl src)
public void setHeader(SHeader header)
SPrintSetup
setHeader
in interface SPrintSetup
public SHeader getHeader()
getHeader
in interface SPrintSetup
public void setEvenHeader(SHeader header)
SPrintSetup
SPrintSetup.isDifferentOddEvenPage()
is true.setEvenHeader
in interface SPrintSetup
public SHeader getEvenHeader()
getEvenHeader
in interface SPrintSetup
public void setFirstHeader(SHeader header)
SPrintSetup
SPrintSetup.isDifferentFirstPage()
is true.setFirstHeader
in interface SPrintSetup
public SHeader getFirstHeader()
getFirstHeader
in interface SPrintSetup
public void setFooter(SFooter footer)
SPrintSetup
setFooter
in interface SPrintSetup
public SFooter getFooter()
getFooter
in interface SPrintSetup
public void setEvenFooter(SFooter footer)
SPrintSetup
SPrintSetup.isDifferentOddEvenPage()
is true.setEvenFooter
in interface SPrintSetup
public SFooter getEvenFooter()
getEvenFooter
in interface SPrintSetup
public void setFirstFooter(SFooter footer)
SPrintSetup
SPrintSetup.isDifferentFirstPage()
is true.setFirstFooter
in interface SPrintSetup
public SFooter getFirstFooter()
getFirstFooter
in interface SPrintSetup
public void setScaleWithDoc(boolean flag)
SPrintSetup
setScaleWithDoc
in interface SPrintSetup
public boolean isScaleWithDoc()
isScaleWithDoc
in interface SPrintSetup
public void setAlignWithMargins(boolean flag)
SPrintSetup
setAlignWithMargins
in interface SPrintSetup
public boolean isAlignWithMargins()
isAlignWithMargins
in interface SPrintSetup
public void setHCenter(boolean center)
SPrintSetup
setHCenter
in interface SPrintSetup
public boolean isHCenter()
isHCenter
in interface SPrintSetup
public void setVCenter(boolean center)
SPrintSetup
setVCenter
in interface SPrintSetup
public boolean isVCenter()
isVCenter
in interface SPrintSetup
public void setPageStart(int start)
setPageStart
in interface SPrintSetup
public int getPageStart()
getPageStart
in interface SPrintSetup
public void setFitWidth(int numPages)
SPrintSetup
setFitWidth
in interface SPrintSetup
public int getFitWidth()
getFitWidth
in interface SPrintSetup
public void setFitHeight(int numPages)
SPrintSetup
setFitHeight
in interface SPrintSetup
public int getFitHeight()
getFitHeight
in interface SPrintSetup
public void setPrintArea(String formula)
SPrintSetup
setPrintArea
in interface SPrintSetup
public String getPrintArea()
getPrintArea
in interface SPrintSetup
public void setRepeatingRowsTitle(int firstRow, int lastRow)
SPrintSetup
setRepeatingRowsTitle
in interface SPrintSetup
public CellRegion getRepeatingRowsTitle()
getRepeatingRowsTitle
in interface SPrintSetup
public void setRepeatingColumnsTitle(int firstCol, int lastCol)
SPrintSetup
setRepeatingColumnsTitle
in interface SPrintSetup
public CellRegion getRepeatingColumnsTitle()
getRepeatingColumnsTitle
in interface SPrintSetup
public void setPrintHeadings(boolean flag)
SPrintSetup
setPrintHeadings
in interface SPrintSetup
public boolean isPrintHeadings()
isPrintHeadings
in interface SPrintSetup
public void setCommentsMode(int mode)
SPrintSetup
setCommentsMode
in interface SPrintSetup
public int getCommentsMode()
getCommentsMode
in interface SPrintSetup
public void setErrorPrintMode(int mode)
SPrintSetup
setErrorPrintMode
in interface SPrintSetup
public int getErrorPrintMode()
getErrorPrintMode
in interface SPrintSetup
public void setLeftToRight(boolean flag)
SPrintSetup
setLeftToRight
in interface SPrintSetup
public boolean isLeftToRight()
isLeftToRight
in interface SPrintSetup
public void setDifferentOddEvenPage(boolean flag)
SPrintSetup
SPrintSetup.getEvenHeader()
and SPrintSetup.getEvenFooter()
.setDifferentOddEvenPage
in interface SPrintSetup
public boolean isDifferentOddEvenPage()
isDifferentOddEvenPage
in interface SPrintSetup
public void setDifferentFirstPage(boolean flag)
SPrintSetup
SPrintSetup.getFirstHeader()
and SPrintSetup.getFirstFooter()
.setDifferentFirstPage
in interface SPrintSetup
public boolean isDifferentFirstPage()
isDifferentFirstPage
in interface SPrintSetup
Copyright © 2020. All rights reserved.