package cokr.xit.fims.cmmn.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);
			});
	}

}
