Package net.atthegate.server.service.pdf
Class Cell
java.lang.Object
net.atthegate.server.service.pdf.Cell
Used to create table cell objects.
See the Table class for more information.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
Returns the background color of this cell.boolean
getBorder
(int border) Returns the cell border object.int
Returns the brush color.int
Returns the column span private variable value.Returns the composite text object.Returns the fallback font used by this cell.getFont()
Returns the font used by this cell.float
Returns the cell height.boolean
getImage()
Returns the cell image.float
Returns the border line width.int
Use this method to find out how many vertically stacked cell are needed after call to wrapAroundCellText.int
Use this method to find out how many vertically stacked cell are needed after call to wrapAroundCellText2.int
Returns the pen color.getPoint()
Returns the cell point.protected int
boolean
Returns the strikeout text parameter.getText()
Returns the cell text.int
Returns the text alignment.boolean
Returns the underline text parameter.int
Returns the cell text vertical alignment.float
getWidth()
Returns the cell width.protected void
Draws the point, text and borders of this cell.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
Sets the font for this cell.void
setIgnoreImageHeight
(boolean ignoreImageHeight) void
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
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
Sets the point inside this cell.protected void
setProperties
(int properties) void
setRightPadding
(float padding) Sets the right padding of this cell.void
setStrikeout
(boolean strikeout) Sets the strikeout text parameter.void
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
(String uri) void
setVerTextAlignment
(int alignment) Sets the cell text vertical alignment.void
setWidth
(float width) Sets the width of this cell.
-
Field Details
-
font
-
fallbackFont
-
text
-
image
-
point
-
compositeTextLine
-
ignoreImageHeight
protected boolean ignoreImageHeight -
width
protected float width -
top_padding
protected float top_padding -
bottom_padding
protected float bottom_padding -
left_padding
protected float left_padding -
right_padding
protected float right_padding -
lineWidth
protected float lineWidth
-
-
Constructor Details
-
Cell
Creates a cell object and sets the font.- Parameters:
font
- the font.
-
Cell
Creates a cell object and sets the font and the cell text.- Parameters:
font
- the font.text
- the text.
-
Cell
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 Details
-
setFont
Sets the font for this cell.- Parameters:
font
- the font.
-
setFallbackFont
Sets the fallback font for this cell.- Parameters:
fallbackFont
- the fallback font.
-
getFont
Returns the font used by this cell.- Returns:
- the font.
-
getFallbackFont
Returns the fallback font used by this cell.- Returns:
- the fallback font.
-
setText
Sets the cell text.- Parameters:
text
- the cell text.
-
getText
Returns the cell text.- Returns:
- the cell text.
-
setImage
Sets the image inside this cell.- Parameters:
image
- the image.
-
getImage
Returns the cell image.- Returns:
- the image.
-
setPoint
Sets the point inside this cell. See the Point class and Example_09 for more information.- Parameters:
point
- the point.
-
getPoint
Returns the cell point.- Returns:
- the point.
-
setCompositeTextLine
Sets the composite text object.- Parameters:
compositeTextLine
- the composite text object.
-
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.
-
setProperties
protected void setProperties(int properties) -
getProperties
protected int getProperties() -
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
-
paint
Draws the point, text and borders of this cell.- Throws:
Exception
-
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.
-
setIgnoreImageHeight
public void setIgnoreImageHeight(boolean ignoreImageHeight) -
getIgnoreImageHeight
public boolean getIgnoreImageHeight()
-