org.apache.poi.hssf.usermodel.HSSFWorkbook#createCellStyle() , org.apache.poi.hssf.usermodel.HSSFWorkbook#getCellStyleAt(int) , org.apache.poi.hssf.usermodel.HSSFCell#setCellStyle(HSSFCellStyle)
| Modifier and Type | Field and Description |
|---|---|
| private final ExtendedFormatRecord | |
| private final short | |
| private final InternalWorkbook | |
| private static final ThreadLocal | |
| private static final ThreadLocal | |
| private static final ThreadLocal |
| Access | Constructor and Description |
|---|---|
| protected | HSSFCellStyle(short index, ExtendedFormatRecord rec, HSSFWorkbook workbook)
Creates new HSSFCellStyle why would you want to do this?? |
| protected | |
| protected |
| Modifier and Type | Method and Description |
|---|---|
| private void | checkDefaultBackgroundFills()
Checks if the background and foreground fills are set correctly when one or the other is set to the default color. |
| public void | cloneStyleFrom(CellStyle source)
Implements org. Clones all the style information from another HSSFCellStyle, onto this one. |
| public void | |
| public HSSFCellStyle | |
| public boolean | equals(Object
the reference object with which to compare. obj)Overrides java. Indicates whether some other object is "equal to" this one. |
| public HorizontalAlignment | getAlignment()
Implements org. get the type of horizontal alignment for the cell |
| public BorderStyle | getBorderBottom()
Implements org. get the type of border to use for the bottom border of the cell |
| public BorderStyle | getBorderLeft()
Implements org. get the type of border to use for the left border of the cell |
| public BorderStyle | getBorderRight()
Implements org. get the type of border to use for the right border of the cell |
| public BorderStyle | getBorderTop()
Implements org. get the type of border to use for the top border of the cell |
| public short | Returns: The index of the color definitionImplements org. get the color to use for the left border |
| public short | getDataFormat()
Implements org. get the index of the format |
| public String | Returns: the format string or "General" if not foundImplements org. Get the contents of the format string, by looking up the DataFormat against the bound workbook |
| public String | Returns: the format string or "General" if not foundGet the contents of the format string, by looking up the DataFormat against the supplied workbook |
| public String | getDataFormatString(InternalWorkbook workbook)
Get the contents of the format string, by looking up the DataFormat against the supplied low level workbook |
| public short | Returns: fill colorImplements org. Get the background fill color. |
| public HSSFColor | getFillBackgroundColorColor()
Implements org. Gets the color object representing the current background fill, resolving indexes using the supplied workbook. |
| public short | Returns: fill colorImplements org. Get the foreground fill color. |
| public HSSFColor | getFillForegroundColorColor()
Implements org. Gets the color object representing the current foreground fill, resolving indexes using the supplied workbook. |
| public FillPatternType | getFillPattern()
Implements org. Get the fill pattern |
| public HSSFFont | |
| public int | getFontIndex()
Implements org. gets the index of the font for this style |
| public int | getFontIndexAsInt()
Implements org.
Deprecated
use
getFontIndex() instead
gets the index of the font for this style |
| public boolean | Returns: hidden - whether the cell using this style should be hiddenImplements org. get whether the cell's using this style are to be hidden |
| public short | Returns: indent - number of spacesImplements org. get the number of spaces to indent the text in the cell |
| public short | Returns: unique index number of the underlying record this style represents (probably you don't care unless you're comparing which one is which)Implements org. get the index within the HSSFWorkbook (sequence within the collection of ExtendedFormat objects) |
| public short | Returns: The index of the color definitionImplements org. get the color to use for the left border |
| public boolean | Returns: hidden - whether the cell using this style should be lockedImplements org. get whether the cell's using this style are to be locked |
| public HSSFCellStyle | |
| public boolean | getQuotePrefixed()
Implements org. Is "Quote Prefix" or "123 Prefix" enabled for the cell? |
| public short | Returns: order - the reading order (0,1,2)Get the reading order, for RTL/LTR ordering of the text. |
| public short | Returns: The index of the color definitionImplements org. get the color to use for the left border |
| public short | Returns: rotation degrees (between -90 and 90 degrees, or 0xff for vertical)Implements org. get the degree of rotation for the text in the cell |
| public boolean | getShrinkToFit()
Implements org. Should the Cell be auto-sized by Excel to shrink it to fit if this text is too long? |
| public short | Returns: The index of the color definitionImplements org. get the color to use for the top border |
| public String | |
| public VerticalAlignment | getVerticalAlignment()
Implements org. get the type of vertical alignment for the cell |
| public boolean | Returns: wrap text or notImplements org. get whether the text should be wrapped |
| public int | |
| public void | setAlignment(HorizontalAlignment
- the type of alignment align)Implements org. set the type of horizontal alignment for the cell |
| public void | setBorderBottom(BorderStyle
type border)Implements org. set the type of border to use for the bottom border of the cell |
| public void | setBorderLeft(BorderStyle
type border)Implements org. set the type of border to use for the left border of the cell |
| public void | setBorderRight(BorderStyle
type border)Implements org. set the type of border to use for the right border of the cell |
| public void | setBorderTop(BorderStyle
type border)Implements org. set the type of border to use for the top border of the cell |
| public void | setBottomBorderColor(short
The index of the color definition color)Implements org. set the color to use for the bottom border |
| public void | setDataFormat(short fmt)
Implements org. set the data format (must be a valid format) |
| public void | setFillBackgroundColor(short
color bg)Implements org. set the background fill color. |
| public void | setFillBackgroundColor(Color
the color to use color)Implements org. Set the background fill color represented as a |
| public void | setFillForegroundColor(short
color bg)Implements org. set the foreground fill color Note Ensure Foreground color is set prior to background color. |
| public void | setFillForegroundColor(Color
the color to use color)Implements org. Set the foreground fill color represented as a |
| public void | setFillPattern(FillPatternType
fill pattern (set to fp)FillPatternType#SOLID_FOREGROUND to fill w/foreground color)Implements org. setting to one fills the cell with the foreground color... |
| public void | setFont(Font
a font object created or retrieved from the HSSFWorkbook object font)Implements org. set the font for this style |
| public void | |
| public void | setHidden(boolean
- whether the cell using this style should be hidden hidden)Implements org. set the cell's using this style to be hidden |
| public void | setIndention(short
- number of spaces indent)Implements org. set the number of spaces to indent the text in the cell |
| public void | setLeftBorderColor(short
The index of the color definition color)Implements org. set the color to use for the left border |
| public void | setLocked(boolean
- whether the cell using this style should be locked locked)Implements org. set the cell's using this style to be locked |
| public void | setQuotePrefixed(boolean quotePrefix)
Implements org. Turn on or off "Quote Prefix" or "123 Prefix" for the style, which is used to tell Excel that the thing which looks like a number or a formula shouldn't be treated as on. |
| public void | setReadingOrder(short
- the reading order (0,1,2) order)Sets the reading order, for RTL/LTR ordering of the text. |
| public void | setRightBorderColor(short
The index of the color definition color)Implements org. set the color to use for the right border |
| public void | setRotation(short
degrees (between -90 and 90 degrees, of 0xff for vertical) rotation)Implements org. 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. |
| public void | setShrinkToFit(boolean shrinkToFit)
Implements org. Controls if the Cell should be auto-sized to shrink to fit if the text is too long |
| public void | setTopBorderColor(short
The index of the color definition color)Implements org. set the color to use for the top border |
| public void | |
| public void | setVerticalAlignment(VerticalAlignment
the type of alignment align)Implements org. set the type of vertical alignment for the cell |
| public void | setWrapText(boolean
wrap text or not wrapped)Implements org. set whether the text should be wrapped |
| public void |