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

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

Introduction

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

Prototype

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

Source Link

Document

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

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  w w w .j  a va  2 s  .c om
    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);
}