List of usage examples for org.apache.poi.xssf.usermodel XSSFCellStyle getBorderBottomEnum
@Override
public BorderStyle getBorderBottomEnum()
From source file:org.bbreak.excella.core.test.util.TestUtil.java
License:Open Source License
private static String getCellStyleString(XSSFCellStyle cellStyle) { StringBuffer sb = new StringBuffer(); if (cellStyle != null) { XSSFFont font = cellStyle.getFont(); sb.append("Font=").append(font.getCTFont()).append(","); sb.append("DataFormat=").append(cellStyle.getDataFormat()).append(","); sb.append("DataFormatString=").append(cellStyle.getDataFormatString()).append(","); sb.append("Hidden=").append(cellStyle.getHidden()).append(","); sb.append("Locked=").append(cellStyle.getLocked()).append(","); sb.append("Alignment=").append(cellStyle.getAlignmentEnum()).append(","); sb.append("WrapText=").append(cellStyle.getWrapText()).append(","); sb.append("VerticalAlignment=").append(cellStyle.getVerticalAlignmentEnum()).append(","); sb.append("Rotation=").append(cellStyle.getRotation()).append(","); sb.append("Indention=").append(cellStyle.getIndention()).append(","); sb.append("BorderLeft=").append(cellStyle.getBorderLeftEnum()).append(","); sb.append("BorderRight=").append(cellStyle.getBorderRightEnum()).append(","); sb.append("BorderTop=").append(cellStyle.getBorderTopEnum()).append(","); sb.append("BorderBottom=").append(cellStyle.getBorderBottomEnum()).append(","); sb.append("LeftBorderColor=").append(getXSSFColorString(cellStyle.getLeftBorderXSSFColor())) .append(","); sb.append("RightBorderColor=").append(getXSSFColorString(cellStyle.getRightBorderXSSFColor())) .append(","); sb.append("TopBorderColor=").append(getXSSFColorString(cellStyle.getTopBorderXSSFColor())).append(","); sb.append("BottomBorderColor=").append(getXSSFColorString(cellStyle.getBottomBorderXSSFColor())) .append(","); sb.append("FillPattern=").append(cellStyle.getFillPatternEnum()).append(","); sb.append("FillForegroundColor=").append(getXSSFColorString(cellStyle.getFillForegroundXSSFColor())) .append(","); sb.append("FillBackgroundColor=").append(getXSSFColorString(cellStyle.getFillBackgroundXSSFColor())); }// ww w .j a v a 2 s. c o m return sb.toString(); }
From source file:org.bbreak.excella.reports.ReportsTestUtil.java
License:Open Source License
/** * XSSF????//from w w w . j a v a2 s . c o m * * @param cellStyle * @return ?? */ private static String getCellStyleString(XSSFCellStyle cellStyle) { StringBuffer sb = new StringBuffer(); if (cellStyle != null) { XSSFFont font = cellStyle.getFont(); sb.append("Font=").append(font.getCTFont()).append(","); sb.append("DataFormat=").append(cellStyle.getDataFormat()).append(","); sb.append("DataFormatString=").append(cellStyle.getDataFormatString()).append(","); sb.append("Hidden=").append(cellStyle.getHidden()).append(","); sb.append("Locked=").append(cellStyle.getLocked()).append(","); sb.append("Alignment=").append(cellStyle.getAlignmentEnum()).append(","); sb.append("WrapText=").append(cellStyle.getWrapText()).append(","); sb.append("VerticalAlignment=").append(cellStyle.getVerticalAlignmentEnum()).append(","); sb.append("Rotation=").append(cellStyle.getRotation()).append(","); sb.append("Indention=").append(cellStyle.getIndention()).append(","); sb.append("BorderLeft=").append(cellStyle.getBorderLeftEnum()).append(","); sb.append("BorderRight=").append(cellStyle.getBorderRightEnum()).append(","); sb.append("BorderTop=").append(cellStyle.getBorderTopEnum()).append(","); sb.append("BorderBottom=").append(cellStyle.getBorderBottomEnum()).append(","); sb.append("LeftBorderColor=").append(getXSSFColorString(cellStyle.getLeftBorderXSSFColor())) .append(","); sb.append("RightBorderColor=").append(getXSSFColorString(cellStyle.getRightBorderXSSFColor())) .append(","); sb.append("TopBorderColor=").append(getXSSFColorString(cellStyle.getTopBorderXSSFColor())).append(","); sb.append("BottomBorderColor=").append(getXSSFColorString(cellStyle.getBottomBorderXSSFColor())) .append(","); sb.append("FillPattern=").append(cellStyle.getFillPatternEnum()).append(","); try { sb.append("FillForegroundColor=").append(getXSSFColorString(cellStyle.getFillForegroundXSSFColor())) .append(","); } catch (NullPointerException e) { // POI-3.7??? sb.append("FillForegroundColor=none,"); } try { sb.append("FillBackgroundColor=") .append(getXSSFColorString(cellStyle.getFillBackgroundXSSFColor())); } catch (NullPointerException e) { // POI-3.7??? sb.append("FillBackgroundColor=none,"); } } return sb.toString(); }