Agregado estilo al titulo
Se me habia olvidado :I
This commit is contained in:
BIN
dist/Programa Caja.jar
vendored
BIN
dist/Programa Caja.jar
vendored
Binary file not shown.
@@ -304,6 +304,12 @@ public class InformeEstadoResultado {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void setStyles() {
|
private void setStyles() {
|
||||||
|
for(Row title: this.titles){
|
||||||
|
title.getCell(0).setCellStyle(this.styles.get("title"));
|
||||||
|
title.getCell(1).setCellStyle(this.styles.get("title"));
|
||||||
|
title.setHeightInPoints(30);
|
||||||
|
}
|
||||||
|
|
||||||
for (Row header : this.headers) {
|
for (Row header : this.headers) {
|
||||||
header.getCell(0).setCellStyle(this.styles.get("header"));
|
header.getCell(0).setCellStyle(this.styles.get("header"));
|
||||||
header.getCell(1).setCellStyle(this.styles.get("header"));
|
header.getCell(1).setCellStyle(this.styles.get("header"));
|
||||||
@@ -412,6 +418,10 @@ public class InformeEstadoResultado {
|
|||||||
font.setBold(true);
|
font.setBold(true);
|
||||||
font.setColor(IndexedColors.WHITE.getIndex());
|
font.setColor(IndexedColors.WHITE.getIndex());
|
||||||
|
|
||||||
|
Font titleFont = this.wb.createFont();
|
||||||
|
titleFont.setBold(true);
|
||||||
|
titleFont.setFontHeightInPoints((short)15);
|
||||||
|
|
||||||
CellStyle regularStyle = this.wb.createCellStyle();
|
CellStyle regularStyle = this.wb.createCellStyle();
|
||||||
|
|
||||||
CellStyle grayStyle = this.wb.createCellStyle();
|
CellStyle grayStyle = this.wb.createCellStyle();
|
||||||
@@ -425,6 +435,9 @@ public class InformeEstadoResultado {
|
|||||||
CellStyle percentStyle = this.wb.createCellStyle();
|
CellStyle percentStyle = this.wb.createCellStyle();
|
||||||
percentStyle.setDataFormat(this.createHelper.createDataFormat().getFormat("0.00%"));
|
percentStyle.setDataFormat(this.createHelper.createDataFormat().getFormat("0.00%"));
|
||||||
|
|
||||||
|
CellStyle titleStyle = this.wb.createCellStyle();
|
||||||
|
titleStyle.setFont(titleFont);
|
||||||
|
|
||||||
CellStyle headerStyle = this.wb.createCellStyle();
|
CellStyle headerStyle = this.wb.createCellStyle();
|
||||||
headerStyle.cloneStyleFrom(grayStyle);
|
headerStyle.cloneStyleFrom(grayStyle);
|
||||||
headerStyle.setVerticalAlignment(VerticalAlignment.CENTER);
|
headerStyle.setVerticalAlignment(VerticalAlignment.CENTER);
|
||||||
@@ -439,6 +452,7 @@ public class InformeEstadoResultado {
|
|||||||
|
|
||||||
HashMap<String, CellStyle> styles = new HashMap<>();
|
HashMap<String, CellStyle> styles = new HashMap<>();
|
||||||
styles.put("regular", regularStyle);
|
styles.put("regular", regularStyle);
|
||||||
|
styles.put("title", titleStyle);
|
||||||
styles.put("money", moneyStyle);
|
styles.put("money", moneyStyle);
|
||||||
styles.put("percent", percentStyle);
|
styles.put("percent", percentStyle);
|
||||||
styles.put("header", headerStyle);
|
styles.put("header", headerStyle);
|
||||||
|
|||||||
Reference in New Issue
Block a user