Package com.lowagie.text.pdf.events
Class PdfPCellEventForwarder
java.lang.Object
com.lowagie.text.pdf.events.PdfPCellEventForwarder
- All Implemented Interfaces:
PdfPCellEvent
If you want to add more than one event to a cell, you have to construct a PdfPCellEventForwarder, add the different
events to this object and add the forwarder to the PdfPCell.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected List
<PdfPCellEvent> ArrayList containing all the PageEvents that have to be executed. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addCellEvent
(PdfPCellEvent event) Add a page event to the forwarder.void
cellLayout
(PdfPCell cell, Rectangle position, PdfContentByte[] canvases) This method is called at the end of the cell rendering.
-
Field Details
-
events
ArrayList containing all the PageEvents that have to be executed.
-
-
Constructor Details
-
PdfPCellEventForwarder
public PdfPCellEventForwarder()
-
-
Method Details
-
addCellEvent
Add a page event to the forwarder.- Parameters:
event
- an event that has to be added to the forwarder.
-
cellLayout
Description copied from interface:PdfPCellEvent
This method is called at the end of the cell rendering. The text or graphics are added to one of the 4PdfContentByte
contained incanvases
.
The indexes tocanvases
are:PdfPTable.BASECANVAS
- the originalPdfContentByte
. 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.
- Specified by:
cellLayout
in interfacePdfPCellEvent
- Parameters:
cell
- the cellposition
- the coordinates of the cellcanvases
- an array ofPdfContentByte
- See Also:
-