|
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.lowagie.text.Rectangle
com.lowagie.text.SimpleCell
public class SimpleCell
Rectangle that can be used for Cells. This Rectangle is padded and knows how to draw itself in a PdfPTable or PdfPcellEvent.
| Field Summary | |
|---|---|
static boolean |
CELL
the CellAttributes object represents a cell. |
private boolean |
cellgroup
indicates if these are the attributes of a single Cell (false) or a group of Cells (true). |
private int |
colspan
the colspan of a Cell |
private ArrayList |
content
the content of the Cell. |
private int |
horizontalAlignment
horizontal alignment inside the Cell. |
private float |
padding_bottom
an extra padding variable |
private float |
padding_left
an extra padding variable |
private float |
padding_right
an extra padding variable |
private float |
padding_top
an extra padding variable |
static boolean |
ROW
the CellAttributes object represents a row. |
private float |
spacing_bottom
an extra spacing variable |
private float |
spacing_left
an extra spacing variable |
private float |
spacing_right
an extra spacing variable |
private float |
spacing_top
an extra spacing variable |
protected boolean |
useAscender
Indicates that the largest ascender height should be used to determine the height of the first line. |
protected boolean |
useBorderPadding
Adjusts the cell contents to compensate for border widths. |
protected boolean |
useDescender
Indicates that the largest descender height should be added to the height of the last line (so characters like y don't dip into the border). |
private int |
verticalAlignment
vertical alignment inside the Cell. |
private float |
width
the width of the Cell. |
private float |
widthpercentage
the widthpercentage of the Cell. |
| Fields inherited from class com.lowagie.text.Rectangle |
|---|
backgroundColor, border, borderColor, borderColorBottom, borderColorLeft, borderColorRight, borderColorTop, borderWidth, borderWidthBottom, borderWidthLeft, borderWidthRight, borderWidthTop, BOTTOM, BOX, LEFT, llx, lly, NO_BORDER, RIGHT, rotation, TOP, UNDEFINED, urx, ury, useVariableBorders |
| Fields inherited from interface com.lowagie.text.Element |
|---|
ALIGN_BASELINE, ALIGN_BOTTOM, ALIGN_CENTER, ALIGN_JUSTIFIED, ALIGN_JUSTIFIED_ALL, ALIGN_LEFT, ALIGN_MIDDLE, ALIGN_RIGHT, ALIGN_TOP, ALIGN_UNDEFINED, ANCHOR, ANNOTATION, AUTHOR, CCITT_BLACKIS1, CCITT_ENCODEDBYTEALIGN, CCITT_ENDOFBLOCK, CCITT_ENDOFLINE, CCITTG3_1D, CCITTG3_2D, CCITTG4, CHAPTER, CHUNK, CREATIONDATE, CREATOR, HEADER, IMGRAW, IMGTEMPLATE, JPEG, JPEG2000, KEYWORDS, LIST, LISTITEM, MARKED, MULTI_COLUMN_TEXT, PARAGRAPH, PHRASE, PRODUCER, PTABLE, RECTANGLE, SECTION, SUBJECT, TABLE, TITLE |
| Constructor Summary | |
|---|---|
SimpleCell(boolean row)
A CellAttributes object is always constructed without any dimensions. |
|
| Method Summary | |
|---|---|
boolean |
add(Object o)
Adds an object to the TextElementArray. |
void |
addElement(Element element)
Adds content to this object. |
void |
cellLayout(PdfPCell cell,
Rectangle position,
PdfContentByte[] canvases)
This method is called at the end of the cell rendering. |
Cell |
createCell(SimpleCell rowAttributes)
Creates a Cell with these attributes. |
PdfPCell |
createPdfPCell(SimpleCell rowAttributes)
Creates a PdfPCell with these attributes. |
int |
getColspan()
|
(package private) ArrayList |
getContent()
|
static SimpleCell |
getDimensionlessInstance(Rectangle rectangle,
float spacing)
|
int |
getHorizontalAlignment()
|
float |
getPadding_bottom()
|
float |
getPadding_left()
|
float |
getPadding_right()
|
float |
getPadding_top()
|
float |
getSpacing_bottom()
|
float |
getSpacing_left()
|
float |
getSpacing_right()
|
float |
getSpacing_top()
|
int |
getVerticalAlignment()
|
float |
getWidth()
Returns the width of the rectangle. |
float |
getWidthpercentage()
|
boolean |
isCellgroup()
|
boolean |
isUseAscender()
|
boolean |
isUseBorderPadding()
|
boolean |
isUseDescender()
|
void |
setCellgroup(boolean cellgroup)
|
void |
setColspan(int colspan)
|
void |
setHorizontalAlignment(int horizontalAlignment)
|
void |
setPadding_bottom(float padding_bottom)
|
void |
setPadding_left(float padding_left)
|
void |
setPadding_right(float padding_right)
|
void |
setPadding_top(float padding_top)
|
void |
setPadding(float padding)
Sets the padding parameters if they are undefined. |
void |
setSpacing_bottom(float spacing)
|
void |
setSpacing_left(float spacing)
|
void |
setSpacing_right(float spacing)
|
void |
setSpacing_top(float spacing)
|
void |
setSpacing(float spacing)
|
void |
setUseAscender(boolean useAscender)
|
void |
setUseBorderPadding(boolean useBorderPadding)
|
void |
setUseDescender(boolean useDescender)
|
void |
setVerticalAlignment(int verticalAlignment)
|
void |
setWidth(float width)
|
void |
setWidthpercentage(float widthpercentage)
|
int |
type()
Gets the type of the text element. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface com.lowagie.text.Element |
|---|
getChunks, isContent, isNestable, process, toString |
| Field Detail |
|---|
public static final boolean ROW
public static final boolean CELL
private ArrayList content
private float width
private float widthpercentage
private float spacing_left
private float spacing_right
private float spacing_top
private float spacing_bottom
private float padding_left
private float padding_right
private float padding_top
private float padding_bottom
private int colspan
private int horizontalAlignment
private int verticalAlignment
private boolean cellgroup
protected boolean useAscender
protected boolean useDescender
protected boolean useBorderPadding
| Constructor Detail |
|---|
public SimpleCell(boolean row)
row - only true if the CellAttributes object represents a row.| Method Detail |
|---|
public void addElement(Element element)
throws BadElementException
element -
BadElementException
public Cell createCell(SimpleCell rowAttributes)
throws BadElementException
rowAttributes -
BadElementExceptionpublic PdfPCell createPdfPCell(SimpleCell rowAttributes)
rowAttributes -
public static SimpleCell getDimensionlessInstance(Rectangle rectangle,
float spacing)
rectangle - spacing -
public void cellLayout(PdfPCell cell,
Rectangle position,
PdfContentByte[] canvases)
PdfPCellEventPdfContentByte contained in
canvases.canvases are:
PdfPTable.BASECANVAS - the original PdfContentByte. Anything placed here
will be under the cell.
PdfPTable.BACKGROUNDCANVAS - the layer where the background goes to.
PdfPTable.LINECANVAS - the layer where the lines go to.
PdfPTable.TEXTCANVAS - the layer where the text go to. Anything placed here
will be over the cell.
cellLayout in interface PdfPCellEventcell - the cellposition - the coordinates of the cellcanvases - an array of PdfContentBytePdfPCellEvent.cellLayout(com.lowagie.text.pdf.PdfPCell, com.lowagie.text.Rectangle, com.lowagie.text.pdf.PdfContentByte[])public void setPadding(float padding)
padding - public int getColspan()
public void setColspan(int colspan)
colspan - The colspan to set.public float getPadding_bottom()
public void setPadding_bottom(float padding_bottom)
padding_bottom - The padding_bottom to set.public float getPadding_left()
public void setPadding_left(float padding_left)
padding_left - The padding_left to set.public float getPadding_right()
public void setPadding_right(float padding_right)
padding_right - The padding_right to set.public float getPadding_top()
public void setPadding_top(float padding_top)
padding_top - The padding_top to set.public float getSpacing_left()
public float getSpacing_right()
public float getSpacing_top()
public float getSpacing_bottom()
public void setSpacing(float spacing)
spacing - The spacing to set.public void setSpacing_left(float spacing)
spacing - The spacing to set.public void setSpacing_right(float spacing)
spacing - The spacing to set.public void setSpacing_top(float spacing)
spacing - The spacing to set.public void setSpacing_bottom(float spacing)
spacing - The spacing to set.public boolean isCellgroup()
public void setCellgroup(boolean cellgroup)
cellgroup - The cellgroup to set.public int getHorizontalAlignment()
public void setHorizontalAlignment(int horizontalAlignment)
horizontalAlignment - The horizontalAlignment to set.public int getVerticalAlignment()
public void setVerticalAlignment(int verticalAlignment)
verticalAlignment - The verticalAligment to set.public float getWidth()
Rectangle
getWidth in class Rectanglepublic void setWidth(float width)
width - The width to set.public float getWidthpercentage()
public void setWidthpercentage(float widthpercentage)
widthpercentage - The widthpercentage to set.public boolean isUseAscender()
public void setUseAscender(boolean useAscender)
useAscender - The useAscender to set.public boolean isUseBorderPadding()
public void setUseBorderPadding(boolean useBorderPadding)
useBorderPadding - The useBorderPadding to set.public boolean isUseDescender()
public void setUseDescender(boolean useDescender)
useDescender - The useDescender to set.ArrayList getContent()
public boolean add(Object o)
TextElementArrayTextElementArray.
add in interface TextElementArrayo - an object that has to be added
true if the addition succeeded; false otherwiseTextElementArray.add(java.lang.Object)public int type()
Rectangle
type in interface Elementtype in class RectangleElement.type()
|
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||