|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.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. |
static boolean |
ROW
the CellAttributes object represents a row. |
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). |
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, JBIG2, JPEG, JPEG2000, KEYWORDS, LIST, LISTITEM, MARKED, MULTI_COLUMN_TEXT, PARAGRAPH, PHRASE, PRODUCER, PTABLE, RECTANGLE, SECTION, SUBJECT, TABLE, TITLE, YMARK |
Constructor Summary | |
---|---|
SimpleCell(boolean row)
A CellAttributes object is always constructed without any dimensions. |
Method Summary | |
---|---|
boolean |
add(java.lang.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()
|
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
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
-
BadElementException
public PdfPCell createPdfPCell(SimpleCell rowAttributes)
rowAttributes
-
public void cellLayout(PdfPCell cell, Rectangle position, PdfContentByte[] canvases)
PdfPCellEvent
PdfContentByte
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 PdfPCellEvent
cell
- the cellposition
- the coordinates of the cellcanvases
- an array of PdfContentByte
PdfPCellEvent.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 Rectangle
public 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.public boolean add(java.lang.Object o)
TextElementArray
TextElementArray
.
add
in interface TextElementArray
o
- 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 Element
type
in class Rectangle
Element.type()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |