com.pdfjet
Class Cell

java.lang.Object
  extended by com.pdfjet.Cell

public class Cell
extends java.lang.Object

Used to create table cell objects. See the Table class for more information.


Constructor Summary
Cell(Font font)
          Creates a cell object and sets the font.
Cell(Font font, Font fallbackFont, java.lang.String text)
          Creates a cell object and sets the font, fallback font and the cell text.
Cell(Font font, java.lang.String text)
          Creates a cell object and sets the font and the cell text.
 
Method Summary
 int getBgColor()
          Returns the background color of this cell.
 boolean getBorder(int border)
          Returns the cell border object.
 int getBrushColor()
          Returns the brush color.
 int getColSpan()
          Returns the column span private variable value.
 CompositeTextLine getCompositeTextLine()
          Returns the composite text object.
 Font getFallbackFont()
          Returns the fallback font used by this cell.
 Font getFont()
          Returns the font used by this cell.
 float getHeight()
          Returns the cell height.
 Image getImage()
          Returns the cell image.
 float getLineWidth()
          Returns the border line width.
 int getNumVerCells()
          Use this method to find out how many vertically stacked cell are needed after call to wrapAroundCellText.
 int getNumVerCells2()
          Use this method to find out how many vertically stacked cell are needed after call to wrapAroundCellText2.
 int getPenColor()
          Returns the pen color.
 Point getPoint()
          Returns the cell point.
 boolean getStrikeout()
          Returns the strikeout text parameter.
 java.lang.String getText()
          Returns the cell text.
 int getTextAlignment()
          Returns the text alignment.
 boolean getUnderline()
          Returns the underline text parameter.
 int getVerTextAlignment()
          Returns the cell text vertical alignment.
 float getWidth()
          Returns the cell width.
 void setBgColor(int color)
          Sets the background to the specified color.
 void setBorder(int border, boolean visible)
          Sets the cell border object.
 void setBottomPadding(float padding)
          Sets the bottom padding of this cell.
 void setBrushColor(int color)
          Sets the brush color.
 void setColSpan(int colspan)
          Sets the column span private variable.
 void setCompositeTextLine(CompositeTextLine compositeTextLine)
          Sets the composite text object.
 void setFallbackFont(Font fallbackFont)
          Sets the fallback font for this cell.
 void setFgColor(int color)
          Sets the pen and brush colors to the specified color.
 void setFont(Font font)
          Sets the font for this cell.
 void setImage(Image image)
          Sets the image inside this cell.
 void setLeftPadding(float padding)
          Sets the left padding of this cell.
 void setLineWidth(float lineWidth)
          Sets the border line width.
 void setNoBorders()
          Sets all border object parameters to false.
 void setPadding(float padding)
          Sets the top, bottom, left and right paddings of this cell.
 void setPenColor(int color)
          Sets the pen color.
 void setPoint(Point point)
          Sets the point inside this cell.
 void setRightPadding(float padding)
          Sets the right padding of this cell.
 void setStrikeout(boolean strikeout)
          Sets the strikeout text parameter.
 void setText(java.lang.String text)
          Sets the cell text.
 void setTextAlignment(int alignment)
          Sets the cell text alignment.
 void setTopPadding(float padding)
          Sets the top padding of this cell.
 void setUnderline(boolean underline)
          Sets the underline text parameter.
 void setURIAction(java.lang.String uri)
           
 void setVerTextAlignment(int alignment)
          Sets the cell text vertical alignment.
 void setWidth(float width)
          Sets the width of this cell.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Cell

public Cell(Font font)
Creates a cell object and sets the font.

Parameters:
font - the font.

Cell

public Cell(Font font,
            java.lang.String text)
Creates a cell object and sets the font and the cell text.

Parameters:
font - the font.
text - the text.

Cell

public Cell(Font font,
            Font fallbackFont,
            java.lang.String text)
Creates a cell object and sets the font, fallback font and the cell text.

Parameters:
font - the font.
fallbackFont - the fallback font.
text - the text.
Method Detail

setFont

public void setFont(Font font)
Sets the font for this cell.

Parameters:
font - the font.

setFallbackFont

public void setFallbackFont(Font fallbackFont)
Sets the fallback font for this cell.

Parameters:
fallbackFont - the fallback font.

getFont

public Font getFont()
Returns the font used by this cell.

Returns:
the font.

getFallbackFont

public Font getFallbackFont()
Returns the fallback font used by this cell.

Returns:
the fallback font.

setText

public void setText(java.lang.String text)
Sets the cell text.

Parameters:
text - the cell text.

getText

public java.lang.String getText()
Returns the cell text.

Returns:
the cell text.

setImage

public void setImage(Image image)
Sets the image inside this cell.

Parameters:
image - the image.

getImage

public Image getImage()
Returns the cell image.

Returns:
the image.

setPoint

public void setPoint(Point point)
Sets the point inside this cell. See the Point class and Example_09 for more information.

Parameters:
point - the point.

getPoint

public Point getPoint()
Returns the cell point.

Returns:
the point.

setCompositeTextLine

public void setCompositeTextLine(CompositeTextLine compositeTextLine)
Sets the composite text object.

Parameters:
compositeTextLine - the composite text object.

getCompositeTextLine

public CompositeTextLine getCompositeTextLine()
Returns the composite text object.

Returns:
the composite text object.

setWidth

public void setWidth(float width)
Sets the width of this cell.

Parameters:
width - the specified width.

getWidth

public float getWidth()
Returns the cell width.

Returns:
the cell width.

setTopPadding

public void setTopPadding(float padding)
Sets the top padding of this cell.

Parameters:
padding - the top padding.

setBottomPadding

public void setBottomPadding(float padding)
Sets the bottom padding of this cell.

Parameters:
padding - the bottom padding.

setLeftPadding

public void setLeftPadding(float padding)
Sets the left padding of this cell.

Parameters:
padding - the left padding.

setRightPadding

public void setRightPadding(float padding)
Sets the right padding of this cell.

Parameters:
padding - the right padding.

setPadding

public void setPadding(float padding)
Sets the top, bottom, left and right paddings of this cell.

Parameters:
padding - the right padding.

getHeight

public float getHeight()
Returns the cell height.

Returns:
the cell height.

setLineWidth

public void setLineWidth(float lineWidth)
Sets the border line width.

Parameters:
lineWidth - the border line width.

getLineWidth

public float getLineWidth()
Returns the border line width.

Returns:
the border line width.

setBgColor

public void setBgColor(int color)
Sets the background to the specified color.

Parameters:
color - the color specified as 0xRRGGBB integer.

getBgColor

public int getBgColor()
Returns the background color of this cell.


setPenColor

public void setPenColor(int color)
Sets the pen color.

Parameters:
color - the color specified as 0xRRGGBB integer.

getPenColor

public int getPenColor()
Returns the pen color.


setBrushColor

public void setBrushColor(int color)
Sets the brush color.

Parameters:
color - the color specified as 0xRRGGBB integer.

getBrushColor

public int getBrushColor()
Returns the brush color.

Returns:
the brush color.

setFgColor

public void setFgColor(int color)
Sets the pen and brush colors to the specified color.

Parameters:
color - the color specified as 0xRRGGBB integer.

setColSpan

public void setColSpan(int colspan)
Sets the column span private variable.

Parameters:
colspan - the specified column span value.

getColSpan

public int getColSpan()
Returns the column span private variable value.

Returns:
the column span value.

setBorder

public void setBorder(int border,
                      boolean visible)
Sets the cell border object.

Parameters:
border - the border object.

getBorder

public boolean getBorder(int border)
Returns the cell border object.

Returns:
the cell border object.

setNoBorders

public void setNoBorders()
Sets all border object parameters to false. This cell will have no borders when drawn on the page.


setTextAlignment

public void setTextAlignment(int alignment)
Sets the cell text alignment.

Parameters:
alignment - the alignment code. Supported values: Align.LEFT, Align.RIGHT and Align.CENTER.

getTextAlignment

public int getTextAlignment()
Returns the text alignment.

Returns:
the text horizontal alignment code.

setVerTextAlignment

public void setVerTextAlignment(int alignment)
Sets the cell text vertical alignment.

Parameters:
alignment - the alignment code. Supported values: Align.TOP, Align.CENTER and Align.BOTTOM.

getVerTextAlignment

public int getVerTextAlignment()
Returns the cell text vertical alignment.

Returns:
the vertical alignment code.

setUnderline

public void setUnderline(boolean underline)
Sets the underline text parameter. If the value of the underline variable is 'true' - the text is underlined.

Parameters:
underline - the underline text parameter.

getUnderline

public boolean getUnderline()
Returns the underline text parameter.

Returns:
the underline text parameter.

setStrikeout

public void setStrikeout(boolean strikeout)
Sets the strikeout text parameter.

Parameters:
strikeout - the strikeout text parameter.

getStrikeout

public boolean getStrikeout()
Returns the strikeout text parameter.

Returns:
the strikeout text parameter.

setURIAction

public void setURIAction(java.lang.String uri)

getNumVerCells

public int getNumVerCells()
Use this method to find out how many vertically stacked cell are needed after call to wrapAroundCellText.

Returns:
the number of vertical cells needed to wrap around the cell text.

getNumVerCells2

public int getNumVerCells2()
Use this method to find out how many vertically stacked cell are needed after call to wrapAroundCellText2.

Returns:
the number of vertical cells needed to wrap around the cell text.