com.aspose.pdf.elements
Class Cell

java.lang.Object
  extended bycom.aspose.pdf.elements.PdfElementBase
      extended bycom.aspose.pdf.elements.Cell
All Implemented Interfaces:
java.lang.Cloneable

public class Cell
extends PdfElementBase

Represents a cell in a Table.


Constructor Summary
Cell(Row row, java.lang.String content)
          Initialize a new instance of the Cell class.
Cell(Table table, java.lang.String content)
          Initialize a new instance of the Cell class.
 
Method Summary
 Color getBackGroundColor()
          Gets a Color object that indicatres the backgorund color of the cell.
 BorderInfo getBorder()
          Gets a BorderInfo object that indicates the cell's border info.
 int getColumnSpan()
          Gets an int value that indicates how many columns the cell sapns.
 TextInfo getDefaultCellTextInfo()
          Gets a TextInfo object that indicates the default cell text format info.
 org.w3c.dom.Element getDOMElement()
          Gets a DOM representation of the pdf element.
 float getFitWidth()
          Gets or sets a float value that indicates the fit width of the cell.
 MarginInfo getPadding()
          Gets a MarginInfo object that indicates the cell's padding.
 Paragraphs getParagraphs()
          Gets a Paragraphs collection that indicates all paragraphs in the cell.
 int getRowSpan()
          Gets a int value that indicates how many rows the cell spans.
 java.lang.String getVerticalAlignment()
          Gets a VerticalAlignmentType value that indicates the vertical alignment type.
 Cell setBackGroundColor(Color color)
          Sets a Color object that indicatres the backgorund color of the cell.
 Cell setBorder(BorderInfo info)
          Sets a BorderInfo object that indicates the cell's border info.
 Cell setColumnSpan(int span)
          Sets an int value that indicates how many columns the cell sapns.
 Cell setDefaultCellTextInfo(TextInfo textInfo)
          Sets a TextInfo object that indicates the default cell text format info.
 Cell setFitWidth(float fitWidth)
          Gets or sets a float value that indicates the fit width of the cell.
 Cell setPadding(MarginInfo padding)
          Sets a MarginInfo object that indicates the cell's padding.
 Cell setParagraphs(Paragraphs paragraphs)
          Sets a Paragraphs collection that indicates all paragraphs in the cell.
 Cell setRowSpan(int rowSpan)
          Sets a int value that indicates how many rows the cell spans.
 Cell setVerticalAlignment(java.lang.String alignment)
          Sets a VerticalAlignmentType value that indicates the vertical alignment type.
 
Methods inherited from class com.aspose.pdf.elements.PdfElementBase
clone, getElementFactory, getID, getNameIndex, setID
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Cell

public Cell(Table table,
            java.lang.String content)
Initialize a new instance of the Cell class.

Parameters:
table - Table that owns the cells.
content - the Cell contents

Cell

public Cell(Row row,
            java.lang.String content)
Initialize a new instance of the Cell class.

Parameters:
content - the Cell contents
Method Detail

getBackGroundColor

public Color getBackGroundColor()
Gets a Color object that indicatres the backgorund color of the cell.

Returns:
Returns the BackGroundColor.

setBackGroundColor

public Cell setBackGroundColor(Color color)
Sets a Color object that indicatres the backgorund color of the cell.


getParagraphs

public Paragraphs getParagraphs()
Gets a Paragraphs collection that indicates all paragraphs in the cell.

Returns:
Returns the Paragraphs.

setParagraphs

public Cell setParagraphs(Paragraphs paragraphs)
Sets a Paragraphs collection that indicates all paragraphs in the cell.

Parameters:
paragraphs - The Paragraphs to set.

getColumnSpan

public int getColumnSpan()
Gets an int value that indicates how many columns the cell sapns.

Returns:
Returns the ColumnSpan.

setColumnSpan

public Cell setColumnSpan(int span)
Sets an int value that indicates how many columns the cell sapns.

Parameters:
span - The ColumnSpan to set.

getFitWidth

public float getFitWidth()
Gets or sets a float value that indicates the fit width of the cell.
The unit is point. In XML,the default unit is point,but cm and inch are
also supported. For example,FitWidth="2cm" or FitWidth="2inch".

Returns:
Returns the FitWidth.

setFitWidth

public Cell setFitWidth(float fitWidth)
Gets or sets a float value that indicates the fit width of the cell.
The unit is point. In XML,the default unit is point,but cm and inch are
also supported. For example,FitWidth="2cm" or FitWidth="2inch".


getPadding

public MarginInfo getPadding()
Gets a MarginInfo object that indicates the cell's padding.

Returns:
Returns the Padding.

setPadding

public Cell setPadding(MarginInfo padding)
Sets a MarginInfo object that indicates the cell's padding.


getRowSpan

public int getRowSpan()
Gets a int value that indicates how many rows the cell spans.

Returns:
Returns the RowSpan.

setRowSpan

public Cell setRowSpan(int rowSpan)
Sets a int value that indicates how many rows the cell spans.


getVerticalAlignment

public java.lang.String getVerticalAlignment()
Gets a VerticalAlignmentType value that indicates the vertical alignment type.

Returns:
Returns the VerticalAlignment.

setVerticalAlignment

public Cell setVerticalAlignment(java.lang.String alignment)
Sets a VerticalAlignmentType value that indicates the vertical alignment type.

Parameters:
alignment - The VerticalAlignment to set.
See Also:
VerticalAlignmentType

getDefaultCellTextInfo

public TextInfo getDefaultCellTextInfo()
Gets a TextInfo object that indicates the default cell text format info.


setDefaultCellTextInfo

public Cell setDefaultCellTextInfo(TextInfo textInfo)
Sets a TextInfo object that indicates the default cell text format info.


getBorder

public BorderInfo getBorder()
Gets a BorderInfo object that indicates the cell's border info.

Returns:
Returns the BorderInfo.

setBorder

public Cell setBorder(BorderInfo info)
Sets a BorderInfo object that indicates the cell's border info.

Parameters:
info - The BorderInfo to set.

getDOMElement

public org.w3c.dom.Element getDOMElement()
                                  throws AsposeBaseException
Description copied from class: PdfElementBase
Gets a DOM representation of the pdf element.

Overrides:
getDOMElement in class PdfElementBase
Throws:
AsposeBaseException
See Also:
PdfElementBase.getDOMElement()