/** * Set no orientation. * * @param orientation Orientation. */ public void setNoOrientation(boolean orientation) { if (orientation) { setOrientation(PrintOrientation.DEFAULT); } }
/** * Returns the paper size as enum. * * @return PaperSize paper size * @see PaperSize */ public PaperSize getPaperSizeEnum() { return PaperSize.values()[getPaperSize() - 1]; }
/** * Set the paper size as enum value. * * @param size value for the paper size. */ public void setPaperSize(PaperSize size) { setPaperSize((short) (size.ordinal() + 1)); }
/** * Returns the landscape mode. * * @return landscape mode */ public boolean getLandscape() { return getOrientation() == PrintOrientation.LANDSCAPE; }
/** * Returns the print notes. * * @return print notes */ public boolean getNotes() { return getCellComment() == PrintCellComments.AS_DISPLAYED; }
/** * Set whether to go left to right or top down in ordering * * @param ltor left to right */ public void setLeftToRight(boolean ltor) { if (ltor) setPageOrder(PageOrder.OVER_THEN_DOWN); else setPageOrder(PageOrder.DOWN_THEN_OVER); }
/** * Gets the print setup object. * * @return The user model for the print setup object. */ @Override public XSSFPrintSetup getPrintSetup() { return new XSSFPrintSetup(worksheet); }
/** * Returns the left to right print order. * * @return left to right print order */ public boolean getLeftToRight() { return getPageOrder() == PageOrder.OVER_THEN_DOWN; }
getPrintSetup().setValidSettings(false);
/** * Returns the no orientation. * * @return no orientation */ public boolean getNoOrientation() { return getOrientation() == PrintOrientation.DEFAULT; }
/** * Returns the print notes. * * @return print notes */ public boolean getNotes() { return getCellComment() == PrintCellComments.AS_DISPLAYED; }
/** * Set whether to go left to right or top down in ordering * * @param ltor left to right */ public void setLeftToRight(boolean ltor) { if (ltor) setPageOrder(PageOrder.OVER_THEN_DOWN); else setPageOrder(PageOrder.DOWN_THEN_OVER); }
/** * Gets the print setup object. * * @return The user model for the print setup object. */ @Override public XSSFPrintSetup getPrintSetup() { return new XSSFPrintSetup(worksheet); }
/** * Returns the left to right print order. * * @return left to right print order */ public boolean getLeftToRight() { return getPageOrder() == PageOrder.OVER_THEN_DOWN; }
printSetup.setValidSettings(false);
/** * Set whether to print in landscape * * @param ls landscape */ public void setLandscape(boolean ls) { if (ls) setOrientation(PrintOrientation.LANDSCAPE); else setOrientation(PrintOrientation.PORTRAIT); }
switch(paperType){ case A0: printSetup.setPaperSize(PaperSize.A4_PAPER); break; case A1: printSetup.setPaperSize(PaperSize.A4_PAPER); break; case A2: printSetup.setPaperSize(PaperSize.A4_PAPER); break; case A3: printSetup.setPaperSize(PaperSize.A3_PAPER); setup=true; break; case A4: printSetup.setPaperSize(PaperSize.A4_PAPER); setup=true; break; case A5: printSetup.setPaperSize(PaperSize.A5_PAPER); setup=true; break; case A6: printSetup.setPaperSize(PaperSize.A4_PAPER); break; case A7: printSetup.setPaperSize(PaperSize.A4_PAPER); break; case A8:
/** * Returns the paper size as enum. * * @return PaperSize paper size * @see PaperSize */ public PaperSize getPaperSizeEnum() { return PaperSize.values()[getPaperSize() - 1]; }
/** * Returns the landscape mode. * * @return landscape mode */ public boolean getLandscape() { return getOrientation() == PrintOrientation.LANDSCAPE; }
/** * Returns the print notes. * * @return print notes */ public boolean getNotes() { return getCellComment() == PrintCellComments.AS_DISPLAYED; }