Package org.apache.poi.xssf.usermodel
Class XSSFDxfCellStyle
- java.lang.Object
-
- org.apache.poi.xssf.usermodel.XSSFCellStyle
-
- org.apache.poi.xssf.usermodel.XSSFDxfCellStyle
-
- All Implemented Interfaces:
Duplicatable
,CellStyle
,DxfCellStyle
public class XSSFDxfCellStyle extends org.apache.poi.xssf.usermodel.XSSFCellStyle implements DxfCellStyle
Cell style for Dxfs- Since:
- 3.7.0
- Author:
- henri
-
-
Constructor Summary
Constructors Constructor Description XSSFDxfCellStyle(int dxfId, org.apache.poi.xssf.model.StylesTable stylesSource, org.apache.poi.xssf.model.ThemesTable theme)
XSSFDxfCellStyle(org.apache.poi.xssf.model.StylesTable stylesSource, org.apache.poi.xssf.model.ThemesTable theme)
Creates an empty Cell Style with theme
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BorderStyle
getBorderBottom()
get the type of border to use for the bottom border of the cellBorderStyle
getBorderDiagonal()
get the type of border to use for the diagonal border of the cellBorderStyle
getBorderHorizontal()
get the type of border to use for the horizontal border of the cellBorderStyle
getBorderLeft()
get the type of border to use for the left border of the cellBorderStyle
getBorderRight()
get the type of border to use for the right border of the cellBorderStyle
getBorderTop()
get the type of border to use for the top border of the cellBorderStyle
getBorderVertical()
get the type of border to use for the vertical border of the cellorg.apache.poi.xssf.usermodel.XSSFColor
getBottomBorderXSSFColor()
Get the color to use for the bottom borderprotected org.apache.poi.xssf.usermodel.extensions.XSSFCellAlignment
getCellAlignment()
get the cellAlignment object to use for manage alignmentshort
getDataFormat()
get the index of the data format.String
getDataFormatString()
Get the format stringshort
getDiagonalBorderColor()
get the color to use for the diagonal borderColor
getDiagonalBorderColorColor()
org.apache.poi.xssf.usermodel.XSSFColor
getDiagonalBorderXSSFColor()
Get the color to use for the diagonal borderorg.openxmlformats.schemas.spreadsheetml.x2006.main.CTDxf
getDxf()
int
getDxfIndex()
org.apache.poi.xssf.usermodel.XSSFColor
getFillBackgroundXSSFColor()
Get the background fill color.org.apache.poi.xssf.usermodel.XSSFColor
getFillForegroundXSSFColor()
Get the foreground fill color.FillPatternType
getFillPattern()
Get the fill patternint
getFontIndex()
gets the index of the font for this styleint
getFontIndexAsInt()
gets the index of the font for this styleboolean
getHidden()
get whether the cell's using this style are to be hiddenshort
getHorizontalBorderColor()
get the color to use for the horizontal borderColor
getHorizontalBorderColorColor()
org.apache.poi.xssf.usermodel.XSSFColor
getHorizontalBorderXSSFColor()
Get the color to use for the horizontal bordershort
getIndention()
get the number of spaces to indent the text in the cellshort
getIndex()
get the index within the Workbook (sequence within the collection of ExtendedFormat objects)org.apache.poi.xssf.usermodel.XSSFColor
getLeftBorderXSSFColor()
Get the color to use for the left borderboolean
getLocked()
get whether the cell's using this style are to be lockedorg.apache.poi.xssf.usermodel.XSSFFont
getOrCreateFont()
Gets or create the font for this styleString
getRawDataFormatString()
org.apache.poi.xssf.usermodel.XSSFColor
getRightBorderXSSFColor()
Get the color to use for the right bordershort
getRotation()
get the degree of rotation for the text in the cell.org.apache.poi.xssf.usermodel.XSSFColor
getTopBorderXSSFColor()
Get the color to use for the top bordershort
getVerticalBorderColor()
get the color to use for the vertical borderColor
getVerticalBorderColorColor()
org.apache.poi.xssf.usermodel.XSSFColor
getVerticalBorderXSSFColor()
Get the color to use for the vertical borderboolean
getWrapText()
get whether the text should be wrappedboolean
isShowDiagonalDownBorder()
Whether show diagonalDown diagonal borderboolean
isShowDiagonalUpBorder()
Whether show diagonalUp diagonal bordervoid
setBorder(BorderStyle left, Color leftColor, BorderStyle top, Color topColor, BorderStyle right, Color rightColor, BorderStyle bottom, Color bottomColor, BorderStyle diagonal, Color diagonalColor, BorderStyle horizontal, Color horizontalColor, BorderStyle vertical, Color verticalColor, boolean diaUp, boolean diaDown)
void
setBorderBottom(BorderStyle border)
set the type of border to use for the bottom border of the cellvoid
setBorderDiagonal(BorderStyle border)
set the type of border to use for the diagonal border of the cellvoid
setBorderHorizontal(BorderStyle border)
set the type of border to use for the horizontal border of the cellvoid
setBorderLeft(BorderStyle border)
set the type of border to use for the left border of the cellvoid
setBorderRight(BorderStyle border)
set the type of border to use for the right border of the cellvoid
setBorderTop(BorderStyle border)
set the type of border to use for the top border of the cellvoid
setBorderVertical(BorderStyle border)
set the type of border to use for the horizontal border of the cellvoid
setBottomBorderColor(org.apache.poi.xssf.usermodel.XSSFColor color)
Set the color to use for the left border as aXSSFColor
valuevoid
setDataFormat(short fmt)
set the data format (must be a valid format).void
setDiagonalBorderColor(short color)
set the color to use for the diagonal bordervoid
setDiagonalBorderColor(org.apache.poi.xssf.usermodel.XSSFColor color)
Set the color to use for the left border as aXSSFColor
valuevoid
setFill(Color fillColor, Color backColor, short patternType)
void
setFillBackgroundColor(org.apache.poi.xssf.usermodel.XSSFColor color)
Set the background fill color represented as aXSSFColor
value.void
setFillForegroundColor(org.apache.poi.xssf.usermodel.XSSFColor color)
Set the foreground fill color represented as aXSSFColor
value.void
setFillPattern(FillPatternType fp)
setting to one fills the cell with the foreground color...void
setFont(Font font)
set the font for this stylevoid
setHidden(boolean hidden)
set the cell's using this style to be hiddenvoid
setHorizontalBorderColor(short color)
set the color to use for the horizontal bordervoid
setHorizontalBorderColor(org.apache.poi.xssf.usermodel.XSSFColor color)
Set the color to use for the left border as aXSSFColor
valuevoid
setIndention(short indent)
set the number of spaces to indent the text in the cellvoid
setIndex(int dxfId)
void
setLeftBorderColor(org.apache.poi.xssf.usermodel.XSSFColor color)
Set the color to use for the left border as aXSSFColor
valuevoid
setLocked(boolean locked)
set the cell's using this style to be lockedvoid
setRightBorderColor(org.apache.poi.xssf.usermodel.XSSFColor color)
Set the color to use for the left border as aXSSFColor
valuevoid
setRotation(short rotation)
set the degree of rotation for the text in the cell.void
setShowDiagonalDownBorder(boolean down)
Whether show diagonalDown diagonal bordervoid
setShowDiagonalUpBorder(boolean up)
Whether show diagonalUp diagonal bordervoid
setTopBorderColor(org.apache.poi.xssf.usermodel.XSSFColor color)
Set the color to use for the left border as aXSSFColor
valuevoid
setVerticalBorderColor(short color)
set the color to use for the vertical bordervoid
setVerticalBorderColor(org.apache.poi.xssf.usermodel.XSSFColor color)
Set the color to use for the left border as aXSSFColor
valuevoid
setWrapText(boolean wrapped)
Set whether the text should be wrapped.-
Methods inherited from class org.apache.poi.xssf.usermodel.XSSFCellStyle
cloneStyleFrom, copy, equals, getAlignment, getBorderColor, getBottomBorderColor, getCoreXf, getFillBackgroundColor, getFillBackgroundColorColor, getFillForegroundColor, getFillForegroundColorColor, getFont, getLeftBorderColor, getQuotePrefixed, getReadingOrder, getRightBorderColor, getShrinkToFit, getStyleXf, getTopBorderColor, getUIndex, getVerticalAlignment, hashCode, setAlignment, setBorderColor, setBottomBorderColor, setDataFormat, setFillBackgroundColor, setFillBackgroundColor, setFillForegroundColor, setFillForegroundColor, setLeftBorderColor, setQuotePrefixed, setReadingOrder, setRightBorderColor, setShrinkToFit, setTopBorderColor, setVerticalAlignment, verifyBelongsToStylesSource
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.poi.ss.usermodel.CellStyle
cloneStyleFrom, getAlignment, getBottomBorderColor, getFillBackgroundColor, getFillBackgroundColorColor, getFillForegroundColor, getFillForegroundColorColor, getLeftBorderColor, getQuotePrefixed, getRightBorderColor, getShrinkToFit, getTopBorderColor, getVerticalAlignment, setAlignment, setBottomBorderColor, setFillBackgroundColor, setFillBackgroundColor, setFillForegroundColor, setFillForegroundColor, setLeftBorderColor, setQuotePrefixed, setRightBorderColor, setShrinkToFit, setTopBorderColor, setVerticalAlignment
-
-
-
-
Constructor Detail
-
XSSFDxfCellStyle
public XSSFDxfCellStyle(org.apache.poi.xssf.model.StylesTable stylesSource, org.apache.poi.xssf.model.ThemesTable theme)
Creates an empty Cell Style with theme- Since:
- 3.8.2
-
XSSFDxfCellStyle
public XSSFDxfCellStyle(int dxfId, org.apache.poi.xssf.model.StylesTable stylesSource, org.apache.poi.xssf.model.ThemesTable theme)
-
-
Method Detail
-
setIndex
public void setIndex(int dxfId)
-
getDxf
public org.openxmlformats.schemas.spreadsheetml.x2006.main.CTDxf getDxf()
-
getIndex
public short getIndex()
Description copied from interface:CellStyle
get the index within the Workbook (sequence within the collection of ExtendedFormat objects)
-
setDataFormat
public void setDataFormat(short fmt)
Description copied from interface:CellStyle
set the data format (must be a valid format). Built in formats are defined atBuiltinFormats
.- Specified by:
setDataFormat
in interfaceCellStyle
- Overrides:
setDataFormat
in classorg.apache.poi.xssf.usermodel.XSSFCellStyle
- See Also:
DataFormat
-
getDataFormat
public short getDataFormat()
Description copied from interface:CellStyle
get the index of the data format. Built in formats are defined atBuiltinFormats
.- Specified by:
getDataFormat
in interfaceCellStyle
- Overrides:
getDataFormat
in classorg.apache.poi.xssf.usermodel.XSSFCellStyle
- See Also:
DataFormat
-
getDataFormatString
public String getDataFormatString()
Description copied from interface:CellStyle
Get the format string- Specified by:
getDataFormatString
in interfaceCellStyle
- Overrides:
getDataFormatString
in classorg.apache.poi.xssf.usermodel.XSSFCellStyle
-
getRawDataFormatString
public String getRawDataFormatString()
-
setFont
public void setFont(Font font)
Description copied from interface:CellStyle
set the font for this style- Specified by:
setFont
in interfaceCellStyle
- Overrides:
setFont
in classorg.apache.poi.xssf.usermodel.XSSFCellStyle
- Parameters:
font
- a font object created or retrieved from the Workbook object- See Also:
Workbook.createFont()
,Workbook.getFontAt(int)
-
getOrCreateFont
public org.apache.poi.xssf.usermodel.XSSFFont getOrCreateFont()
Gets or create the font for this style- Returns:
- XSSFFont - font
-
getFontIndex
public int getFontIndex()
Description copied from interface:CellStyle
gets the index of the font for this style- Specified by:
getFontIndex
in interfaceCellStyle
- Overrides:
getFontIndex
in classorg.apache.poi.xssf.usermodel.XSSFCellStyle
- See Also:
Workbook.getFontAt(int)
-
setHidden
public void setHidden(boolean hidden)
Description copied from interface:CellStyle
set the cell's using this style to be hidden
-
getHidden
public boolean getHidden()
Description copied from interface:CellStyle
get whether the cell's using this style are to be hidden
-
setLocked
public void setLocked(boolean locked)
Description copied from interface:CellStyle
set the cell's using this style to be locked
-
getLocked
public boolean getLocked()
Description copied from interface:CellStyle
get whether the cell's using this style are to be locked
-
setWrapText
public void setWrapText(boolean wrapped)
Description copied from interface:CellStyle
Set whether the text should be wrapped. Setting this flag totrue
make all content visible within a cell by displaying it on multiple lines- Specified by:
setWrapText
in interfaceCellStyle
- Overrides:
setWrapText
in classorg.apache.poi.xssf.usermodel.XSSFCellStyle
- Parameters:
wrapped
- wrap text or not
-
getWrapText
public boolean getWrapText()
Description copied from interface:CellStyle
get whether the text should be wrapped- Specified by:
getWrapText
in interfaceCellStyle
- Overrides:
getWrapText
in classorg.apache.poi.xssf.usermodel.XSSFCellStyle
- Returns:
- wrap text or not
-
setRotation
public void setRotation(short rotation)
Description copied from interface:CellStyle
set the degree of rotation for the text in the cell. Note: HSSF uses values from -90 to 90 degrees, whereas XSSF uses values from 0 to 180 degrees. The implementations of this method will map between these two value-ranges accordingly, however the corresponding getter is returning values in the range mandated by the current type of Excel file-format that this CellStyle is applied to.- Specified by:
setRotation
in interfaceCellStyle
- Overrides:
setRotation
in classorg.apache.poi.xssf.usermodel.XSSFCellStyle
- Parameters:
rotation
- degrees (see note above)
-
getRotation
public short getRotation()
Description copied from interface:CellStyle
get the degree of rotation for the text in the cell. Note: HSSF uses values from -90 to 90 degrees, whereas XSSF uses values from 0 to 180 degrees. The implementations of this method will map between these two value-ranges value-range as used by the type of Excel file-format that this CellStyle is applied to.- Specified by:
getRotation
in interfaceCellStyle
- Overrides:
getRotation
in classorg.apache.poi.xssf.usermodel.XSSFCellStyle
- Returns:
- rotation degrees (see note above)
-
setIndention
public void setIndention(short indent)
Description copied from interface:CellStyle
set the number of spaces to indent the text in the cell- Specified by:
setIndention
in interfaceCellStyle
- Overrides:
setIndention
in classorg.apache.poi.xssf.usermodel.XSSFCellStyle
- Parameters:
indent
- - number of spaces
-
getIndention
public short getIndention()
Description copied from interface:CellStyle
get the number of spaces to indent the text in the cell- Specified by:
getIndention
in interfaceCellStyle
- Overrides:
getIndention
in classorg.apache.poi.xssf.usermodel.XSSFCellStyle
- Returns:
- indent - number of spaces
-
setBorderLeft
public void setBorderLeft(BorderStyle border)
Description copied from interface:CellStyle
set the type of border to use for the left border of the cell- Specified by:
setBorderLeft
in interfaceCellStyle
- Overrides:
setBorderLeft
in classorg.apache.poi.xssf.usermodel.XSSFCellStyle
- Parameters:
border
- type
-
getBorderLeft
public BorderStyle getBorderLeft()
Description copied from interface:CellStyle
get the type of border to use for the left border of the cell- Specified by:
getBorderLeft
in interfaceCellStyle
- Overrides:
getBorderLeft
in classorg.apache.poi.xssf.usermodel.XSSFCellStyle
- Returns:
- border type
-
setBorderRight
public void setBorderRight(BorderStyle border)
Description copied from interface:CellStyle
set the type of border to use for the right border of the cell- Specified by:
setBorderRight
in interfaceCellStyle
- Overrides:
setBorderRight
in classorg.apache.poi.xssf.usermodel.XSSFCellStyle
- Parameters:
border
- type
-
getBorderRight
public BorderStyle getBorderRight()
Description copied from interface:CellStyle
get the type of border to use for the right border of the cell- Specified by:
getBorderRight
in interfaceCellStyle
- Overrides:
getBorderRight
in classorg.apache.poi.xssf.usermodel.XSSFCellStyle
- Returns:
- border type
-
setBorderTop
public void setBorderTop(BorderStyle border)
Description copied from interface:CellStyle
set the type of border to use for the top border of the cell- Specified by:
setBorderTop
in interfaceCellStyle
- Overrides:
setBorderTop
in classorg.apache.poi.xssf.usermodel.XSSFCellStyle
- Parameters:
border
- type
-
getBorderTop
public BorderStyle getBorderTop()
Description copied from interface:CellStyle
get the type of border to use for the top border of the cell- Specified by:
getBorderTop
in interfaceCellStyle
- Overrides:
getBorderTop
in classorg.apache.poi.xssf.usermodel.XSSFCellStyle
- Returns:
- border type
-
setBorderBottom
public void setBorderBottom(BorderStyle border)
Description copied from interface:CellStyle
set the type of border to use for the bottom border of the cell- Specified by:
setBorderBottom
in interfaceCellStyle
- Overrides:
setBorderBottom
in classorg.apache.poi.xssf.usermodel.XSSFCellStyle
- Parameters:
border
- type
-
getBorderBottom
public BorderStyle getBorderBottom()
Description copied from interface:CellStyle
get the type of border to use for the bottom border of the cell- Specified by:
getBorderBottom
in interfaceCellStyle
- Overrides:
getBorderBottom
in classorg.apache.poi.xssf.usermodel.XSSFCellStyle
- Returns:
- border type
-
setFillPattern
public void setFillPattern(FillPatternType fp)
Description copied from interface:CellStyle
setting to one fills the cell with the foreground color... No idea about other values- Specified by:
setFillPattern
in interfaceCellStyle
- Overrides:
setFillPattern
in classorg.apache.poi.xssf.usermodel.XSSFCellStyle
- Parameters:
fp
- fill pattern (set toFillPatternType.SOLID_FOREGROUND
to fill w/foreground color)
-
getFillPattern
public FillPatternType getFillPattern()
Description copied from interface:CellStyle
Get the fill pattern- Specified by:
getFillPattern
in interfaceCellStyle
- Overrides:
getFillPattern
in classorg.apache.poi.xssf.usermodel.XSSFCellStyle
- Returns:
- the fill pattern, default value is
FillPatternType.NO_FILL
-
getCellAlignment
protected org.apache.poi.xssf.usermodel.extensions.XSSFCellAlignment getCellAlignment()
get the cellAlignment object to use for manage alignment- Overrides:
getCellAlignment
in classorg.apache.poi.xssf.usermodel.XSSFCellStyle
- Returns:
- XSSFCellAlignment - cell alignment
-
setBorderHorizontal
public void setBorderHorizontal(BorderStyle border)
Description copied from interface:DxfCellStyle
set the type of border to use for the horizontal border of the cell- Specified by:
setBorderHorizontal
in interfaceDxfCellStyle
- Parameters:
border
- type
-
getBorderHorizontal
public BorderStyle getBorderHorizontal()
Description copied from interface:DxfCellStyle
get the type of border to use for the horizontal border of the cell- Specified by:
getBorderHorizontal
in interfaceDxfCellStyle
- Returns:
- border type
-
getHorizontalBorderColorColor
public Color getHorizontalBorderColorColor()
- Specified by:
getHorizontalBorderColorColor
in interfaceDxfCellStyle
- Returns:
-
setHorizontalBorderColor
public void setHorizontalBorderColor(short color)
Description copied from interface:DxfCellStyle
set the color to use for the horizontal border- Specified by:
setHorizontalBorderColor
in interfaceDxfCellStyle
- Parameters:
color
- The index of the color definition
-
getHorizontalBorderColor
public short getHorizontalBorderColor()
Description copied from interface:DxfCellStyle
get the color to use for the horizontal border- Specified by:
getHorizontalBorderColor
in interfaceDxfCellStyle
-
setBorderVertical
public void setBorderVertical(BorderStyle border)
Description copied from interface:DxfCellStyle
set the type of border to use for the horizontal border of the cell- Specified by:
setBorderVertical
in interfaceDxfCellStyle
- Parameters:
border
- type
-
getBorderVertical
public BorderStyle getBorderVertical()
Description copied from interface:DxfCellStyle
get the type of border to use for the vertical border of the cell- Specified by:
getBorderVertical
in interfaceDxfCellStyle
- Returns:
- border type
-
getVerticalBorderColorColor
public Color getVerticalBorderColorColor()
- Specified by:
getVerticalBorderColorColor
in interfaceDxfCellStyle
- Returns:
-
setVerticalBorderColor
public void setVerticalBorderColor(short color)
Description copied from interface:DxfCellStyle
set the color to use for the vertical border- Specified by:
setVerticalBorderColor
in interfaceDxfCellStyle
- Parameters:
color
- The index of the color definition
-
getVerticalBorderColor
public short getVerticalBorderColor()
Description copied from interface:DxfCellStyle
get the color to use for the vertical border- Specified by:
getVerticalBorderColor
in interfaceDxfCellStyle
-
setBorderDiagonal
public void setBorderDiagonal(BorderStyle border)
Description copied from interface:DxfCellStyle
set the type of border to use for the diagonal border of the cell- Specified by:
setBorderDiagonal
in interfaceDxfCellStyle
- Parameters:
border
- type
-
getBorderDiagonal
public BorderStyle getBorderDiagonal()
Description copied from interface:DxfCellStyle
get the type of border to use for the diagonal border of the cell- Specified by:
getBorderDiagonal
in interfaceDxfCellStyle
- Returns:
- border type
-
getDiagonalBorderColorColor
public Color getDiagonalBorderColorColor()
- Specified by:
getDiagonalBorderColorColor
in interfaceDxfCellStyle
-
setDiagonalBorderColor
public void setDiagonalBorderColor(short color)
Description copied from interface:DxfCellStyle
set the color to use for the diagonal border- Specified by:
setDiagonalBorderColor
in interfaceDxfCellStyle
- Parameters:
color
- The index of the color definition
-
getDiagonalBorderColor
public short getDiagonalBorderColor()
Description copied from interface:DxfCellStyle
get the color to use for the diagonal border- Specified by:
getDiagonalBorderColor
in interfaceDxfCellStyle
-
isShowDiagonalUpBorder
public boolean isShowDiagonalUpBorder()
Description copied from interface:DxfCellStyle
Whether show diagonalUp diagonal border- Specified by:
isShowDiagonalUpBorder
in interfaceDxfCellStyle
- Returns:
-
isShowDiagonalDownBorder
public boolean isShowDiagonalDownBorder()
Description copied from interface:DxfCellStyle
Whether show diagonalDown diagonal border- Specified by:
isShowDiagonalDownBorder
in interfaceDxfCellStyle
-
setShowDiagonalUpBorder
public void setShowDiagonalUpBorder(boolean up)
Description copied from interface:DxfCellStyle
Whether show diagonalUp diagonal border- Specified by:
setShowDiagonalUpBorder
in interfaceDxfCellStyle
-
setShowDiagonalDownBorder
public void setShowDiagonalDownBorder(boolean down)
Description copied from interface:DxfCellStyle
Whether show diagonalDown diagonal border- Specified by:
setShowDiagonalDownBorder
in interfaceDxfCellStyle
-
setLeftBorderColor
public void setLeftBorderColor(org.apache.poi.xssf.usermodel.XSSFColor color)
Set the color to use for the left border as aXSSFColor
value- Overrides:
setLeftBorderColor
in classorg.apache.poi.xssf.usermodel.XSSFCellStyle
- Parameters:
color
- the color to use
-
setTopBorderColor
public void setTopBorderColor(org.apache.poi.xssf.usermodel.XSSFColor color)
Set the color to use for the left border as aXSSFColor
value- Overrides:
setTopBorderColor
in classorg.apache.poi.xssf.usermodel.XSSFCellStyle
- Parameters:
color
- the color to use
-
setRightBorderColor
public void setRightBorderColor(org.apache.poi.xssf.usermodel.XSSFColor color)
Set the color to use for the left border as aXSSFColor
value- Overrides:
setRightBorderColor
in classorg.apache.poi.xssf.usermodel.XSSFCellStyle
- Parameters:
color
- the color to use
-
setBottomBorderColor
public void setBottomBorderColor(org.apache.poi.xssf.usermodel.XSSFColor color)
Set the color to use for the left border as aXSSFColor
value- Overrides:
setBottomBorderColor
in classorg.apache.poi.xssf.usermodel.XSSFCellStyle
- Parameters:
color
- the color to use
-
setHorizontalBorderColor
public void setHorizontalBorderColor(org.apache.poi.xssf.usermodel.XSSFColor color)
Set the color to use for the left border as aXSSFColor
value- Parameters:
color
- the color to use
-
setVerticalBorderColor
public void setVerticalBorderColor(org.apache.poi.xssf.usermodel.XSSFColor color)
Set the color to use for the left border as aXSSFColor
value- Parameters:
color
- the color to use
-
setDiagonalBorderColor
public void setDiagonalBorderColor(org.apache.poi.xssf.usermodel.XSSFColor color)
Set the color to use for the left border as aXSSFColor
value- Parameters:
color
- the color to use
-
getLeftBorderXSSFColor
public org.apache.poi.xssf.usermodel.XSSFColor getLeftBorderXSSFColor()
Get the color to use for the left border- Overrides:
getLeftBorderXSSFColor
in classorg.apache.poi.xssf.usermodel.XSSFCellStyle
- Returns:
- the index of the color definition or
null
if not set - See Also:
IndexedColors
-
getTopBorderXSSFColor
public org.apache.poi.xssf.usermodel.XSSFColor getTopBorderXSSFColor()
Get the color to use for the top border- Overrides:
getTopBorderXSSFColor
in classorg.apache.poi.xssf.usermodel.XSSFCellStyle
- Returns:
- the index of the color definition or
null
if not set - See Also:
IndexedColors
-
getRightBorderXSSFColor
public org.apache.poi.xssf.usermodel.XSSFColor getRightBorderXSSFColor()
Get the color to use for the right border- Overrides:
getRightBorderXSSFColor
in classorg.apache.poi.xssf.usermodel.XSSFCellStyle
- Returns:
- the index of the color definition or
null
if not set - See Also:
IndexedColors
-
getBottomBorderXSSFColor
public org.apache.poi.xssf.usermodel.XSSFColor getBottomBorderXSSFColor()
Get the color to use for the bottom border- Overrides:
getBottomBorderXSSFColor
in classorg.apache.poi.xssf.usermodel.XSSFCellStyle
- Returns:
- the index of the color definition or
null
if not set - See Also:
IndexedColors
-
getHorizontalBorderXSSFColor
public org.apache.poi.xssf.usermodel.XSSFColor getHorizontalBorderXSSFColor()
Get the color to use for the horizontal border- Returns:
- the index of the color definition or
null
if not set - See Also:
IndexedColors
-
getVerticalBorderXSSFColor
public org.apache.poi.xssf.usermodel.XSSFColor getVerticalBorderXSSFColor()
Get the color to use for the vertical border- Returns:
- the index of the color definition or
null
if not set - See Also:
IndexedColors
-
getDiagonalBorderXSSFColor
public org.apache.poi.xssf.usermodel.XSSFColor getDiagonalBorderXSSFColor()
Get the color to use for the diagonal border- Returns:
- the index of the color definition or
null
if not set - See Also:
IndexedColors
-
setFillForegroundColor
public void setFillForegroundColor(org.apache.poi.xssf.usermodel.XSSFColor color)
Set the foreground fill color represented as aXSSFColor
value.
Note: Ensure Foreground color is set prior to background color.- Overrides:
setFillForegroundColor
in classorg.apache.poi.xssf.usermodel.XSSFCellStyle
- Parameters:
color
- the color to use- See Also:
)
-
setFillBackgroundColor
public void setFillBackgroundColor(org.apache.poi.xssf.usermodel.XSSFColor color)
Set the background fill color represented as aXSSFColor
value.For example:
cs.setFillPattern(XSSFCellStyle.FINE_DOTS ); cs.setFillBackgroundXSSFColor(new XSSFColor(java.awt.Color.RED));
optionally a Foreground and background fill can be applied: Note: Ensure Foreground color is set prior to backgroundcs.setFillPattern(XSSFCellStyle.FINE_DOTS ); cs.setFillForegroundColor(new XSSFColor(java.awt.Color.BLUE)); cs.setFillBackgroundColor(new XSSFColor(java.awt.Color.GREEN));
or, for the special case of SOLID_FILL:cs.setFillPattern(XSSFCellStyle.SOLID_FOREGROUND ); cs.setFillForegroundColor(new XSSFColor(java.awt.Color.GREEN));
It is necessary to set the fill style in order for the color to be shown in the cell.- Overrides:
setFillBackgroundColor
in classorg.apache.poi.xssf.usermodel.XSSFCellStyle
- Parameters:
color
- - the color to use
-
getFillBackgroundXSSFColor
public org.apache.poi.xssf.usermodel.XSSFColor getFillBackgroundXSSFColor()
Get the background fill color.Note - many cells are actually filled with a foreground fill, not a background fill - see
XSSFCellStyle.getFillForegroundColor()
- Overrides:
getFillBackgroundXSSFColor
in classorg.apache.poi.xssf.usermodel.XSSFCellStyle
- Returns:
- XSSFColor - fill color or
null
if not set
-
getFillForegroundXSSFColor
public org.apache.poi.xssf.usermodel.XSSFColor getFillForegroundXSSFColor()
Get the foreground fill color.Note - many cells are actually filled with a foreground fill, not a background fill - see
XSSFCellStyle.getFillForegroundColor()
- Overrides:
getFillForegroundXSSFColor
in classorg.apache.poi.xssf.usermodel.XSSFCellStyle
- Returns:
- XSSFColor - fill color or
null
if not set
-
getFontIndexAsInt
public int getFontIndexAsInt()
Description copied from interface:CellStyle
gets the index of the font for this style- Specified by:
getFontIndexAsInt
in interfaceCellStyle
- Overrides:
getFontIndexAsInt
in classorg.apache.poi.xssf.usermodel.XSSFCellStyle
- See Also:
Workbook.getFontAt(int)
-
setBorder
public void setBorder(BorderStyle left, Color leftColor, BorderStyle top, Color topColor, BorderStyle right, Color rightColor, BorderStyle bottom, Color bottomColor, BorderStyle diagonal, Color diagonalColor, BorderStyle horizontal, Color horizontalColor, BorderStyle vertical, Color verticalColor, boolean diaUp, boolean diaDown)
-
getDxfIndex
public int getDxfIndex()
-
-