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

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

Introduction

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

Prototype

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

Source Link

Document

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

Usage

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

License:Mozilla Public License

private void styleBorder(SheetStyleInstruction i) {
    CellRangeAddress region = styleInstructionCellRangeAddress(i);
    // Border/*from   ww w .  j  a  v  a 2  s  . c o  m*/
    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);
}