net.sf.nervalreports.generators.PDFSpanInfo Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pdf-generator Show documentation
Show all versions of pdf-generator Show documentation
This is the PDF generator package of NervalReports (a lightweight report creation library),
used to generate a report directly to a .pdf file.
The newest version!
/** This file is part of nervalreports.
*
* nervalreports is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* nervalreports is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with nervalreports. If not, see . */
package net.sf.nervalreports.generators;
/** Span information container class for {@link TeXReportGenerator}.
* @author farrer */
/* default */ class PDFSpanInfo {
/** Number of rows to occupy with current cell. */
private int rowSpan;
/** Number of columns to occupy with current cell. */
private int colSpan;
/** How many rows needed to occupy before done with cell's {@link #rowSpan} */
private int remainingRows;
/** Default constructor. */
PDFSpanInfo(int rowSpan, int colSpan) {
this.rowSpan = rowSpan;
this.colSpan = colSpan;
this.remainingRows = rowSpan;
}
/** @return {@link #rowSpan}. */
int getRowSpan() {
return this.rowSpan;
}
/** @return {@link #colSpan} */
int getColSpan() {
return this.colSpan;
}
/** @return {@link #remainingRows}. */
int getRemainingRows() {
return this.remainingRows;
}
/** Decrements a row from the remaining needed rows ({@link #remainingRows}).
* @return true
if there are remaining rows, false
if no more. */
boolean decRemainingRows() {
if (this.remainingRows > 0) {
this.remainingRows--;
}
return this.remainingRows > 0;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy