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

NameTypeAccessDescription
fontFontReadReturns the font.
bordersBordersReadReturns the borders.
horizontalAlignmentHorizontalAlignmentTypeReadReturns the horizontal alignment.
verticalAlignmentVerticalAlignmentTypeReadReturns the vertical alignment.
wrapTextbooleanReadIndicates whether wrap text.
indentLevelintReadReturns the indent level.
textRotationintReadReturns the text rotation.
shrinkToFitbooleanReadIndicates whether shrink to fit.
readingOrderintReadReturns the reading order.
relativeIndentintReadReturns the relative indent.
patternFillPatternReadReturns the pattern.
foregroundColorColorReadReturns the foreground color.
backgroundColorColorReadReturns the background color.
numberintReadBuilt-in number format index (0 = General).
customStringReadCustom format string (e.g.
lockedbooleanReadWhether the cell is locked when the sheet is protected.
hiddenbooleanReadWhether the cell formula is hidden when the sheet is protected.

Methods

SignatureDescription
Style()Creates a default style (Calibri 11pt, no borders, general alignment, locked).
getFont()FontReturns the font.
setFont(font: Font)Sets the font.
getBorders()BordersReturns the borders.
setBorders(borders: Borders)Sets the borders.
getHorizontalAlignment()HorizontalAlignmentTypeReturns the horizontal alignment.
setHorizontalAlignment(value: HorizontalAlignmentType)Sets the horizontal alignment.
getVerticalAlignment()VerticalAlignmentTypeReturns the vertical alignment.
setVerticalAlignment(value: VerticalAlignmentType)Sets the vertical alignment.
isWrapText()booleanIndicates whether wrap text.
setWrapText(value: boolean)Sets the wrap text.
getIndentLevel()intReturns the indent level.
setIndentLevel(value: int)Sets the indent level.
getTextRotation()intReturns the text rotation.
setTextRotation(value: int)Sets the text rotation.
isShrinkToFit()booleanIndicates whether shrink to fit.
setShrinkToFit(value: boolean)Sets the shrink to fit.
getReadingOrder()intReturns the reading order.
setReadingOrder(value: int)Sets the reading order.
getRelativeIndent()intReturns the relative indent.
setRelativeIndent(value: int)Sets the relative indent.
getPattern()FillPatternReturns the pattern.
setPattern(value: FillPattern)Sets the pattern.
getForegroundColor()ColorReturns the foreground color.
setForegroundColor(value: Color)Sets the foreground color.
getBackgroundColor()ColorReturns the background color.
setBackgroundColor(value: Color)Sets the background color.
getNumber()intBuilt-in number format index (0 = General).
setNumber(value: int)Sets the number.
getCustom()StringCustom format string (e.g.
setCustom(value: String)Sets the custom.
isLocked()booleanWhether the cell is locked when the sheet is protected.
setLocked(value: boolean)Sets the locked.
isHidden()booleanWhether the cell formula is hidden when the sheet is protected.
setHidden(value: boolean)Sets the hidden.
clone()StyleCreates a copy of this instance.