Class XSSFCellBorder
- java.lang.Object
-
- org.apache.poi.xssf.usermodel.extensions.XSSFCellBorder
-
public class XSSFCellBorder extends java.lang.Object
This element contains border formatting information, specifying border definition formats (left, right, top, bottom, diagonal) for cells in the workbook. Color is optional.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
XSSFCellBorder.BorderSide
The enumeration value indicating the side being used for a cell border.
-
Constructor Summary
Constructors Constructor Description XSSFCellBorder()
Creates a new, empty Cell Border.XSSFCellBorder(CTBorder border)
Creates a Cell Border from the supplied XML definitionXSSFCellBorder(CTBorder border, ThemesTable theme, IndexedColorMap colorMap)
Creates a Cell Border from the supplied XML definitionXSSFCellBorder(CTBorder border, IndexedColorMap colorMap)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
XSSFColor
getBorderColor(XSSFCellBorder.BorderSide side)
Get the color to use for the selected borderBorderStyle
getBorderStyle(XSSFCellBorder.BorderSide side)
Get the type of border to use for the selected borderCTBorder
getCTBorder()
Returns the underlying XML bean.int
hashCode()
void
setBorderColor(XSSFCellBorder.BorderSide side, XSSFColor color)
Set the color to use for the selected bordervoid
setBorderStyle(XSSFCellBorder.BorderSide side, BorderStyle style)
Set the type of border to use for the selected bordervoid
setThemesTable(ThemesTable themes)
Records the Themes Table that is associated with the current font, used when looking up theme based colours and properties.
-
-
-
Constructor Detail
-
XSSFCellBorder
public XSSFCellBorder(CTBorder border, ThemesTable theme, IndexedColorMap colorMap)
Creates a Cell Border from the supplied XML definition- Parameters:
border
-theme
-colorMap
-
-
XSSFCellBorder
public XSSFCellBorder(CTBorder border)
Creates a Cell Border from the supplied XML definition- Parameters:
border
-
-
XSSFCellBorder
public XSSFCellBorder(CTBorder border, IndexedColorMap colorMap)
- Parameters:
border
-colorMap
-
-
XSSFCellBorder
public XSSFCellBorder()
Creates a new, empty Cell Border. You need to attach this to the Styles Table
-
-
Method Detail
-
setThemesTable
public void setThemesTable(ThemesTable themes)
Records the Themes Table that is associated with the current font, used when looking up theme based colours and properties.
-
getCTBorder
@Internal public CTBorder getCTBorder()
Returns the underlying XML bean.- Returns:
- CTBorder
-
getBorderStyle
public BorderStyle getBorderStyle(XSSFCellBorder.BorderSide side)
Get the type of border to use for the selected border- Parameters:
side
- - - where to apply the color definition- Returns:
- borderstyle - the type of border to use. default value is NONE if border style is not set.
- See Also:
BorderStyle
-
setBorderStyle
public void setBorderStyle(XSSFCellBorder.BorderSide side, BorderStyle style)
Set the type of border to use for the selected border- Parameters:
side
- - - where to apply the color definitionstyle
- - border style- See Also:
BorderStyle
-
getBorderColor
public XSSFColor getBorderColor(XSSFCellBorder.BorderSide side)
Get the color to use for the selected border- Parameters:
side
- - where to apply the color definition- Returns:
- color - color to use as XSSFColor. null if color is not set
-
setBorderColor
public void setBorderColor(XSSFCellBorder.BorderSide side, XSSFColor color)
Set the color to use for the selected border- Parameters:
side
- - where to apply the color definitioncolor
- - the color to use
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
-