Style
Overview
Style is a class in Aspose.Cells FOSS for Java.
Represents the full style of a cell: font, borders, alignment, fill, number format, and protection.
Properties
| Name | Type | Access | Description |
|---|---|---|---|
font | Font | Read | Returns the font. |
borders | Borders | Read | Returns the borders. |
horizontalAlignment | HorizontalAlignmentType | Read | Returns the horizontal alignment. |
verticalAlignment | VerticalAlignmentType | Read | Returns the vertical alignment. |
wrapText | boolean | Read | Indicates whether wrap text. |
indentLevel | int | Read | Returns the indent level. |
textRotation | int | Read | Returns the text rotation. |
shrinkToFit | boolean | Read | Indicates whether shrink to fit. |
readingOrder | int | Read | Returns the reading order. |
relativeIndent | int | Read | Returns the relative indent. |
pattern | FillPattern | Read | Returns the pattern. |
foregroundColor | Color | Read | Returns the foreground color. |
backgroundColor | Color | Read | Returns the background color. |
number | int | Read | Built-in number format index (0 = General). |
custom | String | Read | Custom format string (e.g. |
locked | boolean | Read | Whether the cell is locked when the sheet is protected. |
hidden | boolean | Read | Whether the cell formula is hidden when the sheet is protected. |
Methods
| Signature | Description |
|---|---|
Style() | Creates a default style (Calibri 11pt, no borders, general alignment, locked). |
getFont() → Font | Returns the font. |
setFont(font: Font) | Sets the font. |
getBorders() → Borders | Returns the borders. |
setBorders(borders: Borders) | Sets the borders. |
getHorizontalAlignment() → HorizontalAlignmentType | Returns the horizontal alignment. |
setHorizontalAlignment(value: HorizontalAlignmentType) | Sets the horizontal alignment. |
getVerticalAlignment() → VerticalAlignmentType | Returns the vertical alignment. |
setVerticalAlignment(value: VerticalAlignmentType) | Sets the vertical alignment. |
isWrapText() → boolean | Indicates whether wrap text. |
setWrapText(value: boolean) | Sets the wrap text. |
getIndentLevel() → int | Returns the indent level. |
setIndentLevel(value: int) | Sets the indent level. |
getTextRotation() → int | Returns the text rotation. |
setTextRotation(value: int) | Sets the text rotation. |
isShrinkToFit() → boolean | Indicates whether shrink to fit. |
setShrinkToFit(value: boolean) | Sets the shrink to fit. |
getReadingOrder() → int | Returns the reading order. |
setReadingOrder(value: int) | Sets the reading order. |
getRelativeIndent() → int | Returns the relative indent. |
setRelativeIndent(value: int) | Sets the relative indent. |
getPattern() → FillPattern | Returns the pattern. |
setPattern(value: FillPattern) | Sets the pattern. |
getForegroundColor() → Color | Returns the foreground color. |
setForegroundColor(value: Color) | Sets the foreground color. |
getBackgroundColor() → Color | Returns the background color. |
setBackgroundColor(value: Color) | Sets the background color. |
getNumber() → int | Built-in number format index (0 = General). |
setNumber(value: int) | Sets the number. |
getCustom() → String | Custom format string (e.g. |
setCustom(value: String) | Sets the custom. |
isLocked() → boolean | Whether the cell is locked when the sheet is protected. |
setLocked(value: boolean) | Sets the locked. |
isHidden() → boolean | Whether the cell formula is hidden when the sheet is protected. |
setHidden(value: boolean) | Sets the hidden. |
clone() → Style | Creates a copy of this instance. |