Example usage for org.apache.poi.ss.util RegionUtil setBottomBorderColor

List of usage examples for org.apache.poi.ss.util RegionUtil setBottomBorderColor

Introduction

In this page you can find the example usage for org.apache.poi.ss.util RegionUtil setBottomBorderColor.

Prototype

public static void setBottomBorderColor(int color, CellRangeAddress region, Sheet sheet) 

Source Link

Document

Sets the bottom border color for a region of cells by manipulating the cell style of the individual cells on the bottom

Usage

From source file:org.haplo.jsinterface.generate.KGenerateXLS.java

License:Mozilla Public License

private void styleBorder(SheetStyleInstruction i) {
    CellRangeAddress region = styleInstructionCellRangeAddress(i);
    // Border/*w  ww. j  a  va 2  s .com*/
    RegionUtil.setBorderBottom(BorderStyle.MEDIUM, region, this.sheet);
    RegionUtil.setBorderTop(BorderStyle.MEDIUM, region, this.sheet);
    RegionUtil.setBorderLeft(BorderStyle.MEDIUM, region, this.sheet);
    RegionUtil.setBorderRight(BorderStyle.MEDIUM, region, this.sheet);
    // Colour
    short colindex = styleFindColour(IndexedColors.BLACK.getIndex(), i.colour);
    RegionUtil.setBottomBorderColor(colindex, region, this.sheet);
    RegionUtil.setTopBorderColor(colindex, region, this.sheet);
    RegionUtil.setLeftBorderColor(colindex, region, this.sheet);
    RegionUtil.setRightBorderColor(colindex, region, this.sheet);
}