com.lowagie.rups.view.renderer

Class PagePanel

public class PagePanel extends JPanel implements ImageObserver, MouseListener, MouseMotionListener

The panel that will show a rendered PDF page.
Field Summary
Rectangle2Dclip
the current clip, in device space
protected ImagecurrentImage
The image of the rendered PDF page being displayed
protected PDFPagecurrentPage
The current PDFPage that was rendered into currentImage
AffineTransformdeviceToPageSpaceTransformation
the current transform from device space to page space
protected intoffx
The horizontal offset of the image from the left edge of the panel
protected intoffy
The vertical offset of the image from the top of the panel
Rectangle2DprevClip
the clipping region used for the image
DimensionprevSize
the size of the image
static longserialVersionUID
A Serial Version UID.
protected RectanglezoomRect
the zooming marquee
Constructor Summary
PagePanel()
Creates a new PagePanel
Method Summary
intgetCurrentPageNumber()
Gets the current page number.
booleanimageUpdate(Image img, int infoflags, int x, int y, int width, int height)
Handles notification of the fact that some part of the image changed.
voidmouseClicked(MouseEvent arg0)
voidmouseDragged(MouseEvent arg0)
voidmouseEntered(MouseEvent arg0)
voidmouseExited(MouseEvent arg0)
voidmouseMoved(MouseEvent arg0)
voidmousePressed(MouseEvent arg0)
voidmouseReleased(MouseEvent arg0)
voidpaint(Graphics g)
Draw the image.
voidshowPage(PDFPage page)
Stop the generation of any previous page, and draw the new one.

Field Detail

clip

Rectangle2D clip
the current clip, in device space

currentImage

protected Image currentImage
The image of the rendered PDF page being displayed

currentPage

protected PDFPage currentPage
The current PDFPage that was rendered into currentImage

deviceToPageSpaceTransformation

AffineTransform deviceToPageSpaceTransformation
the current transform from device space to page space

offx

protected int offx
The horizontal offset of the image from the left edge of the panel

offy

protected int offy
The vertical offset of the image from the top of the panel

prevClip

Rectangle2D prevClip
the clipping region used for the image

prevSize

Dimension prevSize
the size of the image

serialVersionUID

private static final long serialVersionUID
A Serial Version UID.

zoomRect

protected Rectangle zoomRect
the zooming marquee

Constructor Detail

PagePanel

public PagePanel()
Creates a new PagePanel

Method Detail

getCurrentPageNumber

public int getCurrentPageNumber()
Gets the current page number.

Returns: the number of the currently shown page.

imageUpdate

public boolean imageUpdate(Image img, int infoflags, int x, int y, int width, int height)
Handles notification of the fact that some part of the image changed. Repaints that portion.

Returns: true if more updates are desired.

mouseClicked

public void mouseClicked(MouseEvent arg0)

mouseDragged

public void mouseDragged(MouseEvent arg0)

mouseEntered

public void mouseEntered(MouseEvent arg0)

mouseExited

public void mouseExited(MouseEvent arg0)

mouseMoved

public void mouseMoved(MouseEvent arg0)

mousePressed

public void mousePressed(MouseEvent arg0)

mouseReleased

public void mouseReleased(MouseEvent arg0)

paint

public void paint(Graphics g)
Draw the image.

showPage

public void showPage(PDFPage page)
Stop the generation of any previous page, and draw the new one.

Parameters: page the PDFPage to draw.