71 lines
1.6 KiB
Java
71 lines
1.6 KiB
Java
|
|
package it.acxent.contab;
|
||
|
|
|
||
|
|
import com.lowagie.text.Font;
|
||
|
|
import java.util.ArrayList;
|
||
|
|
|
||
|
|
public class RigaDocumentoItemPdf {
|
||
|
|
private int colSpan;
|
||
|
|
|
||
|
|
private String desc;
|
||
|
|
|
||
|
|
private Font pdfFont;
|
||
|
|
|
||
|
|
private int cellAlign = 0;
|
||
|
|
|
||
|
|
public RigaDocumentoItemPdf(int colSpan, String desc, Font theFont) {
|
||
|
|
this.colSpan = colSpan;
|
||
|
|
this.desc = desc;
|
||
|
|
this.pdfFont = theFont;
|
||
|
|
}
|
||
|
|
|
||
|
|
public RigaDocumentoItemPdf(int colSpan, String desc, Font theFont, int theCellAlign) {
|
||
|
|
this.colSpan = colSpan;
|
||
|
|
this.desc = desc;
|
||
|
|
this.pdfFont = theFont;
|
||
|
|
this.cellAlign = theCellAlign;
|
||
|
|
}
|
||
|
|
|
||
|
|
public int getColSpan() {
|
||
|
|
return this.colSpan;
|
||
|
|
}
|
||
|
|
|
||
|
|
public void setColSpan(int colSpan) {
|
||
|
|
this.colSpan = colSpan;
|
||
|
|
}
|
||
|
|
|
||
|
|
public String getDesc() {
|
||
|
|
return (this.desc == null) ? "" : this.desc.trim();
|
||
|
|
}
|
||
|
|
|
||
|
|
public void setDesc(String desc) {
|
||
|
|
this.desc = desc;
|
||
|
|
}
|
||
|
|
|
||
|
|
public Font getPdfFont() {
|
||
|
|
return this.pdfFont;
|
||
|
|
}
|
||
|
|
|
||
|
|
public void setPdfFont(Font theFont) {
|
||
|
|
this.pdfFont = theFont;
|
||
|
|
}
|
||
|
|
|
||
|
|
public static final ArrayList<RigaDocumentoItemPdf> getArrayListNota(String nota, int idColDesc, int[] colSpan, Font PDF_f) {
|
||
|
|
ArrayList<RigaDocumentoItemPdf> res = new ArrayList<>();
|
||
|
|
for (int i = 0; i < colSpan.length; i++) {
|
||
|
|
if (i == idColDesc) {
|
||
|
|
res.add(new RigaDocumentoItemPdf(colSpan[i], nota.trim(), PDF_f));
|
||
|
|
} else {
|
||
|
|
res.add(new RigaDocumentoItemPdf(colSpan[i], "", PDF_f));
|
||
|
|
}
|
||
|
|
}
|
||
|
|
return res;
|
||
|
|
}
|
||
|
|
|
||
|
|
public int getCellAlign() {
|
||
|
|
return this.cellAlign;
|
||
|
|
}
|
||
|
|
|
||
|
|
public void setCellAlign(int cellAlign) {
|
||
|
|
this.cellAlign = cellAlign;
|
||
|
|
}
|
||
|
|
}
|