Package io.keikai.model
Interface SPrintSetup
-
- All Known Implementing Classes:
PrintSetupImpl
public interface SPrintSetup
Store various setting for printing.- Since:
- 3.5.0
- Author:
- dennis
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
SPrintSetup.PaperSize
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description 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 inches)
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 ifisDifferentOddEvenPage()
is true.void
setEvenHeader(SHeader header)
Set even page footer; valid only ifisDifferentOddEvenPage()
is true.void
setFirstFooter(SFooter footer)
Set first page footer; valid only ifisDifferentFirstPage()
is true.void
setFirstHeader(SHeader header)
Set first page footer; valid only ifisDifferentFirstPage()
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 inches)
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 inches)
void
setLandscape(boolean landscape)
Set true to print in landscape orientation.void
setLeftMargin(double inches)
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 inches)
void
setScale(int scale)
void
setScaleWithDoc(boolean flag)
Set true to scale header/footer with document.void
setTopMargin(double inches)
void
setVCenter(boolean vcenter)
Set true to print sheet center vertically on page.
-
-
-
Method Detail
-
isPrintGridlines
boolean isPrintGridlines()
-
setPrintGridlines
void setPrintGridlines(boolean enable)
-
getHeaderMargin
double getHeaderMargin()
-
setHeaderMargin
void setHeaderMargin(double inches)
-
getFooterMargin
double getFooterMargin()
-
setFooterMargin
void setFooterMargin(double inches)
-
getLeftMargin
double getLeftMargin()
-
setLeftMargin
void setLeftMargin(double inches)
-
getRightMargin
double getRightMargin()
-
setRightMargin
void setRightMargin(double inches)
-
getTopMargin
double getTopMargin()
-
setTopMargin
void setTopMargin(double inches)
-
getBottomMargin
double getBottomMargin()
-
setBottomMargin
void setBottomMargin(double inches)
-
setPaperSize
void setPaperSize(SPrintSetup.PaperSize size)
-
getPaperSize
SPrintSetup.PaperSize getPaperSize()
-
setLandscape
void setLandscape(boolean landscape)
Set true to print in landscape orientation.- Parameters:
landscape
-
-
isLandscape
boolean isLandscape()
-
setScale
void setScale(int scale)
- Parameters:
scale
- must be between 10 ~ 400 (inclusive).- Since:
- 3.6.0
-
getScale
int getScale()
-
setHeader
void setHeader(SHeader header)
Set general Header or odd page header.- Parameters:
header
-- Since:
- 3.6.0
-
getHeader
SHeader getHeader()
-
setEvenHeader
void setEvenHeader(SHeader header)
Set even page footer; valid only ifisDifferentOddEvenPage()
is true.- Parameters:
header
-- Since:
- 3.6.0
-
getEvenHeader
SHeader getEvenHeader()
-
setFirstHeader
void setFirstHeader(SHeader header)
Set first page footer; valid only ifisDifferentFirstPage()
is true.- Parameters:
header
-- Since:
- 3.6.0
-
getFirstHeader
SHeader getFirstHeader()
-
setFooter
void setFooter(SFooter footer)
Set general footer or odd page footer.- Parameters:
footer
-- Since:
- 3.6.0
-
getFooter
SFooter getFooter()
-
setEvenFooter
void setEvenFooter(SFooter footer)
Set even page footer; valid only ifisDifferentOddEvenPage()
is true.- Parameters:
footer
-- Since:
- 3.6.0
-
getEvenFooter
SFooter getEvenFooter()
-
setFirstFooter
void setFirstFooter(SFooter footer)
Set first page footer; valid only ifisDifferentFirstPage()
is true.- Parameters:
footer
-- Since:
- 3.6.0
-
getFirstFooter
SFooter getFirstFooter()
-
setDifferentOddEvenPage
void setDifferentOddEvenPage(boolean flag)
Set true to print even page with special header and footer for even page; {@see #getEvenHeader()} and {@see #getEvenFooter()}.- Parameters:
flag
-- Since:
- 3.6.0
-
isDifferentOddEvenPage
boolean isDifferentOddEvenPage()
-
setDifferentFirstPage
void setDifferentFirstPage(boolean flag)
Set true to print first page with special header and footer for first page; {@see #getFirstHeader()} and {@see #getFirstFooter()}.- Parameters:
flag
-- Since:
- 3.6.0
-
isDifferentFirstPage
boolean isDifferentFirstPage()
-
setScaleWithDoc
void setScaleWithDoc(boolean flag)
Set true to scale header/footer with document.- Parameters:
flag
-- Since:
- 3.6.0
-
isScaleWithDoc
boolean isScaleWithDoc()
-
setAlignWithMargins
void setAlignWithMargins(boolean flag)
Set true to align header/footer with page margins.- Parameters:
flag
-- Since:
- 3.6.0
-
isAlignWithMargins
boolean isAlignWithMargins()
-
setHCenter
void setHCenter(boolean center)
Set true to print sheet center horizontally on page.- Parameters:
center
-- Since:
- 3.6.0
-
isHCenter
boolean isHCenter()
-
setVCenter
void setVCenter(boolean vcenter)
Set true to print sheet center vertically on page.- Parameters:
vcenter
-- Since:
- 3.6.0
-
isVCenter
boolean isVCenter()
-
setPageStart
void setPageStart(int start)
- Parameters:
start
-- Since:
- 3.6.0
-
getPageStart
int getPageStart()
-
setFitWidth
void setFitWidth(int numPages)
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.- Since:
- 3.6.0
-
getFitWidth
int getFitWidth()
-
setFitHeight
void setFitHeight(int numPages)
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.- Parameters:
pages
-- Since:
- 3.6.0
-
getFitHeight
int getFitHeight()
-
setPrintArea
void setPrintArea(String formula)
Set the print area as an area formula; e.g. A1:B2- Parameters:
formula
-- Since:
- 3.6.0
-
getPrintArea
String getPrintArea()
-
setRepeatingRowsTitle
void setRepeatingRowsTitle(int firstRow, int lastRow)
Set the first row of the repeat title rows for each top-to-bottom pages.- Parameters:
formula
-- Since:
- 3.6.0
-
getRepeatingRowsTitle
CellRegion getRepeatingRowsTitle()
-
setRepeatingColumnsTitle
void setRepeatingColumnsTitle(int firstCol, int lastCol)
Set the first column of the repeat title columns for each left-to-right pages.- Parameters:
formula
-- Since:
- 3.6.0
-
getRepeatingColumnsTitle
CellRegion getRepeatingColumnsTitle()
-
setPrintHeadings
void setPrintHeadings(boolean flag)
Set true to also out row and column headings.- Parameters:
flag
-- Since:
- 3.6.0
-
isPrintHeadings
boolean isPrintHeadings()
-
setCommentsMode
void setCommentsMode(int mode)
Set how to print comments: 0: none 1: at end of sheet 2: as displayed on the sheet- Parameters:
mode
-- Since:
- 3.6.0
-
getCommentsMode
int getCommentsMode()
-
setErrorPrintMode
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".- Parameters:
mode
-- Since:
- 3.6.0
-
getErrorPrintMode
int getErrorPrintMode()
-
setLeftToRight
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.- Parameters:
flag
-- Since:
- 3.6.0
-
isLeftToRight
boolean isLeftToRight()
-
-