Top Description Fields Constructors Methods
org.apache.poi.hssf.record.cf

public final Class BorderFormatting

extends Object
implements Duplicatable, GenericRecord
Class Inheritance
All Implemented Interfaces
org.apache.poi.common.usermodel.GenericRecord, org.apache.poi.common.Duplicatable
Imports
java.util.Collections, .LinkedHashMap, .Map, java.util.function.Supplier, org.apache.poi.common.Duplicatable, org.apache.poi.common.usermodel.GenericRecord, org.apache.poi.util.BitField, .BitFieldFactory, .GenericRecordJsonWriter, .LittleEndian, .LittleEndianInput, .LittleEndianOutput

Border Formatting Block of the Conditional Formatting Rule Record.

Field Summary

Modifier and TypeField and Description
private static final BitField
private static final BitField
private static final BitField
private static final BitField
private static final BitField
public static final short
BORDER_DASH_DOT

dash-dot border

public static final short
BORDER_DASH_DOT_DOT

dash-dot-dot border

public static final short
BORDER_DASHED

dash border

public static final short
BORDER_DOTTED

hair-line border

public static final short
BORDER_DOUBLE

double-line border

public static final short
BORDER_HAIR

dot border

public static final short
BORDER_MEDIUM

Medium border

public static final short
BORDER_MEDIUM_DASH_DOT

medium dash-dot border

public static final short
BORDER_MEDIUM_DASH_DOT_DOT

medium dash-dot-dot border

public static final short
BORDER_MEDIUM_DASHED

Medium dashed border

public static final short
BORDER_NONE

No border

public static final short
BORDER_SLANTED_DASH_DOT

slanted dash-dot border

public static final short
BORDER_THICK

Thick border

public static final short
BORDER_THIN

Thin border

private static final BitField
private static final BitField
private static final BitField
private static final BitField
private static final BitField
private static final BitField
private static final BitField
private int
private int

Constructor Summary

AccessConstructor and Description
public
public
public
BorderFormatting(LittleEndianInput in)

Creates new FontFormatting

Method Summary

Modifier and TypeMethod and Description
public BorderFormatting
public int

Returns:

border type
getBorderBottom
()

get the type of border to use for the bottom border of the cell

public int

Returns:

border type
getBorderDiagonal
()

get the type of border to use for the diagonal border of the cell

public int

Returns:

border type
getBorderLeft
()

get the type of border to use for the left border of the cell

public int

Returns:

border type
getBorderRight
()

get the type of border to use for the right border of the cell

public int

Returns:

border type
getBorderTop
()

get the type of border to use for the top border of the cell

public int

Returns:

The index of the color definition
getBottomBorderColor
()

get the color to use for the bottom border

public int
public int

Returns:

The index of the color definition
getDiagonalBorderColor
()

get the color to use for the diagonal border

public Map<String, Supplier<?>>
public int

Returns:

The index of the color definition
getLeftBorderColor
()

get the color to use for the left border

public int

Returns:

The index of the color definition
getRightBorderColor
()

get the color to use for the right border

public int

Returns:

The index of the color definition
getTopBorderColor
()

get the color to use for the top border

public boolean

Returns:

true if backward diagonal is on
isBackwardDiagonalOn
()

public boolean

Returns:

true if forward diagonal is on
isForwardDiagonalOn
()

public int
serialize(int offset, byte[] data)

public void
public void
setBackwardDiagonalOn(boolean
- if true - on, otherwise off
on
)

Of/off top left to bottom right line

public void
setBorderBottom(int
type
border
)

set the type of border to use for the bottom border of the cell

public void
setBorderDiagonal(int
type
border
)

set the type of border to use for the diagonal border of the cell

public void
setBorderLeft(int
type
border
)

set the type of border to use for the left border of the cell

public void
setBorderRight(int
type
border
)

set the type of border to use for the right border of the cell

public void
setBorderTop(int
type
border
)

set the type of border to use for the top border of the cell

public void
setBottomBorderColor(int
The index of the color definition
color
)

set the color to use for the bottom border

public void
setDiagonalBorderColor(int
The index of the color definition
color
)

set the color to use for the diagonal borders

public void
setForwardDiagonalOn(boolean
- if true - on, otherwise off
on
)

Of/off bottom left to top right line

public void
setLeftBorderColor(int
The index of the color definition
color
)

set the color to use for the left border

public void
setRightBorderColor(int
The index of the color definition
color
)

set the color to use for the right border

public void
setTopBorderColor(int
The index of the color definition
color
)

set the color to use for the top border

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

bordBlTrtLineOnOffback to summary
private static final BitField bordBlTrtLineOnOff
bordBottomLineColorback to summary
private static final BitField bordBottomLineColor
bordBottomLineStyleback to summary
private static final BitField bordBottomLineStyle
bordDiagLineColorback to summary
private static final BitField bordDiagLineColor
bordDiagLineStyleback to summary
private static final BitField bordDiagLineStyle
BORDER_DASH_DOTback to summary
public static final short BORDER_DASH_DOT

dash-dot border

BORDER_DASH_DOT_DOTback to summary
public static final short BORDER_DASH_DOT_DOT

dash-dot-dot border

BORDER_DASHEDback to summary
public static final short BORDER_DASHED

dash border

BORDER_DOTTEDback to summary
public static final short BORDER_DOTTED

hair-line border

BORDER_DOUBLEback to summary
public static final short BORDER_DOUBLE

double-line border

BORDER_HAIRback to summary
public static final short BORDER_HAIR

dot border

BORDER_MEDIUMback to summary
public static final short BORDER_MEDIUM

Medium border

BORDER_MEDIUM_DASH_DOTback to summary
public static final short BORDER_MEDIUM_DASH_DOT

medium dash-dot border

BORDER_MEDIUM_DASH_DOT_DOTback to summary
public static final short BORDER_MEDIUM_DASH_DOT_DOT

medium dash-dot-dot border

BORDER_MEDIUM_DASHEDback to summary
public static final short BORDER_MEDIUM_DASHED

Medium dashed border

BORDER_NONEback to summary
public static final short BORDER_NONE

No border

BORDER_SLANTED_DASH_DOTback to summary
public static final short BORDER_SLANTED_DASH_DOT

slanted dash-dot border

BORDER_THICKback to summary
public static final short BORDER_THICK

Thick border

BORDER_THINback to summary
public static final short BORDER_THIN

Thin border

bordLeftLineColorback to summary
private static final BitField bordLeftLineColor
bordLeftLineStyleback to summary
private static final BitField bordLeftLineStyle
bordRightLineColorback to summary
private static final BitField bordRightLineColor
bordRightLineStyleback to summary
private static final BitField bordRightLineStyle
bordTlBrLineOnOffback to summary
private static final BitField bordTlBrLineOnOff
bordTopLineColorback to summary
private static final BitField bordTopLineColor
bordTopLineStyleback to summary
private static final BitField bordTopLineStyle
field_13_border_styles1back to summary
private int field_13_border_styles1
field_14_border_styles2back to summary
private int field_14_border_styles2

Constructor Detail

BorderFormattingback to summary
public BorderFormatting()
BorderFormattingback to summary
public BorderFormatting(BorderFormatting other)
BorderFormattingback to summary
public BorderFormatting(LittleEndianInput in)

Creates new FontFormatting

Method Detail

copyback to summary
public BorderFormatting copy()

Implements org.apache.poi.common.Duplicatable.copy.

Returns:BorderFormatting

Doc from org.apache.poi.common.Duplicatable.copy.

a deep copy of the implementing class / instance

getBorderBottomback to summary
public int getBorderBottom()

get the type of border to use for the bottom border of the cell

Returns:int

border type

See Also
BORDER_NONE, BORDER_THIN, BORDER_MEDIUM, BORDER_DASHED, BORDER_DOTTED, BORDER_THICK, BORDER_DOUBLE, BORDER_HAIR, BORDER_MEDIUM_DASHED, BORDER_DASH_DOT, BORDER_MEDIUM_DASH_DOT, BORDER_DASH_DOT_DOT, BORDER_MEDIUM_DASH_DOT_DOT, BORDER_SLANTED_DASH_DOT
getBorderDiagonalback to summary
public int getBorderDiagonal()

get the type of border to use for the diagonal border of the cell

Returns:int

border type

See Also
BORDER_NONE, BORDER_THIN, BORDER_MEDIUM, BORDER_DASHED, BORDER_DOTTED, BORDER_THICK, BORDER_DOUBLE, BORDER_HAIR, BORDER_MEDIUM_DASHED, BORDER_DASH_DOT, BORDER_MEDIUM_DASH_DOT, BORDER_DASH_DOT_DOT, BORDER_MEDIUM_DASH_DOT_DOT, BORDER_SLANTED_DASH_DOT
getBorderLeftback to summary
public int getBorderLeft()

get the type of border to use for the left border of the cell

Returns:int

border type

See Also
BORDER_NONE, BORDER_THIN, BORDER_MEDIUM, BORDER_DASHED, BORDER_DOTTED, BORDER_THICK, BORDER_DOUBLE, BORDER_HAIR, BORDER_MEDIUM_DASHED, BORDER_DASH_DOT, BORDER_MEDIUM_DASH_DOT, BORDER_DASH_DOT_DOT, BORDER_MEDIUM_DASH_DOT_DOT, BORDER_SLANTED_DASH_DOT
getBorderRightback to summary
public int getBorderRight()

get the type of border to use for the right border of the cell

Returns:int

border type

See Also
BORDER_NONE, BORDER_THIN, BORDER_MEDIUM, BORDER_DASHED, BORDER_DOTTED, BORDER_THICK, BORDER_DOUBLE, BORDER_HAIR, BORDER_MEDIUM_DASHED, BORDER_DASH_DOT, BORDER_MEDIUM_DASH_DOT, BORDER_DASH_DOT_DOT, BORDER_MEDIUM_DASH_DOT_DOT, BORDER_SLANTED_DASH_DOT
getBorderTopback to summary
public int getBorderTop()

get the type of border to use for the top border of the cell

Returns:int

border type

See Also
BORDER_NONE, BORDER_THIN, BORDER_MEDIUM, BORDER_DASHED, BORDER_DOTTED, BORDER_THICK, BORDER_DOUBLE, BORDER_HAIR, BORDER_MEDIUM_DASHED, BORDER_DASH_DOT, BORDER_MEDIUM_DASH_DOT, BORDER_DASH_DOT_DOT, BORDER_MEDIUM_DASH_DOT_DOT, BORDER_SLANTED_DASH_DOT
getBottomBorderColorback to summary
public int getBottomBorderColor()

get the color to use for the bottom border

Returns:int

The index of the color definition

See Also
org.apache.poi.hssf.usermodel.HSSFPalette#getColor(short)
getDataLengthback to summary
public int getDataLength()
getDiagonalBorderColorback to summary
public int getDiagonalBorderColor()

get the color to use for the diagonal border

Returns:int

The index of the color definition

See Also
org.apache.poi.hssf.usermodel.HSSFPalette#getColor(short)
getGenericPropertiesback to summary
public Map<String, Supplier<?>> getGenericProperties()

Implements org.apache.poi.common.usermodel.GenericRecord.getGenericProperties.

Annotations
@Override
getLeftBorderColorback to summary
public int getLeftBorderColor()

get the color to use for the left border

Returns:int

The index of the color definition

See Also
org.apache.poi.hssf.usermodel.HSSFPalette#getColor(short)
getRightBorderColorback to summary
public int getRightBorderColor()

get the color to use for the right border

Returns:int

The index of the color definition

See Also
org.apache.poi.hssf.usermodel.HSSFPalette#getColor(short)
getTopBorderColorback to summary
public int getTopBorderColor()

get the color to use for the top border

Returns:int

The index of the color definition

See Also
org.apache.poi.hssf.usermodel.HSSFPalette#getColor(short)
isBackwardDiagonalOnback to summary
public boolean isBackwardDiagonalOn()
Returns:boolean

true if backward diagonal is on

isForwardDiagonalOnback to summary
public boolean isForwardDiagonalOn()
Returns:boolean

true if forward diagonal is on

serializeback to summary
public int serialize(int offset, byte[] data)
serializeback to summary
public void serialize(LittleEndianOutput out)
setBackwardDiagonalOnback to summary
public void setBackwardDiagonalOn(boolean on)

Of/off top left to bottom right line

Parameters
on:boolean

- if true - on, otherwise off

setBorderBottomback to summary
public void setBorderBottom(int border)

set the type of border to use for the bottom border of the cell

Parameters
border:int

type

See Also
BORDER_NONE, BORDER_THIN, BORDER_MEDIUM, BORDER_DASHED, BORDER_DOTTED, BORDER_THICK, BORDER_DOUBLE, BORDER_HAIR, BORDER_MEDIUM_DASHED, BORDER_DASH_DOT, BORDER_MEDIUM_DASH_DOT, BORDER_DASH_DOT_DOT, BORDER_MEDIUM_DASH_DOT_DOT, BORDER_SLANTED_DASH_DOT
setBorderDiagonalback to summary
public void setBorderDiagonal(int border)

set the type of border to use for the diagonal border of the cell

Parameters
border:int

type

See Also
BORDER_NONE, BORDER_THIN, BORDER_MEDIUM, BORDER_DASHED, BORDER_DOTTED, BORDER_THICK, BORDER_DOUBLE, BORDER_HAIR, BORDER_MEDIUM_DASHED, BORDER_DASH_DOT, BORDER_MEDIUM_DASH_DOT, BORDER_DASH_DOT_DOT, BORDER_MEDIUM_DASH_DOT_DOT, BORDER_SLANTED_DASH_DOT
setBorderLeftback to summary
public void setBorderLeft(int border)

set the type of border to use for the left border of the cell

Parameters
border:int

type

See Also
BORDER_NONE, BORDER_THIN, BORDER_MEDIUM, BORDER_DASHED, BORDER_DOTTED, BORDER_THICK, BORDER_DOUBLE, BORDER_HAIR, BORDER_MEDIUM_DASHED, BORDER_DASH_DOT, BORDER_MEDIUM_DASH_DOT, BORDER_DASH_DOT_DOT, BORDER_MEDIUM_DASH_DOT_DOT, BORDER_SLANTED_DASH_DOT
setBorderRightback to summary
public void setBorderRight(int border)

set the type of border to use for the right border of the cell

Parameters
border:int

type

See Also
BORDER_NONE, BORDER_THIN, BORDER_MEDIUM, BORDER_DASHED, BORDER_DOTTED, BORDER_THICK, BORDER_DOUBLE, BORDER_HAIR, BORDER_MEDIUM_DASHED, BORDER_DASH_DOT, BORDER_MEDIUM_DASH_DOT, BORDER_DASH_DOT_DOT, BORDER_MEDIUM_DASH_DOT_DOT, BORDER_SLANTED_DASH_DOT
setBorderTopback to summary
public void setBorderTop(int border)

set the type of border to use for the top border of the cell

Parameters
border:int

type

See Also
BORDER_NONE, BORDER_THIN, BORDER_MEDIUM, BORDER_DASHED, BORDER_DOTTED, BORDER_THICK, BORDER_DOUBLE, BORDER_HAIR, BORDER_MEDIUM_DASHED, BORDER_DASH_DOT, BORDER_MEDIUM_DASH_DOT, BORDER_DASH_DOT_DOT, BORDER_MEDIUM_DASH_DOT_DOT, BORDER_SLANTED_DASH_DOT
setBottomBorderColorback to summary
public void setBottomBorderColor(int color)

set the color to use for the bottom border

Parameters
color:int

The index of the color definition

setDiagonalBorderColorback to summary
public void setDiagonalBorderColor(int color)

set the color to use for the diagonal borders

Parameters
color:int

The index of the color definition

setForwardDiagonalOnback to summary
public void setForwardDiagonalOn(boolean on)

Of/off bottom left to top right line

Parameters
on:boolean

- if true - on, otherwise off

setLeftBorderColorback to summary
public void setLeftBorderColor(int color)

set the color to use for the left border

Parameters
color:int

The index of the color definition

setRightBorderColorback to summary
public void setRightBorderColor(int color)

set the color to use for the right border

Parameters
color:int

The index of the color definition

setTopBorderColorback to summary
public void setTopBorderColor(int color)

set the color to use for the top border

Parameters
color:int

The index of the color definition

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

a string representation of the object