Package io.keikai.model.impl
Class PrintSetupImpl
- java.lang.Object
-
- io.keikai.model.impl.PrintSetupImpl
-
- All Implemented Interfaces:
SPrintSetup
,Serializable
public class PrintSetupImpl extends Object implements SPrintSetup, Serializable
- Since:
- 3.5.0
- Author:
- Dennis
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface io.keikai.model.SPrintSetup
SPrintSetup.PaperSize
-
-
Constructor Summary
Constructors Constructor Description PrintSetupImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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 sheetvoid
setDifferentFirstPage(boolean flag)
Set true to print first page with special header and footer for first page; {@see #getFirstHeader()} and {@see #getFirstFooter()}.void
setDifferentOddEvenPage(boolean flag)
Set true to print even page with special header and footer for even page; {@see #getEvenHeader()} and {@see #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 ifSPrintSetup.isDifferentOddEvenPage()
is true.void
setEvenHeader(SHeader header)
Set even page footer; valid only ifSPrintSetup.isDifferentOddEvenPage()
is true.void
setFirstFooter(SFooter footer)
Set first page footer; valid only ifSPrintSetup.isDifferentFirstPage()
is true.void
setFirstHeader(SHeader header)
Set first page footer; valid only ifSPrintSetup.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.
-
-
-
Method Detail
-
isPrintGridlines
public boolean isPrintGridlines()
- Specified by:
isPrintGridlines
in interfaceSPrintSetup
-
setPrintGridlines
public void setPrintGridlines(boolean enable)
- Specified by:
setPrintGridlines
in interfaceSPrintSetup
-
getHeaderMargin
public double getHeaderMargin()
- Specified by:
getHeaderMargin
in interfaceSPrintSetup
-
setHeaderMargin
public void setHeaderMargin(double headerMargin)
- Specified by:
setHeaderMargin
in interfaceSPrintSetup
-
getFooterMargin
public double getFooterMargin()
- Specified by:
getFooterMargin
in interfaceSPrintSetup
-
setFooterMargin
public void setFooterMargin(double footerMargin)
- Specified by:
setFooterMargin
in interfaceSPrintSetup
-
getLeftMargin
public double getLeftMargin()
- Specified by:
getLeftMargin
in interfaceSPrintSetup
-
setLeftMargin
public void setLeftMargin(double leftMargin)
- Specified by:
setLeftMargin
in interfaceSPrintSetup
-
getRightMargin
public double getRightMargin()
- Specified by:
getRightMargin
in interfaceSPrintSetup
-
setRightMargin
public void setRightMargin(double rightMargin)
- Specified by:
setRightMargin
in interfaceSPrintSetup
-
getTopMargin
public double getTopMargin()
- Specified by:
getTopMargin
in interfaceSPrintSetup
-
setTopMargin
public void setTopMargin(double topMargin)
- Specified by:
setTopMargin
in interfaceSPrintSetup
-
getBottomMargin
public double getBottomMargin()
- Specified by:
getBottomMargin
in interfaceSPrintSetup
-
setBottomMargin
public void setBottomMargin(double bottomMargin)
- Specified by:
setBottomMargin
in interfaceSPrintSetup
-
setPaperSize
public void setPaperSize(SPrintSetup.PaperSize size)
- Specified by:
setPaperSize
in interfaceSPrintSetup
-
getPaperSize
public SPrintSetup.PaperSize getPaperSize()
- Specified by:
getPaperSize
in interfaceSPrintSetup
-
setLandscape
public void setLandscape(boolean landscape)
Description copied from interface:SPrintSetup
Set true to print in landscape orientation.- Specified by:
setLandscape
in interfaceSPrintSetup
-
isLandscape
public boolean isLandscape()
- Specified by:
isLandscape
in interfaceSPrintSetup
-
setScale
public void setScale(int scale)
- Specified by:
setScale
in interfaceSPrintSetup
- Parameters:
scale
- must be between 10 ~ 400 (inclusive).
-
getScale
public int getScale()
- Specified by:
getScale
in interfaceSPrintSetup
-
copyFrom
public void copyFrom(PrintSetupImpl src)
-
setHeader
public void setHeader(SHeader header)
Description copied from interface:SPrintSetup
Set general Header or odd page header.- Specified by:
setHeader
in interfaceSPrintSetup
-
getHeader
public SHeader getHeader()
- Specified by:
getHeader
in interfaceSPrintSetup
-
setEvenHeader
public void setEvenHeader(SHeader header)
Description copied from interface:SPrintSetup
Set even page footer; valid only ifSPrintSetup.isDifferentOddEvenPage()
is true.- Specified by:
setEvenHeader
in interfaceSPrintSetup
-
getEvenHeader
public SHeader getEvenHeader()
- Specified by:
getEvenHeader
in interfaceSPrintSetup
-
setFirstHeader
public void setFirstHeader(SHeader header)
Description copied from interface:SPrintSetup
Set first page footer; valid only ifSPrintSetup.isDifferentFirstPage()
is true.- Specified by:
setFirstHeader
in interfaceSPrintSetup
-
getFirstHeader
public SHeader getFirstHeader()
- Specified by:
getFirstHeader
in interfaceSPrintSetup
-
setFooter
public void setFooter(SFooter footer)
Description copied from interface:SPrintSetup
Set general footer or odd page footer.- Specified by:
setFooter
in interfaceSPrintSetup
-
getFooter
public SFooter getFooter()
- Specified by:
getFooter
in interfaceSPrintSetup
-
setEvenFooter
public void setEvenFooter(SFooter footer)
Description copied from interface:SPrintSetup
Set even page footer; valid only ifSPrintSetup.isDifferentOddEvenPage()
is true.- Specified by:
setEvenFooter
in interfaceSPrintSetup
-
getEvenFooter
public SFooter getEvenFooter()
- Specified by:
getEvenFooter
in interfaceSPrintSetup
-
setFirstFooter
public void setFirstFooter(SFooter footer)
Description copied from interface:SPrintSetup
Set first page footer; valid only ifSPrintSetup.isDifferentFirstPage()
is true.- Specified by:
setFirstFooter
in interfaceSPrintSetup
-
getFirstFooter
public SFooter getFirstFooter()
- Specified by:
getFirstFooter
in interfaceSPrintSetup
-
setScaleWithDoc
public void setScaleWithDoc(boolean flag)
Description copied from interface:SPrintSetup
Set true to scale header/footer with document.- Specified by:
setScaleWithDoc
in interfaceSPrintSetup
-
isScaleWithDoc
public boolean isScaleWithDoc()
- Specified by:
isScaleWithDoc
in interfaceSPrintSetup
-
setAlignWithMargins
public void setAlignWithMargins(boolean flag)
Description copied from interface:SPrintSetup
Set true to align header/footer with page margins.- Specified by:
setAlignWithMargins
in interfaceSPrintSetup
-
isAlignWithMargins
public boolean isAlignWithMargins()
- Specified by:
isAlignWithMargins
in interfaceSPrintSetup
-
setHCenter
public void setHCenter(boolean center)
Description copied from interface:SPrintSetup
Set true to print sheet center horizontally on page.- Specified by:
setHCenter
in interfaceSPrintSetup
-
isHCenter
public boolean isHCenter()
- Specified by:
isHCenter
in interfaceSPrintSetup
-
setVCenter
public void setVCenter(boolean center)
Description copied from interface:SPrintSetup
Set true to print sheet center vertically on page.- Specified by:
setVCenter
in interfaceSPrintSetup
-
isVCenter
public boolean isVCenter()
- Specified by:
isVCenter
in interfaceSPrintSetup
-
setPageStart
public void setPageStart(int start)
- Specified by:
setPageStart
in interfaceSPrintSetup
-
getPageStart
public int getPageStart()
- Specified by:
getPageStart
in interfaceSPrintSetup
-
setFitWidth
public void setFitWidth(int numPages)
Description copied from interface:SPrintSetup
Set the number of pages the sheet width is fit to. MUST be less than or equal to 32767. The value 0 means use as many pages as necessary to print the columns in the sheet.- Specified by:
setFitWidth
in interfaceSPrintSetup
-
getFitWidth
public int getFitWidth()
- Specified by:
getFitWidth
in interfaceSPrintSetup
-
setFitHeight
public void setFitHeight(int numPages)
Description copied from interface:SPrintSetup
Set the number of pages the sheet height is fit to. MUST be less than or equal to 32767. The value 0 means use as many pages as necessary to print the rows of the sheet.- Specified by:
setFitHeight
in interfaceSPrintSetup
-
getFitHeight
public int getFitHeight()
- Specified by:
getFitHeight
in interfaceSPrintSetup
-
setPrintArea
public void setPrintArea(String formula)
Description copied from interface:SPrintSetup
Set the print area as an area formula; e.g. A1:B2- Specified by:
setPrintArea
in interfaceSPrintSetup
-
getPrintArea
public String getPrintArea()
- Specified by:
getPrintArea
in interfaceSPrintSetup
-
setRepeatingRowsTitle
public void setRepeatingRowsTitle(int firstRow, int lastRow)
Description copied from interface:SPrintSetup
Set the first row of the repeat title rows for each top-to-bottom pages.- Specified by:
setRepeatingRowsTitle
in interfaceSPrintSetup
-
getRepeatingRowsTitle
public CellRegion getRepeatingRowsTitle()
- Specified by:
getRepeatingRowsTitle
in interfaceSPrintSetup
-
setRepeatingColumnsTitle
public void setRepeatingColumnsTitle(int firstCol, int lastCol)
Description copied from interface:SPrintSetup
Set the first column of the repeat title columns for each left-to-right pages.- Specified by:
setRepeatingColumnsTitle
in interfaceSPrintSetup
-
getRepeatingColumnsTitle
public CellRegion getRepeatingColumnsTitle()
- Specified by:
getRepeatingColumnsTitle
in interfaceSPrintSetup
-
setPrintHeadings
public void setPrintHeadings(boolean flag)
Description copied from interface:SPrintSetup
Set true to also out row and column headings.- Specified by:
setPrintHeadings
in interfaceSPrintSetup
-
isPrintHeadings
public boolean isPrintHeadings()
- Specified by:
isPrintHeadings
in interfaceSPrintSetup
-
setCommentsMode
public void setCommentsMode(int mode)
Description copied from interface:SPrintSetup
Set how to print comments: 0: none 1: at end of sheet 2: as displayed on the sheet- Specified by:
setCommentsMode
in interfaceSPrintSetup
-
getCommentsMode
public int getCommentsMode()
- Specified by:
getCommentsMode
in interfaceSPrintSetup
-
setErrorPrintMode
public void setErrorPrintMode(int mode)
Description copied from interface:SPrintSetup
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".- Specified by:
setErrorPrintMode
in interfaceSPrintSetup
-
getErrorPrintMode
public int getErrorPrintMode()
- Specified by:
getErrorPrintMode
in interfaceSPrintSetup
-
setLeftToRight
public void setLeftToRight(boolean flag)
Description copied from interface:SPrintSetup
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.- Specified by:
setLeftToRight
in interfaceSPrintSetup
-
isLeftToRight
public boolean isLeftToRight()
- Specified by:
isLeftToRight
in interfaceSPrintSetup
-
setDifferentOddEvenPage
public void setDifferentOddEvenPage(boolean flag)
Description copied from interface:SPrintSetup
Set true to print even page with special header and footer for even page; {@see #getEvenHeader()} and {@see #getEvenFooter()}.- Specified by:
setDifferentOddEvenPage
in interfaceSPrintSetup
-
isDifferentOddEvenPage
public boolean isDifferentOddEvenPage()
- Specified by:
isDifferentOddEvenPage
in interfaceSPrintSetup
-
setDifferentFirstPage
public void setDifferentFirstPage(boolean flag)
Description copied from interface:SPrintSetup
Set true to print first page with special header and footer for first page; {@see #getFirstHeader()} and {@see #getFirstFooter()}.- Specified by:
setDifferentFirstPage
in interfaceSPrintSetup
-
isDifferentFirstPage
public boolean isDifferentFirstPage()
- Specified by:
isDifferentFirstPage
in interfaceSPrintSetup
-
-