/** * Copy constructor. Called when copying sheets * @param copy the settings to copy */ public SheetSettings(SheetSettings copy,Sheet s) { Assert.verify(copy != null); sheet = s; // for internal use when accessing ranges orientation = copy.orientation; pageOrder = copy.pageOrder; paperSize = copy.paperSize; sheetProtected = copy.sheetProtected; hidden = copy.hidden; selected = false; // don't copy the selected flag headerMargin = copy.headerMargin; footerMargin = copy.footerMargin; scaleFactor = copy.scaleFactor; pageStart = copy.pageStart; fitWidth = copy.fitWidth; fitHeight = copy.fitHeight; horizontalPrintResolution = copy.horizontalPrintResolution; verticalPrintResolution = copy.verticalPrintResolution; leftMargin = copy.leftMargin; rightMargin = copy.rightMargin; topMargin = copy.topMargin; bottomMargin = copy.bottomMargin; fitToPages = copy.fitToPages; password = copy.password; passwordHash = copy.passwordHash; defaultColumnWidth = copy.defaultColumnWidth; defaultRowHeight = copy.defaultRowHeight; zoomFactor = copy.zoomFactor; pageBreakPreviewMagnification = copy.pageBreakPreviewMagnification; normalMagnification = copy.normalMagnification; showGridLines = copy.showGridLines; displayZeroValues = copy.displayZeroValues; pageBreakPreviewMode = copy.pageBreakPreviewMode; horizontalFreeze = copy.horizontalFreeze; verticalFreeze = copy.verticalFreeze; horizontalCentre = copy.horizontalCentre; verticalCentre = copy.verticalCentre; copies = copy.copies; header = new HeaderFooter(copy.header); footer = new HeaderFooter(copy.footer); automaticFormulaCalculation = copy.automaticFormulaCalculation; recalculateFormulasBeforeSave = copy.recalculateFormulasBeforeSave; if (copy.printArea != null) { printArea = new SheetRangeImpl (sheet, copy.getPrintArea().getTopLeft().getColumn(), copy.getPrintArea().getTopLeft().getRow(), copy.getPrintArea().getBottomRight().getColumn(), copy.getPrintArea().getBottomRight().getRow()); } if (copy.printTitlesRow != null) { printTitlesRow = new SheetRangeImpl (sheet, copy.getPrintTitlesRow().getTopLeft().getColumn(), copy.getPrintTitlesRow().getTopLeft().getRow(), copy.getPrintTitlesRow().getBottomRight().getColumn(), copy.getPrintTitlesRow().getBottomRight().getRow()); } if (copy.printTitlesCol != null) { printTitlesCol = new SheetRangeImpl (sheet, copy.getPrintTitlesCol().getTopLeft().getColumn(), copy.getPrintTitlesCol().getTopLeft().getRow(), copy.getPrintTitlesCol().getBottomRight().getColumn(), copy.getPrintTitlesCol().getBottomRight().getRow()); } }
/** * Sets the paper size to be used when printing this sheet * * @param ps the paper size */ public void setPaperSize(PaperSize ps) { paperSize = ps; }
/** * Default constructor */ public SheetSettings(Sheet s) { sheet = s; // for internal use, when accessing ranges orientation = DEFAULT_ORIENTATION; pageOrder = DEFAULT_ORDER; paperSize = DEFAULT_PAPER_SIZE; sheetProtected = false; hidden = false; selected = false; headerMargin = DEFAULT_HEADER_MARGIN; footerMargin = DEFAULT_FOOTER_MARGIN; horizontalPrintResolution = DEFAULT_PRINT_RESOLUTION; verticalPrintResolution = DEFAULT_PRINT_RESOLUTION; leftMargin = DEFAULT_WIDTH_MARGIN; rightMargin = DEFAULT_WIDTH_MARGIN; topMargin = DEFAULT_HEIGHT_MARGIN; bottomMargin = DEFAULT_HEIGHT_MARGIN; fitToPages = false; showGridLines = true; printGridLines = false; printHeaders = false; pageBreakPreviewMode = false; displayZeroValues = true; defaultColumnWidth = DEFAULT_DEFAULT_COLUMN_WIDTH; defaultRowHeight = DEFAULT_DEFAULT_ROW_HEIGHT; zoomFactor = DEFAULT_ZOOM_FACTOR; pageBreakPreviewMagnification = DEFAULT_PAGE_BREAK_PREVIEW_MAGNIFICATION; normalMagnification = DEFAULT_NORMAL_MAGNIFICATION; horizontalFreeze = 0; verticalFreeze = 0; copies = 1; header = new HeaderFooter(); footer = new HeaderFooter(); automaticFormulaCalculation = true; recalculateFormulasBeforeSave = true; }
/** * Sets the paper size * * @param ps the paper size */ public void setPaperSize(PaperSize ps) { paperSize = ps.getValue(); }