Example usage for org.apache.poi.xssf.usermodel XSSFColor XSSFColor

List of usage examples for org.apache.poi.xssf.usermodel XSSFColor XSSFColor

Introduction

In this page you can find the example usage for org.apache.poi.xssf.usermodel XSSFColor XSSFColor.

Prototype

@Deprecated
@Removal(version = "4.2")
public XSSFColor() 

Source Link

Document

Create an new instance of XSSFColor, without knowledge of any custom indexed colors.

Usage

From source file:com.canoo.webtest.plugins.exceltest.ExcelColorUtils.java

License:Open Source License

public static String getColorName(final AbstractExcelStep step, final short borderColor) {
    if (borderColor == AUTOMATIC_COLOR) {
        return "auto";
    }/*  w w  w.j  av  a2  s .c  om*/

    Color color;
    Workbook workbook = step.getExcelWorkbook();
    if (workbook instanceof HSSFWorkbook) {
        color = ((HSSFWorkbook) step.getExcelWorkbook()).getCustomPalette().getColor(borderColor);
    } else {
        color = new XSSFColor();
        ((XSSFColor) color).setIndexed(borderColor);
    }
    return getColorName(step, color);
}

From source file:com.miraisolutions.xlconnect.XCellStyle.java

License:Open Source License

public void setBottomBorderColor(short color) {
    XSSFColor clr = new XSSFColor();
    clr.setIndexed(color);
    setBottomBorderColor(clr);
}

From source file:com.miraisolutions.xlconnect.XCellStyle.java

License:Open Source License

public void setLeftBorderColor(short color) {
    XSSFColor clr = new XSSFColor();
    clr.setIndexed(color);
    setLeftBorderColor(clr);
}

From source file:com.miraisolutions.xlconnect.XCellStyle.java

License:Open Source License

public void setRightBorderColor(short color) {
    XSSFColor clr = new XSSFColor();
    clr.setIndexed(color);
    setRightBorderColor(clr);
}

From source file:com.miraisolutions.xlconnect.XCellStyle.java

License:Open Source License

public void setTopBorderColor(short color) {
    XSSFColor clr = new XSSFColor();
    clr.setIndexed(color);
    setTopBorderColor(clr);
}

From source file:com.miraisolutions.xlconnect.XCellStyle.java

License:Open Source License

public void setFillBackgroundColor(short bg) {
    XSSFColor clr = new XSSFColor();
    clr.setIndexed(bg);
    setFillBackgroundColor(clr);
}

From source file:com.miraisolutions.xlconnect.XCellStyle.java

License:Open Source License

public void setFillForegroundColor(short fg) {
    XSSFColor clr = new XSSFColor();
    clr.setIndexed(fg);
    setFillForegroundColor(clr);
}