CellFormat

Overview

CellFormat is a class in Aspose.Words FOSS for Java. Inherits from: IBorderAttrSource, IShadingAttrSource.

Represents all formatting for a table cell.

Edition status of its 45 listed members (a property and its accessor methods are listed separately, overloads once): 45 not yet exercised by a verified example.

This class declares 30 methods for CellFormat objects in Java programs. Available methods include: clearFormatting, getBorders, getBottomPadding, getFitText, getHideMark, getHorizontalMerge, getLeftPadding, getOrientation, getPreferredWidth, getRightPadding, getShading, getTopPadding, and 18 additional methods. Public members are accessible to any Java application after installing the Aspose.Words FOSS for Java package. Properties: borders, bottomPadding, fitText, hideMark, horizontalMerge, leftPadding, and 9 more.

Properties

NameTypeAccessDescription
leftPaddingdoubleRead/WriteReturns or sets the amount of space (in points) to add to the left of the contents of cell.
rightPaddingdoubleRead/WriteReturns or sets the amount of space (in points) to add to the right of the contents of cell.
topPaddingdoubleRead/WriteReturns or sets the amount of space (in points) to add above the contents of cell.
bottomPaddingdoubleRead/WriteReturns or sets the amount of space (in points) to add below the contents of cell.
bordersBorderCollectionReadGets collection of borders of the cell.
shadingShadingReadReturns a Shading object that refers to the shading formatting for the cell.
verticalAlignmentintRead/WriteReturns or sets the vertical alignment of text in the cell.
hideMarkbooleanRead/WriteReturns or sets visibility of cell mark.
widthdoubleRead/WriteGets the width of the cell in points.
preferredWidthPreferredWidthRead/WriteReturns or sets the preferred width of the cell.
verticalMergeintRead/WriteSpecifies how the cell is merged with other cells vertically.
horizontalMergeintRead/WriteSpecifies how the cell is merged horizontally with other cells in the row.
orientationintRead/WriteReturns or sets the orientation of text in a table cell.
fitTextbooleanRead/WriteIf true, fits text in the cell, compressing each paragraph to the width of the cell.
wrapTextbooleanRead/WriteIf true, wrap text for the cell.

Methods

SignatureDescription
clearFormatting()Resets to default cell formatting.
setPaddings(leftPadding: double, topPadding: double, rightPadding: double, bottomPadding: double)Sets the amount of space (in points) to add to the left/top/right/bottom of the contents of cell.
getLeftPadding() → doubleReturns or sets the amount of space (in points) to add to the left of the contents of cell.
setLeftPadding(value: double)Sets the left padding value.
getRightPadding() → doubleReturns or sets the amount of space (in points) to add to the right of the contents of cell.
setRightPadding(value: double)Sets the right padding value.
getTopPadding() → doubleReturns or sets the amount of space (in points) to add above the contents of cell.
setTopPadding(value: double)Sets the top padding value.
getBottomPadding() → doubleReturns or sets the amount of space (in points) to add below the contents of cell.
setBottomPadding(value: double)Sets the bottom padding value.
getBorders() → BorderCollectionGets collection of borders of the cell.
getShading() → ShadingReturns a Shading object that refers to the shading formatting for the cell.
getVerticalAlignment() → intReturns or sets the vertical alignment of text in the cell.
setVerticalAlignment(value: int)Sets the vertical alignment value.
getHideMark() → booleanReturns or sets visibility of cell mark.
setHideMark(value: boolean)Sets the hide mark value.
getWidth() → doubleGets the width of the cell in points.
setWidth(value: double)Sets the width value.
getPreferredWidth() → PreferredWidthReturns or sets the preferred width of the cell.
setPreferredWidth(value: PreferredWidth)Sets the preferred width value.
getVerticalMerge() → intSpecifies how the cell is merged with other cells vertically.
setVerticalMerge(value: int)Sets the vertical merge value.
getHorizontalMerge() → intSpecifies how the cell is merged horizontally with other cells in the row.
setHorizontalMerge(value: int)Sets the horizontal merge value.
getOrientation() → intReturns or sets the orientation of text in a table cell.
setOrientation(value: int)Sets the orientation value.
getFitText() → booleanIf true, fits text in the cell, compressing each paragraph to the width of the cell.
setFitText(value: boolean)Sets the fit text value.
getWrapText() → booleanIf true, wrap text for the cell.
setWrapText(value: boolean)Sets the wrap text value.

See Also