From d0965d1c84459360f294857673892c6ef1040651 Mon Sep 17 00:00:00 2001 From: leebj Date: Tue, 23 Jul 2024 13:13:47 +0900 Subject: [PATCH] =?UTF-8?q?=EC=97=91=EC=85=80=20=ED=97=A4=EB=8D=94=20?= =?UTF-8?q?=EC=8A=A4=ED=83=80=EC=9D=BC=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/cokr/xit/applib/xls/StyleMaker.java | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 src/main/java/cokr/xit/applib/xls/StyleMaker.java diff --git a/src/main/java/cokr/xit/applib/xls/StyleMaker.java b/src/main/java/cokr/xit/applib/xls/StyleMaker.java new file mode 100644 index 0000000..be6b119 --- /dev/null +++ b/src/main/java/cokr/xit/applib/xls/StyleMaker.java @@ -0,0 +1,24 @@ +package cokr.xit.applib.xls; + +import org.apache.poi.hssf.util.HSSFColor; +import org.apache.poi.ss.usermodel.Font; +import org.apache.poi.ss.usermodel.HorizontalAlignment; + +import cokr.xit.base.docs.xls.Style; +import cokr.xit.base.docs.xls.XLSWriter; + + +public class StyleMaker { + + public static Style headerStyle(XLSWriter xlsx) { + return new Style() + .foregroundColor(HSSFColor.HSSFColorPredefined.GREY_25_PERCENT.getIndex()) + .configure(styl -> { + Font font = xlsx.workbook().createFont(); + font.setColor(HSSFColor.HSSFColorPredefined.BLACK.getIndex()); + styl.font(font); + styl.alignment(HorizontalAlignment.CENTER); + }); + } + +}