List of usage examples for org.apache.poi.ss.usermodel CellStyle setFillPattern
void setFillPattern(FillPatternType fp);
From source file:com.globalsight.everest.webapp.pagehandler.administration.reports.generator.ScorecardReportGenerator.java
License:Apache License
private CellStyle getEqual5Style(Workbook p_workbook) { if (equal5Style == null) { Font font = p_workbook.createFont(); font.setColor(IndexedColors.BLACK.getIndex()); font.setUnderline(Font.U_NONE); font.setFontName("Arial"); font.setFontHeightInPoints((short) 9); CellStyle cs = p_workbook.createCellStyle(); cs.setFont(font);//from ww w . jav a2 s .com cs.setWrapText(true); cs.setFillPattern(CellStyle.SOLID_FOREGROUND); cs.setFillForegroundColor(IndexedColors.BRIGHT_GREEN.getIndex()); cs.setBorderTop(CellStyle.BORDER_THIN); cs.setBorderRight(CellStyle.BORDER_THIN); cs.setBorderBottom(CellStyle.BORDER_THIN); cs.setBorderLeft(CellStyle.BORDER_THIN); cs.setVerticalAlignment(CellStyle.VERTICAL_CENTER); equal5Style = cs; } return equal5Style; }
From source file:com.globalsight.everest.webapp.pagehandler.administration.reports.generator.ScorecardReportGenerator.java
License:Apache License
private CellStyle getUnder5Style(Workbook p_workbook) { if (under5Style == null) { Font font = p_workbook.createFont(); font.setColor(IndexedColors.BLACK.getIndex()); font.setUnderline(Font.U_NONE); font.setFontName("Arial"); font.setFontHeightInPoints((short) 9); CellStyle cs = p_workbook.createCellStyle(); cs.setFont(font);/*from w w w . j a v a2 s .co m*/ cs.setWrapText(true); cs.setFillPattern(CellStyle.SOLID_FOREGROUND); cs.setFillForegroundColor(IndexedColors.LIME.getIndex()); cs.setBorderTop(CellStyle.BORDER_THIN); cs.setBorderRight(CellStyle.BORDER_THIN); cs.setBorderBottom(CellStyle.BORDER_THIN); cs.setBorderLeft(CellStyle.BORDER_THIN); cs.setVerticalAlignment(CellStyle.VERTICAL_CENTER); under5Style = cs; } return under5Style; }
From source file:com.globalsight.everest.webapp.pagehandler.administration.reports.generator.ScorecardReportGenerator.java
License:Apache License
private CellStyle getUnder4Style(Workbook p_workbook) { if (under4Style == null) { Font font = p_workbook.createFont(); font.setColor(IndexedColors.BLACK.getIndex()); font.setUnderline(Font.U_NONE); font.setFontName("Arial"); font.setFontHeightInPoints((short) 9); CellStyle cs = p_workbook.createCellStyle(); cs.setFont(font);/*from w ww .j a v a 2 s. c om*/ cs.setWrapText(true); cs.setFillPattern(CellStyle.SOLID_FOREGROUND); cs.setFillForegroundColor(IndexedColors.LIGHT_ORANGE.getIndex()); cs.setBorderTop(CellStyle.BORDER_THIN); cs.setBorderRight(CellStyle.BORDER_THIN); cs.setBorderBottom(CellStyle.BORDER_THIN); cs.setBorderLeft(CellStyle.BORDER_THIN); cs.setVerticalAlignment(CellStyle.VERTICAL_CENTER); under4Style = cs; } return under4Style; }
From source file:com.globalsight.everest.webapp.pagehandler.administration.reports.generator.ScorecardReportGenerator.java
License:Apache License
private CellStyle getUnder3Style(Workbook p_workbook) { if (under3Style == null) { Font font = p_workbook.createFont(); font.setColor(IndexedColors.BLACK.getIndex()); font.setUnderline(Font.U_NONE); font.setFontName("Arial"); font.setFontHeightInPoints((short) 9); CellStyle cs = p_workbook.createCellStyle(); cs.setFont(font);//w w w.jav a2 s . co m cs.setWrapText(true); cs.setFillPattern(CellStyle.SOLID_FOREGROUND); cs.setFillForegroundColor(IndexedColors.ROSE.getIndex()); cs.setBorderTop(CellStyle.BORDER_THIN); cs.setBorderRight(CellStyle.BORDER_THIN); cs.setBorderBottom(CellStyle.BORDER_THIN); cs.setBorderLeft(CellStyle.BORDER_THIN); cs.setVerticalAlignment(CellStyle.VERTICAL_CENTER); under3Style = cs; } return under3Style; }
From source file:com.globalsight.everest.webapp.pagehandler.administration.reports.generator.SummaryReportGenerator.java
License:Apache License
private CellStyle getHeaderOrangeStyle(Workbook p_workbook) { if (headerOrangeStyle == null) { CellStyle cs = getCommonHeaderStyle(p_workbook); cs.setFillPattern(CellStyle.SOLID_FOREGROUND); cs.setFillForegroundColor(IndexedColors.ORANGE.getIndex()); headerOrangeStyle = cs;/* w w w . j av a 2s.co m*/ } return headerOrangeStyle; }
From source file:com.globalsight.everest.webapp.pagehandler.administration.reports.generator.SummaryReportGenerator.java
License:Apache License
private CellStyle getFloatSumStyle(Workbook p_workbook) { if (floatSumStyle == null) { DataFormat formatDouble = p_workbook.createDataFormat(); CellStyle cs = getCommonHeaderStyle(p_workbook); cs.setFillPattern(CellStyle.SOLID_FOREGROUND); cs.setFillForegroundColor(IndexedColors.ORANGE.getIndex()); cs.setDataFormat(formatDouble.getFormat(DOUBLE_FORMAT)); floatSumStyle = cs;/* ww w . j ava2 s .co m*/ } return floatSumStyle; }
From source file:com.globalsight.everest.webapp.pagehandler.administration.reports.generator.SummaryReportGenerator.java
License:Apache License
private CellStyle getMoneySumStyle(Workbook p_workbook) { if (moneySumStyle == null) { DataFormat moneyFormat = p_workbook.createDataFormat(); CellStyle cs = getCommonHeaderStyle(p_workbook); cs.setDataFormat(moneyFormat.getFormat(moneyFormatString)); cs.setFillPattern(CellStyle.SOLID_FOREGROUND); cs.setFillForegroundColor(IndexedColors.ORANGE.getIndex()); moneySumStyle = cs;//w w w . ja va2s .c o m } return moneySumStyle; }
From source file:com.globalsight.everest.webapp.pagehandler.administration.reports.generator.SummaryReportGenerator.java
License:Apache License
private CellStyle getPercentSumStyle(Workbook p_workbook) { if (percentSumStyle == null) { DataFormat percentFormat = p_workbook.createDataFormat(); CellStyle cs = getCommonHeaderStyle(p_workbook); cs.setDataFormat(percentFormat.getFormat(PERCENT_FORMAT)); cs.setFillPattern(CellStyle.SOLID_FOREGROUND); cs.setFillForegroundColor(IndexedColors.ORANGE.getIndex()); percentSumStyle = cs;//from ww w .ja v a 2s. com } return percentSumStyle; }
From source file:com.globalsight.everest.webapp.pagehandler.administration.reports.generator.TranslationVerificationReportGenerator.java
License:Apache License
private CellStyle getContentStyle1(Workbook p_workbook) { CellStyle style = p_workbook.createCellStyle(); style.setWrapText(true);//from w w w. j a v a 2s . c o m style.setAlignment(CellStyle.ALIGN_LEFT); style.setVerticalAlignment(CellStyle.VERTICAL_CENTER); Font font = p_workbook.createFont(); font.setFontName("Arial"); font.setFontHeightInPoints((short) 10); style.setFont(font); style.setFillPattern(CellStyle.SOLID_FOREGROUND); style.setFillForegroundColor(IndexedColors.YELLOW.getIndex()); return style; }
From source file:com.globalsight.everest.webapp.pagehandler.administration.reports.generator.TranslationVerificationReportGenerator.java
License:Apache License
private CellStyle getRtlContentStyle1(Workbook p_workbook) { Font font = p_workbook.createFont(); font.setFontName("Arial"); font.setFontHeightInPoints((short) 10); CellStyle style = p_workbook.createCellStyle(); style.setFont(font);/*ww w. j a v a2 s . c o m*/ style.setWrapText(true); style.setAlignment(CellStyle.ALIGN_RIGHT); style.setVerticalAlignment(CellStyle.VERTICAL_CENTER); style.setFillPattern(CellStyle.SOLID_FOREGROUND); style.setFillForegroundColor(IndexedColors.YELLOW.getIndex()); return style; }