Package org.apache.poi.hssf.record.cf
Class BorderFormatting
- java.lang.Object
-
- org.apache.poi.hssf.record.cf.BorderFormatting
-
- All Implemented Interfaces:
Duplicatable
,GenericRecord
public final class BorderFormatting extends Object implements Duplicatable, GenericRecord
Border Formatting Block of the Conditional Formatting Rule Record.
-
-
Field Summary
Fields Modifier and Type Field Description static short
BORDER_DASH_DOT
dash-dot borderstatic short
BORDER_DASH_DOT_DOT
dash-dot-dot borderstatic short
BORDER_DASHED
dash borderstatic short
BORDER_DOTTED
hair-line borderstatic short
BORDER_DOUBLE
double-line borderstatic short
BORDER_HAIR
dot borderstatic short
BORDER_MEDIUM
Medium borderstatic short
BORDER_MEDIUM_DASH_DOT
medium dash-dot borderstatic short
BORDER_MEDIUM_DASH_DOT_DOT
medium dash-dot-dot borderstatic short
BORDER_MEDIUM_DASHED
Medium dashed borderstatic short
BORDER_NONE
No borderstatic short
BORDER_SLANTED_DASH_DOT
slanted dash-dot borderstatic short
BORDER_THICK
Thick borderstatic short
BORDER_THIN
Thin border
-
Constructor Summary
Constructors Constructor Description BorderFormatting()
BorderFormatting(BorderFormatting other)
BorderFormatting(LittleEndianInput in)
Creates new FontFormatting
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BorderFormatting
copy()
int
getBorderBottom()
get the type of border to use for the bottom border of the cellint
getBorderDiagonal()
get the type of border to use for the diagonal border of the cellint
getBorderLeft()
get the type of border to use for the left border of the cellint
getBorderRight()
get the type of border to use for the right border of the cellint
getBorderTop()
get the type of border to use for the top border of the cellint
getBottomBorderColor()
get the color to use for the bottom borderint
getDataLength()
int
getDiagonalBorderColor()
get the color to use for the diagonal borderMap<String,Supplier<?>>
getGenericProperties()
int
getLeftBorderColor()
get the color to use for the left borderint
getRightBorderColor()
get the color to use for the right borderint
getTopBorderColor()
get the color to use for the top borderboolean
isBackwardDiagonalOn()
boolean
isForwardDiagonalOn()
int
serialize(int offset, byte[] data)
void
serialize(LittleEndianOutput out)
void
setBackwardDiagonalOn(boolean on)
Of/off top left to bottom right linevoid
setBorderBottom(int border)
set the type of border to use for the bottom border of the cellvoid
setBorderDiagonal(int border)
set the type of border to use for the diagonal border of the cellvoid
setBorderLeft(int border)
set the type of border to use for the left border of the cellvoid
setBorderRight(int border)
set the type of border to use for the right border of the cellvoid
setBorderTop(int border)
set the type of border to use for the top border of the cellvoid
setBottomBorderColor(int color)
set the color to use for the bottom bordervoid
setDiagonalBorderColor(int color)
set the color to use for the diagonal bordersvoid
setForwardDiagonalOn(boolean on)
Of/off bottom left to top right linevoid
setLeftBorderColor(int color)
set the color to use for the left bordervoid
setRightBorderColor(int color)
set the color to use for the right bordervoid
setTopBorderColor(int color)
set the color to use for the top borderString
toString()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.poi.common.usermodel.GenericRecord
getGenericChildren, getGenericRecordType
-
-
-
-
Field Detail
-
BORDER_NONE
public static final short BORDER_NONE
No border- See Also:
- Constant Field Values
-
BORDER_THIN
public static final short BORDER_THIN
Thin border- See Also:
- Constant Field Values
-
BORDER_MEDIUM
public static final short BORDER_MEDIUM
Medium border- See Also:
- Constant Field Values
-
BORDER_DASHED
public static final short BORDER_DASHED
dash border- See Also:
- Constant Field Values
-
BORDER_HAIR
public static final short BORDER_HAIR
dot border- See Also:
- Constant Field Values
-
BORDER_THICK
public static final short BORDER_THICK
Thick border- See Also:
- Constant Field Values
-
BORDER_DOUBLE
public static final short BORDER_DOUBLE
double-line border- See Also:
- Constant Field Values
-
BORDER_DOTTED
public static final short BORDER_DOTTED
hair-line border- See Also:
- Constant Field Values
-
BORDER_MEDIUM_DASHED
public static final short BORDER_MEDIUM_DASHED
Medium dashed border- See Also:
- Constant Field Values
-
BORDER_DASH_DOT
public static final short BORDER_DASH_DOT
dash-dot border- See Also:
- Constant Field Values
-
BORDER_MEDIUM_DASH_DOT
public static final short BORDER_MEDIUM_DASH_DOT
medium dash-dot border- See Also:
- Constant Field Values
-
BORDER_DASH_DOT_DOT
public static final short BORDER_DASH_DOT_DOT
dash-dot-dot border- See Also:
- Constant Field Values
-
BORDER_MEDIUM_DASH_DOT_DOT
public static final short BORDER_MEDIUM_DASH_DOT_DOT
medium dash-dot-dot border- See Also:
- Constant Field Values
-
BORDER_SLANTED_DASH_DOT
public static final short BORDER_SLANTED_DASH_DOT
slanted dash-dot border- See Also:
- Constant Field Values
-
-
Constructor Detail
-
BorderFormatting
public BorderFormatting()
-
BorderFormatting
public BorderFormatting(BorderFormatting other)
-
BorderFormatting
public BorderFormatting(LittleEndianInput in)
Creates new FontFormatting
-
-
Method Detail
-
getDataLength
public int getDataLength()
-
setBorderLeft
public void setBorderLeft(int border)
set the type of border to use for the left border of the cell- Parameters:
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
-
getBorderLeft
public int getBorderLeft()
get the type of border to use for the left border of the cell- Returns:
- 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
-
setBorderRight
public void setBorderRight(int border)
set the type of border to use for the right border of the cell- Parameters:
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
-
getBorderRight
public int getBorderRight()
get the type of border to use for the right border of the cell- Returns:
- 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
-
setBorderTop
public void setBorderTop(int border)
set the type of border to use for the top border of the cell- Parameters:
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
-
getBorderTop
public int getBorderTop()
get the type of border to use for the top border of the cell- Returns:
- 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
-
setBorderBottom
public void setBorderBottom(int border)
set the type of border to use for the bottom border of the cell- Parameters:
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
-
getBorderBottom
public int getBorderBottom()
get the type of border to use for the bottom border of the cell- Returns:
- 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
-
setBorderDiagonal
public void setBorderDiagonal(int border)
set the type of border to use for the diagonal border of the cell- Parameters:
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
-
getBorderDiagonal
public int getBorderDiagonal()
get the type of border to use for the diagonal border of the cell- Returns:
- 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
-
setLeftBorderColor
public void setLeftBorderColor(int color)
set the color to use for the left border- Parameters:
color
- The index of the color definition
-
getLeftBorderColor
public int getLeftBorderColor()
get the color to use for the left border- Returns:
- The index of the color definition
- See Also:
HSSFPalette.getColor(short)
-
setRightBorderColor
public void setRightBorderColor(int color)
set the color to use for the right border- Parameters:
color
- The index of the color definition
-
getRightBorderColor
public int getRightBorderColor()
get the color to use for the right border- Returns:
- The index of the color definition
- See Also:
HSSFPalette.getColor(short)
-
setTopBorderColor
public void setTopBorderColor(int color)
set the color to use for the top border- Parameters:
color
- The index of the color definition
-
getTopBorderColor
public int getTopBorderColor()
get the color to use for the top border- Returns:
- The index of the color definition
- See Also:
HSSFPalette.getColor(short)
-
setBottomBorderColor
public void setBottomBorderColor(int color)
set the color to use for the bottom border- Parameters:
color
- The index of the color definition
-
getBottomBorderColor
public int getBottomBorderColor()
get the color to use for the bottom border- Returns:
- The index of the color definition
- See Also:
HSSFPalette.getColor(short)
-
setDiagonalBorderColor
public void setDiagonalBorderColor(int color)
set the color to use for the diagonal borders- Parameters:
color
- The index of the color definition
-
getDiagonalBorderColor
public int getDiagonalBorderColor()
get the color to use for the diagonal border- Returns:
- The index of the color definition
- See Also:
HSSFPalette.getColor(short)
-
setForwardDiagonalOn
public void setForwardDiagonalOn(boolean on)
Of/off bottom left to top right line- Parameters:
on
- - iftrue
- on, otherwise off
-
setBackwardDiagonalOn
public void setBackwardDiagonalOn(boolean on)
Of/off top left to bottom right line- Parameters:
on
- - iftrue
- on, otherwise off
-
isForwardDiagonalOn
public boolean isForwardDiagonalOn()
- Returns:
true
if forward diagonal is on
-
isBackwardDiagonalOn
public boolean isBackwardDiagonalOn()
- Returns:
true
if backward diagonal is on
-
getGenericProperties
public Map<String,Supplier<?>> getGenericProperties()
- Specified by:
getGenericProperties
in interfaceGenericRecord
-
copy
public BorderFormatting copy()
- Specified by:
copy
in interfaceDuplicatable
- Returns:
- a deep copy of the implementing class / instance
-
serialize
public int serialize(int offset, byte[] data)
-
serialize
public void serialize(LittleEndianOutput out)
-
-