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
| Name | Type | Access | Description |
|---|---|---|---|
leftPadding | double | Read/Write | Returns or sets the amount of space (in points) to add to the left of the contents of cell. |
rightPadding | double | Read/Write | Returns or sets the amount of space (in points) to add to the right of the contents of cell. |
topPadding | double | Read/Write | Returns or sets the amount of space (in points) to add above the contents of cell. |
bottomPadding | double | Read/Write | Returns or sets the amount of space (in points) to add below the contents of cell. |
borders | BorderCollection | Read | Gets collection of borders of the cell. |
shading | Shading | Read | Returns a Shading object that refers to the shading formatting for the cell. |
verticalAlignment | int | Read/Write | Returns or sets the vertical alignment of text in the cell. |
hideMark | boolean | Read/Write | Returns or sets visibility of cell mark. |
width | double | Read/Write | Gets the width of the cell in points. |
preferredWidth | PreferredWidth | Read/Write | Returns or sets the preferred width of the cell. |
verticalMerge | int | Read/Write | Specifies how the cell is merged with other cells vertically. |
horizontalMerge | int | Read/Write | Specifies how the cell is merged horizontally with other cells in the row. |
orientation | int | Read/Write | Returns or sets the orientation of text in a table cell. |
fitText | boolean | Read/Write | If true, fits text in the cell, compressing each paragraph to the width of the cell. |
wrapText | boolean | Read/Write | If true, wrap text for the cell. |
Methods
| Signature | Description |
|---|---|
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() → double | Returns 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() → double | Returns 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() → double | Returns or sets the amount of space (in points) to add above the contents of cell. |
setTopPadding(value: double) | Sets the top padding value. |
getBottomPadding() → double | Returns or sets the amount of space (in points) to add below the contents of cell. |
setBottomPadding(value: double) | Sets the bottom padding value. |
getBorders() → BorderCollection | Gets collection of borders of the cell. |
getShading() → Shading | Returns a Shading object that refers to the shading formatting for the cell. |
getVerticalAlignment() → int | Returns or sets the vertical alignment of text in the cell. |
setVerticalAlignment(value: int) | Sets the vertical alignment value. |
getHideMark() → boolean | Returns or sets visibility of cell mark. |
setHideMark(value: boolean) | Sets the hide mark value. |
getWidth() → double | Gets the width of the cell in points. |
setWidth(value: double) | Sets the width value. |
getPreferredWidth() → PreferredWidth | Returns or sets the preferred width of the cell. |
setPreferredWidth(value: PreferredWidth) | Sets the preferred width value. |
getVerticalMerge() → int | Specifies how the cell is merged with other cells vertically. |
setVerticalMerge(value: int) | Sets the vertical merge value. |
getHorizontalMerge() → int | Specifies how the cell is merged horizontally with other cells in the row. |
setHorizontalMerge(value: int) | Sets the horizontal merge value. |
getOrientation() → int | Returns or sets the orientation of text in a table cell. |
setOrientation(value: int) | Sets the orientation value. |
getFitText() → boolean | If true, fits text in the cell, compressing each paragraph to the width of the cell. |
setFitText(value: boolean) | Sets the fit text value. |
getWrapText() → boolean | If true, wrap text for the cell. |
setWrapText(value: boolean) | Sets the wrap text value. |