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