public class XSSFDxfCellStyle extends Object implements DxfCellStyle
ALIGN_CENTER, ALIGN_CENTER_SELECTION, ALIGN_FILL, ALIGN_GENERAL, ALIGN_JUSTIFY, ALIGN_LEFT, ALIGN_RIGHT, ALT_BARS, BIG_SPOTS, BORDER_DASH_DOT, BORDER_DASH_DOT_DOT, BORDER_DASHED, BORDER_DOTTED, BORDER_DOUBLE, BORDER_HAIR, BORDER_MEDIUM, BORDER_MEDIUM_DASH_DOT, BORDER_MEDIUM_DASH_DOT_DOT, BORDER_MEDIUM_DASHED, BORDER_NONE, BORDER_SLANTED_DASH_DOT, BORDER_THICK, BORDER_THIN, BRICKS, DIAMONDS, FINE_DOTS, LEAST_DOTS, LESS_DOTS, NO_FILL, SOLID_FOREGROUND, SPARSE_DOTS, SQUARES, THICK_BACKWARD_DIAG, THICK_FORWARD_DIAG, THICK_HORZ_BANDS, THICK_VERT_BANDS, THIN_BACKWARD_DIAG, THIN_FORWARD_DIAG, THIN_HORZ_BANDS, THIN_VERT_BANDS, VERTICAL_BOTTOM, VERTICAL_CENTER, VERTICAL_JUSTIFY, VERTICAL_TOP
Constructor and Description |
---|
XSSFDxfCellStyle(int dxfId,
StylesTable stylesSource,
ThemesTable theme) |
XSSFDxfCellStyle(StylesTable stylesSource)
Creates an empty Cell Style
|
XSSFDxfCellStyle(StylesTable stylesSource,
ThemesTable theme)
Creates an empty Cell Style with theme
|
Modifier and Type | Method and Description |
---|---|
void |
cloneStyleFrom(CellStyle source)
Clones all the style information from another
CellStyle, onto this one.
|
short |
getAlignment()
get the type of horizontal alignment for the cell
|
protected HorizontalAlignment |
getAlignmentEnum() |
short |
getBorderBottom()
get the type of border to use for the bottom border of the cell
|
short |
getBorderDiagonal()
get the type of border to use for the diagonal border of the cell
|
short |
getBorderHorizontal()
get the type of border to use for the horizontal border of the cell
|
short |
getBorderLeft()
get the type of border to use for the left border of the cell
|
short |
getBorderRight()
get the type of border to use for the right border of the cell
|
short |
getBorderTop()
get the type of border to use for the top border of the cell
|
short |
getBorderVertical()
get the type of border to use for the vertical border of the cell
|
short |
getBottomBorderColor()
get the color to use for the left border
|
Color |
getBottomBorderColorColor() |
XSSFColor |
getBottomBorderXSSFColor()
Get the color to use for the bottom border
|
protected XSSFCellAlignment |
getCellAlignment()
get the cellAlignment object to use for manage alignment
|
short |
getDataFormat()
get the index of the format
|
String |
getDataFormatString()
Get the format string
|
short |
getDiagonalBorderColor()
get the color to use for the diagonal border
|
Color |
getDiagonalBorderColorColor() |
XSSFColor |
getDiagonalBorderXSSFColor()
Get the color to use for the diagonal border
|
org.openxmlformats.schemas.spreadsheetml.x2006.main.CTDxf |
getDxf() |
short |
getFillBackgroundColor()
get the background fill color, if the fill
is defined with an indexed color.
|
Color |
getFillBackgroundColorColor()
Gets the color object representing the current
background fill, resolving indexes using
the supplied workbook.
|
XSSFColor |
getFillBackgroundXSSFColor()
Get the background fill color.
|
short |
getFillForegroundColor()
get the foreground fill color, if the fill
is defined with an indexed color.
|
Color |
getFillForegroundColorColor()
Gets the color object representing the current
foreground fill, resolving indexes using
the supplied workbook.
|
XSSFColor |
getFillForegroundXSSFColor()
Get the foreground fill color.
|
short |
getFillPattern()
get the fill pattern (??) - set to 1 to fill with foreground color
|
Font |
getFont()
Returns the embedded font in this DxfCellStyle; could be null.
|
short |
getFontIndex()
gets the index of the font for this style
|
boolean |
getHidden()
get whether the cell's using this style are to be hidden
|
short |
getHorizontalBorderColor()
get the color to use for the horizontal border
|
Color |
getHorizontalBorderColorColor() |
XSSFColor |
getHorizontalBorderXSSFColor()
Get the color to use for the horizontal border
|
short |
getIndention()
get the number of spaces to indent the text in the cell
|
int |
getIndex()
get the index within the Workbook (sequence within the collection of ExtnededFormat objects)
Note since 3.9.9 we have changed the return value type from short to int because the limit of
distinct cell styles in Excel 2007 and beyond is 64000 while that of Excel 97-2003 is 4000
only; have to extend it to accommodate the capacity.
|
short |
getLeftBorderColor()
get the color to use for the left border
|
Color |
getLeftBorderColorColor() |
XSSFColor |
getLeftBorderXSSFColor()
Get the color to use for the left border
|
boolean |
getLocked()
get whether the cell's using this style are to be locked
|
XSSFFont |
getOrCreateFont()
Gets or create the font for this style
|
short |
getRawBorderBottom()
Returns the embedded border line style in this DxfCellStyle; could be -1.
|
Color |
getRawBorderBottomColor()
Returns the embedded border line color in this DxfCellStyle; could be null.
|
short |
getRawBorderDiagonal()
Returns the embedded border line style in this DxfCellStyle; could be -1.
|
Color |
getRawBorderDiagonalColor()
Returns the embedded border line color in this DxfCellStyle; could be null.
|
short |
getRawBorderHorizontal()
Returns the embedded border line style in this DxfCellStyle; could be -1.
|
Color |
getRawBorderHorizontalColor()
Returns the embedded border line color in this DxfCellStyle; could be null.
|
short |
getRawBorderLeft()
Returns the embedded border line style in this DxfCellStyle; could be -1.
|
Color |
getRawBorderLeftColor()
Returns the embedded border line color in this DxfCellStyle; could be null.
|
short |
getRawBorderRight()
Returns the embedded border line style in this DxfCellStyle; could be -1.
|
Color |
getRawBorderRightColor()
Returns the embedded border line color in this DxfCellStyle; could be null.
|
short |
getRawBorderTop()
Returns the embedded border line style in this DxfCellStyle; could be -1.
|
Color |
getRawBorderTopColor()
Returns the embedded border line color in this DxfCellStyle; could be null.
|
short |
getRawBorderVertical()
Returns the embedded border line style in this DxfCellStyle; could be -1.
|
Color |
getRawBorderVerticalColor()
Returns the embedded border line color in this DxfCellStyle; could be null.
|
String |
getRawDataFormatString()
Get the raw data format string that are not transfered by ZSS Context Locale
|
Color |
getRawFillBackgroundColor()
Returns the embedded fill background color in this DxfCellStyle; could be null.
|
Color |
getRawFillForegroundColor()
Returns the embedded fill forground color in this DxfCellStyle; could be null.
|
short |
getRawFillPattern()
Returns the embedded fill pattern in this DxfCellStyle; could be -1.
|
short |
getRightBorderColor()
get the color to use for the left border
|
Color |
getRightBorderColorColor() |
XSSFColor |
getRightBorderXSSFColor()
Get the color to use for the right border
|
short |
getRotation()
get the degree of rotation for the text in the cell
|
short |
getTopBorderColor()
get the color to use for the top border
|
Color |
getTopBorderColorColor() |
XSSFColor |
getTopBorderXSSFColor()
Get the color to use for the top border
|
short |
getVerticalAlignment()
get the type of vertical alignment for the cell
|
VerticalAlignment |
getVerticalAlignmentEnum() |
short |
getVerticalBorderColor()
get the color to use for the vertical border
|
Color |
getVerticalBorderColorColor() |
XSSFColor |
getVerticalBorderXSSFColor()
Get the color to use for the vertical border
|
boolean |
getWrapText()
get whether the text should be wrapped
|
boolean |
isBuiltinDataFormat()
Check if the data format is build in format
|
boolean |
isOverrideBorder()
Whether the border embeed in this DxfCellStyle.
|
boolean |
isShowDiagonalDownBorder()
Whether show diagonalDown diagonal border
|
boolean |
isShowDiagonalUpBorder()
Whether show diagonalUp diagonal border
|
void |
setAlignment(short align)
set the type of horizontal alignment for the cell
|
void |
setBorder(short left,
Color leftColor,
short top,
Color topColor,
short right,
Color rightColor,
short bottom,
Color bottomColor) |
void |
setBorder(short left,
Color leftColor,
short top,
Color topColor,
short right,
Color rightColor,
short bottom,
Color bottomColor,
short diagonal,
Color diagonalColor,
short horizontal,
Color horizontalColor,
short vertical,
Color verticalColor,
boolean diaUp,
boolean diaDown) |
void |
setBorderBottom(short border)
set the type of border to use for the bottom border of the cell
|
void |
setBorderDiagonal(short border)
set the type of border to use for the diagonal border of the cell
|
void |
setBorderHorizontal(short border)
set the type of border to use for the horizontal border of the cell
|
void |
setBorderLeft(short border)
set the type of border to use for the left border of the cell
|
void |
setBorderRight(short border)
set the type of border to use for the right border of the cell
|
void |
setBorderTop(short border)
set the type of border to use for the top border of the cell
|
void |
setBorderVertical(short border)
set the type of border to use for the horizontal border of the cell
|
void |
setBottomBorderColor(short color)
set the color to use for the bottom border
|
void |
setBottomBorderColor(XSSFColor color)
Set the color to use for the left border as a
XSSFColor value |
void |
setCellAlignment(short hAlign,
short vAlign,
boolean wrapText)
Deprecated.
|
void |
setCellAlignment(short hAlign,
short vAlign,
boolean wrapText,
short rotation) |
void |
setDataFormat(short fmt)
set the data format (must be a valid format)
|
void |
setDiagonalBorderColor(short color)
set the color to use for the diagonal border
|
void |
setDiagonalBorderColor(XSSFColor color)
Set the color to use for the left border as a
XSSFColor value |
void |
setFill(Color fillColor,
Color backColor,
short patternType) |
void |
setFillBackgroundColor(short bg)
set the background fill color.
|
void |
setFillBackgroundColor(XSSFColor color)
Set the background fill color represented as a
XSSFColor value. |
void |
setFillForegroundColor(short bg)
set the foreground fill color
Note: Ensure Foreground color is set prior to background color.
|
void |
setFillForegroundColor(XSSFColor color)
Set the foreground fill color represented as a
XSSFColor value. |
void |
setFillPattern(short fp)
setting to one fills the cell with the foreground color...
|
void |
setFont(Font font)
set the font for this style
|
void |
setFontColorColor(Color fontColor) |
void |
setHidden(boolean hidden)
set the cell's using this style to be hidden
|
void |
setHorizontalBorderColor(short color)
set the color to use for the horizontal border
|
void |
setHorizontalBorderColor(XSSFColor color)
Set the color to use for the left border as a
XSSFColor value |
void |
setIndention(short indent)
set the number of spaces to indent the text in the cell
|
void |
setIndex(int dxfId) |
void |
setLeftBorderColor(short color)
set the color to use for the left border
|
void |
setLeftBorderColor(XSSFColor color)
Set the color to use for the left border as a
XSSFColor value |
void |
setLocked(boolean locked)
set the cell's using this style to be locked
|
void |
setProtection(boolean locked,
boolean hidden) |
void |
setRightBorderColor(short color)
set the color to use for the right border
|
void |
setRightBorderColor(XSSFColor color)
Set the color to use for the left border as a
XSSFColor value |
void |
setRotation(short rotation)
set the degree of rotation for the text in the cell
|
void |
setShowDiagonalDownBorder(boolean down)
Whether show diagonalDown diagonal border
|
void |
setShowDiagonalUpBorder(boolean up)
Whether show diagonalUp diagonal border
|
void |
setTopBorderColor(short color)
set the color to use for the top border
|
void |
setTopBorderColor(XSSFColor color)
Set the color to use for the left border as a
XSSFColor value |
void |
setVerticalAlignment(short align)
set the type of vertical alignment for the cell
|
void |
setVerticalBorderColor(short color)
set the color to use for the vertical border
|
void |
setVerticalBorderColor(XSSFColor color)
Set the color to use for the left border as a
XSSFColor value |
void |
setWrapText(boolean wrapped)
Set whether the text should be wrapped.
|
public XSSFDxfCellStyle(int dxfId, StylesTable stylesSource, ThemesTable theme)
public XSSFDxfCellStyle(StylesTable stylesSource, ThemesTable theme)
public XSSFDxfCellStyle(StylesTable stylesSource)
public void setIndex(int dxfId)
public org.openxmlformats.schemas.spreadsheetml.x2006.main.CTDxf getDxf()
public int getIndex()
CellStyle
public void setDataFormat(short fmt)
CellStyle
setDataFormat
in interface CellStyle
DataFormat
public short getDataFormat()
CellStyle
getDataFormat
in interface CellStyle
DataFormat
public String getDataFormatString()
CellStyle
getDataFormatString
in interface CellStyle
public String getRawDataFormatString()
CellStyle
getRawDataFormatString
in interface CellStyle
public boolean isBuiltinDataFormat()
CellStyle
isBuiltinDataFormat
in interface CellStyle
public void setFont(Font font)
CellStyle
setFont
in interface CellStyle
font
- a font object created or retreived from the Workbook objectWorkbook.createFont()
,
Workbook.getFontAt(short)
public XSSFFont getOrCreateFont()
public short getFontIndex()
CellStyle
getFontIndex
in interface CellStyle
Workbook.getFontAt(short)
public void setHidden(boolean hidden)
CellStyle
public boolean getHidden()
CellStyle
public void setLocked(boolean locked)
CellStyle
public boolean getLocked()
CellStyle
public void setAlignment(short align)
CellStyle
setAlignment
in interface CellStyle
align
- - the type of alignmentCellStyle.ALIGN_GENERAL
,
CellStyle.ALIGN_LEFT
,
CellStyle.ALIGN_CENTER
,
CellStyle.ALIGN_RIGHT
,
CellStyle.ALIGN_FILL
,
CellStyle.ALIGN_JUSTIFY
,
CellStyle.ALIGN_CENTER_SELECTION
public short getAlignment()
CellStyle
getAlignment
in interface CellStyle
CellStyle.ALIGN_GENERAL
,
CellStyle.ALIGN_LEFT
,
CellStyle.ALIGN_CENTER
,
CellStyle.ALIGN_RIGHT
,
CellStyle.ALIGN_FILL
,
CellStyle.ALIGN_JUSTIFY
,
CellStyle.ALIGN_CENTER_SELECTION
public void setWrapText(boolean wrapped)
CellStyle
true
make all content visible
whithin a cell by displaying it on multiple linessetWrapText
in interface CellStyle
wrapped
- wrap text or notpublic boolean getWrapText()
CellStyle
getWrapText
in interface CellStyle
public void setVerticalAlignment(short align)
CellStyle
setVerticalAlignment
in interface CellStyle
align
- the type of alignmentCellStyle.VERTICAL_TOP
,
CellStyle.VERTICAL_CENTER
,
CellStyle.VERTICAL_BOTTOM
,
CellStyle.VERTICAL_JUSTIFY
public short getVerticalAlignment()
CellStyle
getVerticalAlignment
in interface CellStyle
CellStyle.VERTICAL_TOP
,
CellStyle.VERTICAL_CENTER
,
CellStyle.VERTICAL_BOTTOM
,
CellStyle.VERTICAL_JUSTIFY
public void setRotation(short rotation)
CellStyle
setRotation
in interface CellStyle
rotation
- degrees (between -90 and 90 degrees)public short getRotation()
CellStyle
getRotation
in interface CellStyle
public void setIndention(short indent)
CellStyle
setIndention
in interface CellStyle
indent
- - number of spacespublic short getIndention()
CellStyle
getIndention
in interface CellStyle
public void setBorderLeft(short border)
CellStyle
setBorderLeft
in interface CellStyle
border
- typeCellStyle.BORDER_NONE
,
CellStyle.BORDER_THIN
,
CellStyle.BORDER_MEDIUM
,
CellStyle.BORDER_DASHED
,
CellStyle.BORDER_DOTTED
,
CellStyle.BORDER_THICK
,
CellStyle.BORDER_DOUBLE
,
CellStyle.BORDER_HAIR
,
CellStyle.BORDER_MEDIUM_DASHED
,
CellStyle.BORDER_DASH_DOT
,
CellStyle.BORDER_MEDIUM_DASH_DOT
,
CellStyle.BORDER_DASH_DOT_DOT
,
CellStyle.BORDER_MEDIUM_DASH_DOT_DOT
,
CellStyle.BORDER_SLANTED_DASH_DOT
public short getBorderLeft()
CellStyle
getBorderLeft
in interface CellStyle
CellStyle.BORDER_NONE
,
CellStyle.BORDER_THIN
,
CellStyle.BORDER_MEDIUM
,
CellStyle.BORDER_DASHED
,
CellStyle.BORDER_DOTTED
,
CellStyle.BORDER_THICK
,
CellStyle.BORDER_DOUBLE
,
CellStyle.BORDER_HAIR
,
CellStyle.BORDER_MEDIUM_DASHED
,
CellStyle.BORDER_DASH_DOT
,
CellStyle.BORDER_MEDIUM_DASH_DOT
,
CellStyle.BORDER_DASH_DOT_DOT
,
CellStyle.BORDER_MEDIUM_DASH_DOT_DOT
,
CellStyle.BORDER_SLANTED_DASH_DOT
public void setBorderRight(short border)
CellStyle
setBorderRight
in interface CellStyle
border
- typeCellStyle.BORDER_NONE
,
CellStyle.BORDER_THIN
,
CellStyle.BORDER_MEDIUM
,
CellStyle.BORDER_DASHED
,
CellStyle.BORDER_DOTTED
,
CellStyle.BORDER_THICK
,
CellStyle.BORDER_DOUBLE
,
CellStyle.BORDER_HAIR
,
CellStyle.BORDER_MEDIUM_DASHED
,
CellStyle.BORDER_DASH_DOT
,
CellStyle.BORDER_MEDIUM_DASH_DOT
,
CellStyle.BORDER_DASH_DOT_DOT
,
CellStyle.BORDER_MEDIUM_DASH_DOT_DOT
,
CellStyle.BORDER_SLANTED_DASH_DOT
public short getBorderRight()
CellStyle
getBorderRight
in interface CellStyle
CellStyle.BORDER_NONE
,
CellStyle.BORDER_THIN
,
CellStyle.BORDER_MEDIUM
,
CellStyle.BORDER_DASHED
,
CellStyle.BORDER_DOTTED
,
CellStyle.BORDER_THICK
,
CellStyle.BORDER_DOUBLE
,
CellStyle.BORDER_HAIR
,
CellStyle.BORDER_MEDIUM_DASHED
,
CellStyle.BORDER_DASH_DOT
,
CellStyle.BORDER_MEDIUM_DASH_DOT
,
CellStyle.BORDER_DASH_DOT_DOT
,
CellStyle.BORDER_MEDIUM_DASH_DOT_DOT
,
CellStyle.BORDER_SLANTED_DASH_DOT
public void setBorderTop(short border)
CellStyle
setBorderTop
in interface CellStyle
border
- typeCellStyle.BORDER_NONE
,
CellStyle.BORDER_THIN
,
CellStyle.BORDER_MEDIUM
,
CellStyle.BORDER_DASHED
,
CellStyle.BORDER_DOTTED
,
CellStyle.BORDER_THICK
,
CellStyle.BORDER_DOUBLE
,
CellStyle.BORDER_HAIR
,
CellStyle.BORDER_MEDIUM_DASHED
,
CellStyle.BORDER_DASH_DOT
,
CellStyle.BORDER_MEDIUM_DASH_DOT
,
CellStyle.BORDER_DASH_DOT_DOT
,
CellStyle.BORDER_MEDIUM_DASH_DOT_DOT
,
CellStyle.BORDER_SLANTED_DASH_DOT
public short getBorderTop()
CellStyle
getBorderTop
in interface CellStyle
CellStyle.BORDER_NONE
,
CellStyle.BORDER_THIN
,
CellStyle.BORDER_MEDIUM
,
CellStyle.BORDER_DASHED
,
CellStyle.BORDER_DOTTED
,
CellStyle.BORDER_THICK
,
CellStyle.BORDER_DOUBLE
,
CellStyle.BORDER_HAIR
,
CellStyle.BORDER_MEDIUM_DASHED
,
CellStyle.BORDER_DASH_DOT
,
CellStyle.BORDER_MEDIUM_DASH_DOT
,
CellStyle.BORDER_DASH_DOT_DOT
,
CellStyle.BORDER_MEDIUM_DASH_DOT_DOT
,
CellStyle.BORDER_SLANTED_DASH_DOT
public void setBorderBottom(short border)
CellStyle
setBorderBottom
in interface CellStyle
border
- typeCellStyle.BORDER_NONE
,
CellStyle.BORDER_THIN
,
CellStyle.BORDER_MEDIUM
,
CellStyle.BORDER_DASHED
,
CellStyle.BORDER_DOTTED
,
CellStyle.BORDER_THICK
,
CellStyle.BORDER_DOUBLE
,
CellStyle.BORDER_HAIR
,
CellStyle.BORDER_MEDIUM_DASHED
,
CellStyle.BORDER_DASH_DOT
,
CellStyle.BORDER_MEDIUM_DASH_DOT
,
CellStyle.BORDER_DASH_DOT_DOT
,
CellStyle.BORDER_MEDIUM_DASH_DOT_DOT
,
CellStyle.BORDER_SLANTED_DASH_DOT
public short getBorderBottom()
CellStyle
getBorderBottom
in interface CellStyle
CellStyle.BORDER_NONE
,
CellStyle.BORDER_THIN
,
CellStyle.BORDER_MEDIUM
,
CellStyle.BORDER_DASHED
,
CellStyle.BORDER_DOTTED
,
CellStyle.BORDER_THICK
,
CellStyle.BORDER_DOUBLE
,
CellStyle.BORDER_HAIR
,
CellStyle.BORDER_MEDIUM_DASHED
,
CellStyle.BORDER_DASH_DOT
,
CellStyle.BORDER_MEDIUM_DASH_DOT
,
CellStyle.BORDER_DASH_DOT_DOT
,
CellStyle.BORDER_MEDIUM_DASH_DOT_DOT
,
CellStyle.BORDER_SLANTED_DASH_DOT
public void setLeftBorderColor(short color)
CellStyle
setLeftBorderColor
in interface CellStyle
color
- The index of the color definitionpublic short getLeftBorderColor()
CellStyle
getLeftBorderColor
in interface CellStyle
public void setRightBorderColor(short color)
CellStyle
setRightBorderColor
in interface CellStyle
color
- The index of the color definitionpublic short getRightBorderColor()
CellStyle
getRightBorderColor
in interface CellStyle
public void setTopBorderColor(short color)
CellStyle
setTopBorderColor
in interface CellStyle
color
- The index of the color definitionpublic short getTopBorderColor()
CellStyle
getTopBorderColor
in interface CellStyle
public void setBottomBorderColor(short color)
CellStyle
setBottomBorderColor
in interface CellStyle
color
- The index of the color definitionpublic short getBottomBorderColor()
CellStyle
getBottomBorderColor
in interface CellStyle
public void setFillPattern(short fp)
CellStyle
setFillPattern
in interface CellStyle
fp
- fill pattern (set to 1 to fill w/foreground color)CellStyle.NO_FILL
,
CellStyle.SOLID_FOREGROUND
,
CellStyle.FINE_DOTS
,
CellStyle.ALT_BARS
,
CellStyle.SPARSE_DOTS
,
CellStyle.THICK_HORZ_BANDS
,
CellStyle.THICK_VERT_BANDS
,
CellStyle.THICK_BACKWARD_DIAG
,
CellStyle.THICK_FORWARD_DIAG
,
CellStyle.BIG_SPOTS
,
CellStyle.BRICKS
,
CellStyle.THIN_HORZ_BANDS
,
CellStyle.THIN_VERT_BANDS
,
CellStyle.THIN_BACKWARD_DIAG
,
CellStyle.THIN_FORWARD_DIAG
,
CellStyle.SQUARES
,
CellStyle.DIAMONDS
public short getFillPattern()
CellStyle
getFillPattern
in interface CellStyle
public void setFillBackgroundColor(short bg)
CellStyle
setFillBackgroundColor
in interface CellStyle
bg
- colorpublic short getFillBackgroundColor()
CellStyle
getFillBackgroundColor
in interface CellStyle
public Color getFillBackgroundColorColor()
CellStyle
getFillBackgroundColorColor
in interface CellStyle
public void setFillForegroundColor(short bg)
CellStyle
setFillForegroundColor
in interface CellStyle
bg
- colorpublic short getFillForegroundColor()
CellStyle
getFillForegroundColor
in interface CellStyle
public Color getFillForegroundColorColor()
CellStyle
getFillForegroundColorColor
in interface CellStyle
public void cloneStyleFrom(CellStyle source)
CellStyle
cloneStyleFrom
in interface CellStyle
public Color getTopBorderColorColor()
getTopBorderColorColor
in interface CellStyle
public Color getBottomBorderColorColor()
getBottomBorderColorColor
in interface CellStyle
public Color getRightBorderColorColor()
getRightBorderColorColor
in interface CellStyle
public Color getLeftBorderColorColor()
getLeftBorderColorColor
in interface CellStyle
public void setFontColorColor(Color fontColor)
setFontColorColor
in interface CellStyle
public void setBorder(short left, Color leftColor, short top, Color topColor, short right, Color rightColor, short bottom, Color bottomColor)
@Deprecated public void setCellAlignment(short hAlign, short vAlign, boolean wrapText)
setCellAlignment
in interface CellStyle
public void setCellAlignment(short hAlign, short vAlign, boolean wrapText, short rotation)
setCellAlignment
in interface CellStyle
public void setProtection(boolean locked, boolean hidden)
setProtection
in interface CellStyle
protected XSSFCellAlignment getCellAlignment()
protected HorizontalAlignment getAlignmentEnum()
public VerticalAlignment getVerticalAlignmentEnum()
public void setBorderHorizontal(short border)
DxfCellStyle
setBorderHorizontal
in interface DxfCellStyle
border
- typeCellStyle.BORDER_NONE
,
CellStyle.BORDER_THIN
,
CellStyle.BORDER_MEDIUM
,
CellStyle.BORDER_DASHED
,
CellStyle.BORDER_DOTTED
,
CellStyle.BORDER_THICK
,
CellStyle.BORDER_DOUBLE
,
CellStyle.BORDER_HAIR
,
CellStyle.BORDER_MEDIUM_DASHED
,
CellStyle.BORDER_DASH_DOT
,
CellStyle.BORDER_MEDIUM_DASH_DOT
,
CellStyle.BORDER_DASH_DOT_DOT
,
CellStyle.BORDER_MEDIUM_DASH_DOT_DOT
,
CellStyle.BORDER_SLANTED_DASH_DOT
public short getBorderHorizontal()
DxfCellStyle
getBorderHorizontal
in interface DxfCellStyle
CellStyle.BORDER_NONE
,
CellStyle.BORDER_THIN
,
CellStyle.BORDER_MEDIUM
,
CellStyle.BORDER_DASHED
,
CellStyle.BORDER_DOTTED
,
CellStyle.BORDER_THICK
,
CellStyle.BORDER_DOUBLE
,
CellStyle.BORDER_HAIR
,
CellStyle.BORDER_MEDIUM_DASHED
,
CellStyle.BORDER_DASH_DOT
,
CellStyle.BORDER_MEDIUM_DASH_DOT
,
CellStyle.BORDER_DASH_DOT_DOT
,
CellStyle.BORDER_MEDIUM_DASH_DOT_DOT
,
CellStyle.BORDER_SLANTED_DASH_DOT
public Color getHorizontalBorderColorColor()
getHorizontalBorderColorColor
in interface DxfCellStyle
public void setHorizontalBorderColor(short color)
DxfCellStyle
setHorizontalBorderColor
in interface DxfCellStyle
color
- The index of the color definitionpublic short getHorizontalBorderColor()
DxfCellStyle
getHorizontalBorderColor
in interface DxfCellStyle
public void setBorderVertical(short border)
DxfCellStyle
setBorderVertical
in interface DxfCellStyle
border
- typeCellStyle.BORDER_NONE
,
CellStyle.BORDER_THIN
,
CellStyle.BORDER_MEDIUM
,
CellStyle.BORDER_DASHED
,
CellStyle.BORDER_DOTTED
,
CellStyle.BORDER_THICK
,
CellStyle.BORDER_DOUBLE
,
CellStyle.BORDER_HAIR
,
CellStyle.BORDER_MEDIUM_DASHED
,
CellStyle.BORDER_DASH_DOT
,
CellStyle.BORDER_MEDIUM_DASH_DOT
,
CellStyle.BORDER_DASH_DOT_DOT
,
CellStyle.BORDER_MEDIUM_DASH_DOT_DOT
,
CellStyle.BORDER_SLANTED_DASH_DOT
public short getBorderVertical()
DxfCellStyle
getBorderVertical
in interface DxfCellStyle
CellStyle.BORDER_NONE
,
CellStyle.BORDER_THIN
,
CellStyle.BORDER_MEDIUM
,
CellStyle.BORDER_DASHED
,
CellStyle.BORDER_DOTTED
,
CellStyle.BORDER_THICK
,
CellStyle.BORDER_DOUBLE
,
CellStyle.BORDER_HAIR
,
CellStyle.BORDER_MEDIUM_DASHED
,
CellStyle.BORDER_DASH_DOT
,
CellStyle.BORDER_MEDIUM_DASH_DOT
,
CellStyle.BORDER_DASH_DOT_DOT
,
CellStyle.BORDER_MEDIUM_DASH_DOT_DOT
,
CellStyle.BORDER_SLANTED_DASH_DOT
public Color getVerticalBorderColorColor()
getVerticalBorderColorColor
in interface DxfCellStyle
public void setVerticalBorderColor(short color)
DxfCellStyle
setVerticalBorderColor
in interface DxfCellStyle
color
- The index of the color definitionpublic short getVerticalBorderColor()
DxfCellStyle
getVerticalBorderColor
in interface DxfCellStyle
public void setBorderDiagonal(short border)
CellStyle
setBorderDiagonal
in interface CellStyle
border
- typeCellStyle.BORDER_NONE
,
CellStyle.BORDER_THIN
,
CellStyle.BORDER_MEDIUM
,
CellStyle.BORDER_DASHED
,
CellStyle.BORDER_DOTTED
,
CellStyle.BORDER_THICK
,
CellStyle.BORDER_DOUBLE
,
CellStyle.BORDER_HAIR
,
CellStyle.BORDER_MEDIUM_DASHED
,
CellStyle.BORDER_DASH_DOT
,
CellStyle.BORDER_MEDIUM_DASH_DOT
,
CellStyle.BORDER_DASH_DOT_DOT
,
CellStyle.BORDER_MEDIUM_DASH_DOT_DOT
,
CellStyle.BORDER_SLANTED_DASH_DOT
public short getBorderDiagonal()
CellStyle
getBorderDiagonal
in interface CellStyle
CellStyle.BORDER_NONE
,
CellStyle.BORDER_THIN
,
CellStyle.BORDER_MEDIUM
,
CellStyle.BORDER_DASHED
,
CellStyle.BORDER_DOTTED
,
CellStyle.BORDER_THICK
,
CellStyle.BORDER_DOUBLE
,
CellStyle.BORDER_HAIR
,
CellStyle.BORDER_MEDIUM_DASHED
,
CellStyle.BORDER_DASH_DOT
,
CellStyle.BORDER_MEDIUM_DASH_DOT
,
CellStyle.BORDER_DASH_DOT_DOT
,
CellStyle.BORDER_MEDIUM_DASH_DOT_DOT
,
CellStyle.BORDER_SLANTED_DASH_DOT
public Color getDiagonalBorderColorColor()
getDiagonalBorderColorColor
in interface CellStyle
public void setDiagonalBorderColor(short color)
CellStyle
setDiagonalBorderColor
in interface CellStyle
color
- The index of the color definitionpublic short getDiagonalBorderColor()
CellStyle
getDiagonalBorderColor
in interface CellStyle
public boolean isShowDiagonalUpBorder()
CellStyle
isShowDiagonalUpBorder
in interface CellStyle
public boolean isShowDiagonalDownBorder()
CellStyle
isShowDiagonalDownBorder
in interface CellStyle
public void setShowDiagonalUpBorder(boolean up)
CellStyle
setShowDiagonalUpBorder
in interface CellStyle
public void setShowDiagonalDownBorder(boolean down)
CellStyle
setShowDiagonalDownBorder
in interface CellStyle
public void setLeftBorderColor(XSSFColor color)
XSSFColor
valuecolor
- the color to usepublic void setTopBorderColor(XSSFColor color)
XSSFColor
valuecolor
- the color to usepublic void setRightBorderColor(XSSFColor color)
XSSFColor
valuecolor
- the color to usepublic void setBottomBorderColor(XSSFColor color)
XSSFColor
valuecolor
- the color to usepublic void setHorizontalBorderColor(XSSFColor color)
XSSFColor
valuecolor
- the color to usepublic void setVerticalBorderColor(XSSFColor color)
XSSFColor
valuecolor
- the color to usepublic void setDiagonalBorderColor(XSSFColor color)
XSSFColor
valuecolor
- the color to usepublic XSSFColor getLeftBorderXSSFColor()
null
if not setIndexedColors
public XSSFColor getTopBorderXSSFColor()
null
if not setIndexedColors
public XSSFColor getRightBorderXSSFColor()
null
if not setIndexedColors
public XSSFColor getBottomBorderXSSFColor()
null
if not setIndexedColors
public XSSFColor getHorizontalBorderXSSFColor()
null
if not setIndexedColors
public XSSFColor getVerticalBorderXSSFColor()
null
if not setIndexedColors
public XSSFColor getDiagonalBorderXSSFColor()
null
if not setIndexedColors
public void setFillForegroundColor(XSSFColor color)
XSSFColor
value.
color
- the color to use)
public void setFillBackgroundColor(XSSFColor color)
XSSFColor
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 background
cs.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.
color
- - the color to usepublic XSSFColor getFillBackgroundXSSFColor()
Note - many cells are actually filled with a foreground
fill, not a background fill - see getFillForegroundColor()
null
if not setXSSFColor.getRgb()
public XSSFColor getFillForegroundXSSFColor()
Note - many cells are actually filled with a foreground
fill, not a background fill - see getFillForegroundColor()
null
if not setXSSFColor.getRgb()
public void setBorder(short left, Color leftColor, short top, Color topColor, short right, Color rightColor, short bottom, Color bottomColor, short diagonal, Color diagonalColor, short horizontal, Color horizontalColor, short vertical, Color verticalColor, boolean diaUp, boolean diaDown)
public Font getFont()
DxfCellStyle
getFont
in interface DxfCellStyle
public short getRawFillPattern()
DxfCellStyle
getRawFillPattern
in interface DxfCellStyle
public Color getRawFillForegroundColor()
DxfCellStyle
getRawFillForegroundColor
in interface DxfCellStyle
public Color getRawFillBackgroundColor()
DxfCellStyle
getRawFillBackgroundColor
in interface DxfCellStyle
public short getRawBorderLeft()
DxfCellStyle
getRawBorderLeft
in interface DxfCellStyle
public short getRawBorderTop()
DxfCellStyle
getRawBorderTop
in interface DxfCellStyle
public short getRawBorderRight()
DxfCellStyle
getRawBorderRight
in interface DxfCellStyle
public short getRawBorderBottom()
DxfCellStyle
getRawBorderBottom
in interface DxfCellStyle
public short getRawBorderDiagonal()
DxfCellStyle
getRawBorderDiagonal
in interface DxfCellStyle
public short getRawBorderHorizontal()
DxfCellStyle
getRawBorderHorizontal
in interface DxfCellStyle
public short getRawBorderVertical()
DxfCellStyle
getRawBorderVertical
in interface DxfCellStyle
public Color getRawBorderLeftColor()
DxfCellStyle
getRawBorderLeftColor
in interface DxfCellStyle
public Color getRawBorderTopColor()
DxfCellStyle
getRawBorderTopColor
in interface DxfCellStyle
public Color getRawBorderRightColor()
DxfCellStyle
getRawBorderRightColor
in interface DxfCellStyle
public Color getRawBorderBottomColor()
DxfCellStyle
getRawBorderBottomColor
in interface DxfCellStyle
public Color getRawBorderDiagonalColor()
DxfCellStyle
getRawBorderDiagonalColor
in interface DxfCellStyle
public Color getRawBorderVerticalColor()
DxfCellStyle
getRawBorderVerticalColor
in interface DxfCellStyle
public Color getRawBorderHorizontalColor()
DxfCellStyle
getRawBorderHorizontalColor
in interface DxfCellStyle
public boolean isOverrideBorder()
DxfCellStyle
isOverrideBorder
in interface DxfCellStyle
Copyright © 2020. All rights reserved.