org.apache.poi.hssf.usermodel.contrib
Class HSSFRegionUtil

java.lang.Object
  extended byorg.apache.poi.hssf.usermodel.contrib.HSSFRegionUtil

public class HSSFRegionUtil
extends java.lang.Object

Various utility functions that make working with a region of cells easier.

Author:
Eric Pugh epugh@upstate.com

Constructor Summary
HSSFRegionUtil()
          Constructor for the HSSFRegionUtil object
 
Method Summary
static void setBorderBottom(short border, Region region, HSSFSheet sheet, HSSFWorkbook workbook)
          Sets the borderBottom attribute of the HSSFRegionUtil object
static void setBorderLeft(short border, Region region, HSSFSheet sheet, HSSFWorkbook workbook)
          Sets the left border for a region of cells by manipulating the cell style of the indidual cells on the left
static void setBorderRight(short border, Region region, HSSFSheet sheet, HSSFWorkbook workbook)
          Sets the borderRight attribute of the HSSFRegionUtil object
static void setBorderTop(short border, Region region, HSSFSheet sheet, HSSFWorkbook workbook)
          Sets the borderBottom attribute of the HSSFRegionUtil object
static void setBottomBorderColor(short color, Region region, HSSFSheet sheet, HSSFWorkbook workbook)
          Sets the bottomBorderColor attribute of the HSSFRegionUtil object
static void setLeftBorderColor(short color, Region region, HSSFSheet sheet, HSSFWorkbook workbook)
          Sets the leftBorderColor attribute of the HSSFRegionUtil object
static void setRightBorderColor(short color, Region region, HSSFSheet sheet, HSSFWorkbook workbook)
          Sets the rightBorderColor attribute of the HSSFRegionUtil object
static void setTopBorderColor(short color, Region region, HSSFSheet sheet, HSSFWorkbook workbook)
          Sets the topBorderColor attribute of the HSSFRegionUtil object
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HSSFRegionUtil

public HSSFRegionUtil()
Constructor for the HSSFRegionUtil object

Method Detail

setBorderLeft

public static void setBorderLeft(short border,
                                 Region region,
                                 HSSFSheet sheet,
                                 HSSFWorkbook workbook)
                          throws org.apache.commons.lang.exception.NestableException
Sets the left border for a region of cells by manipulating the cell style of the indidual cells on the left

Parameters:
border - The new border
region - The region that should have the border
workbook - The workbook that the region is on.
sheet - The sheet that the region is on.
Throws:
org.apache.commons.lang.exception.NestableException - Thrown if the CellStyle can't be changed

setLeftBorderColor

public static void setLeftBorderColor(short color,
                                      Region region,
                                      HSSFSheet sheet,
                                      HSSFWorkbook workbook)
                               throws org.apache.commons.lang.exception.NestableException
Sets the leftBorderColor attribute of the HSSFRegionUtil object

Parameters:
color - The color of the border
region - The region that should have the border
workbook - The workbook that the region is on.
sheet - The sheet that the region is on.
Throws:
org.apache.commons.lang.exception.NestableException - Thrown if the CellStyle can't be changed properly.

setBorderRight

public static void setBorderRight(short border,
                                  Region region,
                                  HSSFSheet sheet,
                                  HSSFWorkbook workbook)
                           throws org.apache.commons.lang.exception.NestableException
Sets the borderRight attribute of the HSSFRegionUtil object

Parameters:
border - The new border
region - The region that should have the border
workbook - The workbook that the region is on.
sheet - The sheet that the region is on.
Throws:
org.apache.commons.lang.exception.NestableException - Thrown if the CellStyle can't be changed

setRightBorderColor

public static void setRightBorderColor(short color,
                                       Region region,
                                       HSSFSheet sheet,
                                       HSSFWorkbook workbook)
                                throws org.apache.commons.lang.exception.NestableException
Sets the rightBorderColor attribute of the HSSFRegionUtil object

Parameters:
color - The color of the border
region - The region that should have the border
workbook - The workbook that the region is on.
sheet - The sheet that the region is on.
Throws:
org.apache.commons.lang.exception.NestableException - Thrown if the CellStyle can't be changed properly.

setBorderBottom

public static void setBorderBottom(short border,
                                   Region region,
                                   HSSFSheet sheet,
                                   HSSFWorkbook workbook)
                            throws org.apache.commons.lang.exception.NestableException
Sets the borderBottom attribute of the HSSFRegionUtil object

Parameters:
border - The new border
region - The region that should have the border
workbook - The workbook that the region is on.
sheet - The sheet that the region is on.
Throws:
org.apache.commons.lang.exception.NestableException - Thrown if the CellStyle can't be changed

setBottomBorderColor

public static void setBottomBorderColor(short color,
                                        Region region,
                                        HSSFSheet sheet,
                                        HSSFWorkbook workbook)
                                 throws org.apache.commons.lang.exception.NestableException
Sets the bottomBorderColor attribute of the HSSFRegionUtil object

Parameters:
color - The color of the border
region - The region that should have the border
workbook - The workbook that the region is on.
sheet - The sheet that the region is on.
Throws:
org.apache.commons.lang.exception.NestableException - Thrown if the CellStyle can't be changed properly.

setBorderTop

public static void setBorderTop(short border,
                                Region region,
                                HSSFSheet sheet,
                                HSSFWorkbook workbook)
                         throws org.apache.commons.lang.exception.NestableException
Sets the borderBottom attribute of the HSSFRegionUtil object

Parameters:
border - The new border
region - The region that should have the border
workbook - The workbook that the region is on.
sheet - The sheet that the region is on.
Throws:
org.apache.commons.lang.exception.NestableException - Thrown if the CellStyle can't be changed

setTopBorderColor

public static void setTopBorderColor(short color,
                                     Region region,
                                     HSSFSheet sheet,
                                     HSSFWorkbook workbook)
                              throws org.apache.commons.lang.exception.NestableException
Sets the topBorderColor attribute of the HSSFRegionUtil object

Parameters:
color - The color of the border
region - The region that should have the border
workbook - The workbook that the region is on.
sheet - The sheet that the region is on.
Throws:
org.apache.commons.lang.exception.NestableException - Thrown if the CellStyle can't be changed properly.


Copyright © 2003 Apache Software Foundation.