IWP_TableCell Interface 

The IWP_TableCell interface contains public methods that set properties for table cells.  Note:  An IWP_TableCell object may only be obtained by first getting an IWP_Table object.  The public methods are organized into the following categories:

Text Content

These methods set and return cells' text contents.
 
Return Function Call Description
String getText() returns the cell contents
void setText(String) sets the cell's text contents after deleting current contents
 

Alignment

These methods set and return vertical and horizontal alignment.
 
Return Function Call Description
void setAlignment(String alignment) sets alignment to specified alignment - left, right or center
String getAlignment() returns the alignment
void setVAlign(String align) sets the vertical alignment - top, middle or bottom
String getVAlign() returns the vertical alignment of the cells
 

Spanning

These methods set and return column and row span settings.
 
Return Function Call Description
void setColSpan(int numCols) specifies how many columns are connected
int getColSpan() returns how many columns are connected
void setRowSpan(int numRows) specifies how many rows are connected
int getRowSpan() returns how many rows are connected
 

Color and Background Options

These methods set and return background color and image settings.  Some methods require objects of type Color as an argument.
 
Return Function Call Description
void setBackgroundColor(Color c) sets the cell's background color
Color getBackgroundColor() returns the cell's background color
void setBorderColor(Color c) sets the cell's border color
Color getBorderColor() returns the cell's border color
void setBackgroundImage(String alt) sets the cell's background image
String getBackgroundImage() returns the cell's background image
void setBackgroundImageTiled(boolean tiled) sets the cell's background image tiled option on/off
boolean isBackgroundImageTiled() returns true if the cell's background image is tiled
 

Table Cell Naming

The following methods are from IWP_Base and can be used on an IWP_TableCell object, because IWP_TableCell extends IWP_Container, which extends IWP_Base.
 
Return Function Call Description
String getName() returns the cell's name
void setName(String name) sets the cell's name

See Also
WordProcessor Overview
Table examples