Top Description Inners Constructors Methods
org.apache.poi.ss.util

public final Class RegionUtil

extends Object
Class Inheritance
Imports
org.apache.poi.ss.usermodel.BorderStyle, .Cell, .Row, .Sheet

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

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class
RegionUtil.CellPropertySetter

For setting the same property on many cells to the same value

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static void
setBorderBottom(BorderStyle
The new border
border
,
CellRangeAddress
The region that should have the border
region
,
Sheet
The sheet that the region is on.
sheet
)

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

public static void
setBorderLeft(BorderStyle
The new border
border
,
CellRangeAddress
The region that should have the border
region
,
Sheet
The sheet that the region is on.
sheet
)

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

public static void
setBorderRight(BorderStyle
The new border
border
,
CellRangeAddress
The region that should have the border
region
,
Sheet
The sheet that the region is on.
sheet
)

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

public static void
setBorderTop(BorderStyle
The new border
border
,
CellRangeAddress
The region that should have the border
region
,
Sheet
The sheet that the region is on.
sheet
)

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

public static void
setBottomBorderColor(int
The color of the border
color
,
CellRangeAddress
The region that should have the border
region
,
Sheet
The sheet that the region is on.
sheet
)

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

public static void
setLeftBorderColor(int
The color of the border
color
,
CellRangeAddress
The region that should have the border
region
,
Sheet
The sheet that the region is on.
sheet
)

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

public static void
setRightBorderColor(int
The color of the border
color
,
CellRangeAddress
The region that should have the border
region
,
Sheet
The sheet that the region is on.
sheet
)

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

public static void
setTopBorderColor(int
The color of the border
color
,
CellRangeAddress
The region that should have the border
region
,
Sheet
The sheet that the region is on.
sheet
)

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

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

RegionUtilback to summary
private RegionUtil()

Method Detail

setBorderBottomback to summary
public static void setBorderBottom(BorderStyle border, CellRangeAddress region, Sheet sheet)

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

Parameters
border:BorderStyle

The new border

region:CellRangeAddress

The region that should have the border

sheet:Sheet

The sheet that the region is on.

Since
POI 3.16 beta 1
setBorderLeftback to summary
public static void setBorderLeft(BorderStyle border, CellRangeAddress region, Sheet sheet)

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

Parameters
border:BorderStyle

The new border

region:CellRangeAddress

The region that should have the border

sheet:Sheet

The sheet that the region is on.

Since
POI 3.16 beta 1
setBorderRightback to summary
public static void setBorderRight(BorderStyle border, CellRangeAddress region, Sheet sheet)

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

Parameters
border:BorderStyle

The new border

region:CellRangeAddress

The region that should have the border

sheet:Sheet

The sheet that the region is on.

Since
POI 3.16 beta 1
setBorderTopback to summary
public static void setBorderTop(BorderStyle border, CellRangeAddress region, Sheet sheet)

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

Parameters
border:BorderStyle

The new border

region:CellRangeAddress

The region that should have the border

sheet:Sheet

The sheet that the region is on.

Since
POI 3.16 beta 1
setBottomBorderColorback to summary
public static void setBottomBorderColor(int color, CellRangeAddress region, Sheet sheet)

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

Parameters
color:int

The color of the border

region:CellRangeAddress

The region that should have the border

sheet:Sheet

The sheet that the region is on.

Since
POI 3.15 beta 2
setLeftBorderColorback to summary
public static void setLeftBorderColor(int color, CellRangeAddress region, Sheet sheet)

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

Parameters
color:int

The color of the border

region:CellRangeAddress

The region that should have the border

sheet:Sheet

The sheet that the region is on.

Since
POI 3.15 beta 2
setRightBorderColorback to summary
public static void setRightBorderColor(int color, CellRangeAddress region, Sheet sheet)

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

Parameters
color:int

The color of the border

region:CellRangeAddress

The region that should have the border

sheet:Sheet

The sheet that the region is on.

Since
POI 3.15 beta 2
setTopBorderColorback to summary
public static void setTopBorderColor(int color, CellRangeAddress region, Sheet sheet)

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

Parameters
color:int

The color of the border

region:CellRangeAddress

The region that should have the border

sheet:Sheet

The sheet that the region is on.

Since
POI 3.15 beta 2
org.apache.poi.ss.util back to summary

private final Class RegionUtil.CellPropertySetter

extends Object
Class Inheritance

For setting the same property on many cells to the same value

Field Summary

Modifier and TypeField and Description
private final String
private final Object

Constructor Summary

AccessConstructor and Description
public
CellPropertySetter(String propertyName, int value)

public
CellPropertySetter(String propertyName, BorderStyle value)

Method Summary

Modifier and TypeMethod and Description
public void
setProperty(Row row, int column)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

_propertyNameback to summary
private final String _propertyName
_propertyValueback to summary
private final Object _propertyValue

Constructor Detail

CellPropertySetterback to summary
public CellPropertySetter(String propertyName, int value)
CellPropertySetterback to summary
public CellPropertySetter(String propertyName, BorderStyle value)

Method Detail

setPropertyback to summary
public void setProperty(Row row, int column)