Example usage for org.apache.poi.hssf.usermodel HSSFCellStyle getBorderBottomEnum

List of usage examples for org.apache.poi.hssf.usermodel HSSFCellStyle getBorderBottomEnum

Introduction

In this page you can find the example usage for org.apache.poi.hssf.usermodel HSSFCellStyle getBorderBottomEnum.

Prototype

@Override
    public BorderStyle getBorderBottomEnum() 

Source Link

Usage

From source file:org.bbreak.excella.core.test.util.TestUtil.java

License:Open Source License

private static String getCellStyleString(Workbook workbook, HSSFCellStyle cellStyle) {
    StringBuffer sb = new StringBuffer();
    if (cellStyle != null) {
        HSSFFont font = cellStyle.getFont(workbook);
        // sb.append("FontIndex=").append( cellStyle.getFontIndex()).append( ",");
        sb.append("Font=").append(getHSSFFontString((HSSFWorkbook) workbook, font)).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(getHSSFColorString((HSSFWorkbook) workbook, cellStyle.getLeftBorderColor()))
                .append(",");
        sb.append("RightBorderColor=")
                .append(getHSSFColorString((HSSFWorkbook) workbook, cellStyle.getRightBorderColor()))
                .append(",");
        sb.append("TopBorderColor=")
                .append(getHSSFColorString((HSSFWorkbook) workbook, cellStyle.getTopBorderColor())).append(",");
        sb.append("BottomBorderColor=")
                .append(getHSSFColorString((HSSFWorkbook) workbook, cellStyle.getBottomBorderColor()))
                .append(",");

        sb.append("FillPattern=").append(cellStyle.getFillPatternEnum()).append(",");
        sb.append("FillForegroundColor=")
                .append(getHSSFColorString((HSSFWorkbook) workbook, cellStyle.getFillForegroundColor()))
                .append(",");
        sb.append("FillBackgroundColor=")
                .append(getHSSFColorString((HSSFWorkbook) workbook, cellStyle.getFillBackgroundColor()));
    }/*from w ww . ja  va2  s  . co m*/
    return sb.toString();
}

From source file:org.bbreak.excella.reports.ReportsTestUtil.java

License:Open Source License

/**
 * HSSF????/*  w w w  . ja v a2  s.c  o m*/
 * 
 * @param workbook 
 * @param cellStyle 
 * @return ??
 */
private static String getCellStyleString(Workbook workbook, HSSFCellStyle cellStyle) {
    StringBuffer sb = new StringBuffer();
    if (cellStyle != null) {
        HSSFFont font = cellStyle.getFont(workbook);
        // sb.append("FontIndex=").append( cellStyle.getFontIndex()).append( ",");
        sb.append("Font=").append(getHSSFFontString((HSSFWorkbook) workbook, font)).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(getHSSFColorString((HSSFWorkbook) workbook, cellStyle.getLeftBorderColor()))
                .append(",");
        sb.append("RightBorderColor=")
                .append(getHSSFColorString((HSSFWorkbook) workbook, cellStyle.getRightBorderColor()))
                .append(",");
        sb.append("TopBorderColor=")
                .append(getHSSFColorString((HSSFWorkbook) workbook, cellStyle.getTopBorderColor())).append(",");
        sb.append("BottomBorderColor=")
                .append(getHSSFColorString((HSSFWorkbook) workbook, cellStyle.getBottomBorderColor()))
                .append(",");

        sb.append("FillPattern=").append(cellStyle.getFillPatternEnum()).append(",");
        sb.append("FillForegroundColor=")
                .append(getHSSFColorString((HSSFWorkbook) workbook, cellStyle.getFillForegroundColor()))
                .append(",");
        sb.append("FillBackgroundColor=")
                .append(getHSSFColorString((HSSFWorkbook) workbook, cellStyle.getFillBackgroundColor()));
    }
    return sb.toString();
}