Cell

Inheritance: java.lang.Object

All Implemented Interfaces: com.aspose.slides.IDOMObject, com.aspose.slides.ICell

public class Cell implements IDOMObject, ICell

Represents a cell of a table.

Methods

MethodDescription
getOffsetX()Returns a distance from left side of a table to left side of a cell.
getOffsetY()Returns a distance from top side of a table to top side of a cell.
getFirstRowIndex()Returns an index of first row, covered by the cell.
getFirstColumnIndex()Returns an index of first column, covered by the cell.
getWidth()Returns the width of the cell.
getHeight()Returns the height of the cell.
getMinimalHeight()Returns the minimum height of a cell.
getMarginLeft()Returns or sets the left margin in a TextFrame.
setMarginLeft(double value)Returns or sets the left margin in a TextFrame.
getMarginRight()Returns or sets the right margin in a TextFrame.
setMarginRight(double value)Returns or sets the right margin in a TextFrame.
getMarginTop()Returns or sets the top margin in a TextFrame.
setMarginTop(double value)Returns or sets the top margin in a TextFrame.
getMarginBottom()Returns or sets the bottom margin in a TextFrame.
setMarginBottom(double value)Returns or sets the bottom margin in a TextFrame.
getTextVerticalType()Returns or sets the type of vertical text.
setTextVerticalType(byte value)Returns or sets the type of vertical text.
getTextAnchorType()Returns or sets the text anchor type.
setTextAnchorType(byte value)Returns or sets the text anchor type.
getAnchorCenter()Determines whether or not text box centered inside a cell.
setAnchorCenter(boolean value)Determines whether or not text box centered inside a cell.
getFirstRow()Gets first row of cell.
getFirstColumn()Gets first column of cell.
getColSpan()Returns the number of grid columns in the parent table’s table grid which shall be spanned by the current cell.
getRowSpan()Returns the number of rows that a merged cell spans.
getTextFrame()Returns the text frame of a cell.
getTable()Returns the parent Table object for a cell.
isMergedCell()Returns true if the cell is merged with any adjusted cell, false otherwise.
getCellFormat()Returns the CellFormat object that contains formatting properties for this cell.
splitByColSpan(int index)Splits the cell to two cells by index of column.
splitByRowSpan(int index)Splits the cell to two cells by index of row.
splitByHeight(double height)Splits the cell by height.
splitByWidth(double width)Splits the cell by width.
getSlide()Returns the parent slide of a cell.
getPresentation()Returns the parent presentation of a cell.
getParent_Immediate()

getOffsetX()

public final double getOffsetX()

Returns a distance from left side of a table to left side of a cell. Read-only double.

Returns: double

getOffsetY()

public final double getOffsetY()

Returns a distance from top side of a table to top side of a cell. Read-only double.

Returns: double

getFirstRowIndex()

public final int getFirstRowIndex()

Returns an index of first row, covered by the cell. Read-only int.

Returns: int

getFirstColumnIndex()

public final int getFirstColumnIndex()

Returns an index of first column, covered by the cell. Read-only int.

Returns: int

getWidth()

public final double getWidth()

Returns the width of the cell. Read-only double.

Returns: double

getHeight()

public final double getHeight()

Returns the height of the cell. Read-only double.

Returns: double

getMinimalHeight()

public final double getMinimalHeight()

Returns the minimum height of a cell. This is a sum of minimal heights of all rows cowered by the cell. Read-only double.

Returns: double

getMarginLeft()

public final double getMarginLeft()

Returns or sets the left margin in a TextFrame. Read/write double.

Returns: double

setMarginLeft(double value)

public final void setMarginLeft(double value)

Returns or sets the left margin in a TextFrame. Read/write double.

Parameters:

ParameterTypeDescription
valuedouble

getMarginRight()

public final double getMarginRight()

Returns or sets the right margin in a TextFrame. Read/write double.

Returns: double

setMarginRight(double value)

public final void setMarginRight(double value)

Returns or sets the right margin in a TextFrame. Read/write double.

Parameters:

ParameterTypeDescription
valuedouble

getMarginTop()

public final double getMarginTop()

Returns or sets the top margin in a TextFrame. Read/write double.

Returns: double

setMarginTop(double value)

public final void setMarginTop(double value)

Returns or sets the top margin in a TextFrame. Read/write double.

Parameters:

ParameterTypeDescription
valuedouble

getMarginBottom()

public final double getMarginBottom()

Returns or sets the bottom margin in a TextFrame. Read/write double.

Returns: double

setMarginBottom(double value)

public final void setMarginBottom(double value)

Returns or sets the bottom margin in a TextFrame. Read/write double.

Parameters:

ParameterTypeDescription
valuedouble

getTextVerticalType()

public final byte getTextVerticalType()

Returns or sets the type of vertical text. Read/write TextVerticalType.

Returns: byte

setTextVerticalType(byte value)

public final void setTextVerticalType(byte value)

Returns or sets the type of vertical text. Read/write TextVerticalType.

Parameters:

ParameterTypeDescription
valuebyte

getTextAnchorType()

public final byte getTextAnchorType()

Returns or sets the text anchor type. Read/write TextAnchorType.

Returns: byte

setTextAnchorType(byte value)

public final void setTextAnchorType(byte value)

Returns or sets the text anchor type. Read/write TextAnchorType.

Parameters:

ParameterTypeDescription
valuebyte

getAnchorCenter()

public final boolean getAnchorCenter()

Determines whether or not text box centered inside a cell. Read/write boolean.

Returns: boolean

setAnchorCenter(boolean value)

public final void setAnchorCenter(boolean value)

Determines whether or not text box centered inside a cell. Read/write boolean.

Parameters:

ParameterTypeDescription
valueboolean

getFirstRow()

public final IRow getFirstRow()

Gets first row of cell. Read-only IRow.

Returns: IRow

getFirstColumn()

public final IColumn getFirstColumn()

Gets first column of cell. Read-only IColumn.

Returns: IColumn

getColSpan()

public final int getColSpan()

Returns the number of grid columns in the parent table’s table grid which shall be spanned by the current cell. This property allows cells to have the appearance of being merged, as they span vertical boundaries of other cells in the table. Read-only int.

Returns: int

getRowSpan()

public final int getRowSpan()

Returns the number of rows that a merged cell spans. This is used in combination with the vMerge attribute on other cells in order to specify the beginning cell of a horizontal merge. Read-only int.

Returns: int

getTextFrame()

public final ITextFrame getTextFrame()

Returns the text frame of a cell. Read-only ITextFrame.

Returns: ITextFrame

getTable()

public final ITable getTable()

Returns the parent Table object for a cell. Read-only ITable.

Returns: ITable

isMergedCell()

public final boolean isMergedCell()

Returns true if the cell is merged with any adjusted cell, false otherwise. Read-only boolean.

Returns: boolean

getCellFormat()

public final ICellFormat getCellFormat()

Returns the CellFormat object that contains formatting properties for this cell. Read-only ICellFormat.

Returns: ICellFormat

splitByColSpan(int index)

public final void splitByColSpan(int index)

Splits the cell to two cells by index of column.

Parameters:

ParameterTypeDescription
indexintIndex of column.

splitByRowSpan(int index)

public final void splitByRowSpan(int index)

Splits the cell to two cells by index of row.

Parameters:

ParameterTypeDescription
indexintIndex of row.

splitByHeight(double height)

public final void splitByHeight(double height)

Splits the cell by height.

Parameters:

ParameterTypeDescription
heightdoubleHeight of a row.

splitByWidth(double width)

public final void splitByWidth(double width)

Splits the cell by width.

Parameters:

ParameterTypeDescription
widthdoubleWidth of a column.

getSlide()

public final IBaseSlide getSlide()

Returns the parent slide of a cell. Read-only IBaseSlide.

Returns: IBaseSlide

getPresentation()

public final IPresentation getPresentation()

Returns the parent presentation of a cell. Read-only IPresentation.

Returns: IPresentation

getParent_Immediate()

public final IDOMObject getParent_Immediate()

Returns Parent_Immediate object. Read-only IDOMObject.

Returns: com.aspose.slides.IDOMObject