com.itextpdf.text.pdf.events
Class PdfPCellEventForwarder

java.lang.Object
  extended by com.itextpdf.text.pdf.events.PdfPCellEventForwarder
All Implemented Interfaces:
PdfPCellEvent

public class PdfPCellEventForwarder
extends Object
implements 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
protected  ArrayList<PdfPCellEvent> events
          ArrayList containing all the PageEvents that have to be executed.
 
Constructor Summary
PdfPCellEventForwarder()
           
 
Method Summary
 void 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

events

protected ArrayList<PdfPCellEvent> events
ArrayList containing all the PageEvents that have to be executed.

Constructor Detail

PdfPCellEventForwarder

public PdfPCellEventForwarder()
Method Detail

addCellEvent

public void addCellEvent(PdfPCellEvent event)
Add a page event to the forwarder.

Parameters:
event - an event that has to be added to the forwarder.

cellLayout

public void cellLayout(PdfPCell cell,
                       Rectangle position,
                       PdfContentByte[] canvases)
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 4 PdfContentByte contained in canvases.
The indexes to canvases are:

The layers are placed in sequence on top of each other.

Specified by:
cellLayout in interface PdfPCellEvent
Parameters:
cell - the cell
position - the coordinates of the cell
canvases - an array of PdfContentByte
See Also:
PdfPCellEvent.cellLayout(com.itextpdf.text.pdf.PdfPCell, com.itextpdf.text.Rectangle, com.itextpdf.text.pdf.PdfContentByte[])

Hosted by Hostbasket