com.fastchar.extjs.utils.POIHelper Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of fastchar-extjs Show documentation
Show all versions of fastchar-extjs Show documentation
FastChar-ExtJs is a Java Web framework that uses extjs libraries.Quickly build a background management system
package com.fastchar.extjs.utils;
import org.apache.poi.ss.usermodel.*;
import java.util.HashMap;
import java.util.Map;
public class POIHelper {
private final Map styleMap = new HashMap<>();
private final Map fontMap = new HashMap<>();
private final Workbook workbook;
public POIHelper(Workbook workbook) {
this.workbook = workbook;
}
public CellStyle getCellStyle(String key) {
if (!styleMap.containsKey(key)) {
CellStyle cellStyle = workbook.createCellStyle();
styleMap.put(key, cellStyle);
}
return styleMap.get(key);
}
public Font getFont(String key) {
if (!fontMap.containsKey(key)) {
fontMap.put(key, workbook.createFont());
}
return fontMap.get(key);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy