Package org.apache.poi.hssf.record.cf
Class BorderFormatting
- java.lang.Object
-
- org.apache.poi.hssf.record.cf.BorderFormatting
-
- All Implemented Interfaces:
org.apache.poi.common.Duplicatable,GenericRecord
public final class BorderFormatting extends java.lang.Object implements org.apache.poi.common.Duplicatable, GenericRecord
Border Formatting Block of the Conditional Formatting Rule Record.
-
-
Field Summary
Fields Modifier and Type Field Description static shortBORDER_DASH_DOTdash-dot borderstatic shortBORDER_DASH_DOT_DOTdash-dot-dot borderstatic shortBORDER_DASHEDdash borderstatic shortBORDER_DOTTEDhair-line borderstatic shortBORDER_DOUBLEdouble-line borderstatic shortBORDER_HAIRdot borderstatic shortBORDER_MEDIUMMedium borderstatic shortBORDER_MEDIUM_DASH_DOTmedium dash-dot borderstatic shortBORDER_MEDIUM_DASH_DOT_DOTmedium dash-dot-dot borderstatic shortBORDER_MEDIUM_DASHEDMedium dashed borderstatic shortBORDER_NONENo borderstatic shortBORDER_SLANTED_DASH_DOTslanted dash-dot borderstatic shortBORDER_THICKThick borderstatic shortBORDER_THINThin 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 BorderFormattingcopy()intgetBorderBottom()get the type of border to use for the bottom border of the cellintgetBorderDiagonal()get the type of border to use for the diagonal border of the cellintgetBorderLeft()get the type of border to use for the left border of the cellintgetBorderRight()get the type of border to use for the right border of the cellintgetBorderTop()get the type of border to use for the top border of the cellintgetBottomBorderColor()get the color to use for the bottom borderintgetDataLength()intgetDiagonalBorderColor()get the color to use for the diagonal borderjava.util.Map<java.lang.String,java.util.function.Supplier<?>>getGenericProperties()intgetLeftBorderColor()get the color to use for the left borderintgetRightBorderColor()get the color to use for the right borderintgetTopBorderColor()get the color to use for the top borderbooleanisBackwardDiagonalOn()booleanisForwardDiagonalOn()intserialize(int offset, byte[] data)voidserialize(LittleEndianOutput out)voidsetBackwardDiagonalOn(boolean on)Of/off top left to bottom right linevoidsetBorderBottom(int border)set the type of border to use for the bottom border of the cellvoidsetBorderDiagonal(int border)set the type of border to use for the diagonal border of the cellvoidsetBorderLeft(int border)set the type of border to use for the left border of the cellvoidsetBorderRight(int border)set the type of border to use for the right border of the cellvoidsetBorderTop(int border)set the type of border to use for the top border of the cellvoidsetBottomBorderColor(int color)set the color to use for the bottom bordervoidsetDiagonalBorderColor(int color)set the color to use for the diagonal bordersvoidsetForwardDiagonalOn(boolean on)Of/off bottom left to top right linevoidsetLeftBorderColor(int color)set the color to use for the left bordervoidsetRightBorderColor(int color)set the color to use for the right bordervoidsetTopBorderColor(int color)set the color to use for the top borderjava.lang.StringtoString()-
Methods inherited from class java.lang.Object
equals, 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:
trueif forward diagonal is on
-
isBackwardDiagonalOn
public boolean isBackwardDiagonalOn()
- Returns:
trueif backward diagonal is on
-
getGenericProperties
public java.util.Map<java.lang.String,java.util.function.Supplier<?>> getGenericProperties()
- Specified by:
getGenericPropertiesin interfaceGenericRecord
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
copy
public BorderFormatting copy()
- Specified by:
copyin interfaceorg.apache.poi.common.Duplicatable
-
serialize
public int serialize(int offset, byte[] data)
-
serialize
public void serialize(LittleEndianOutput out)
-
-