org.apache.fop.render.awt.viewer
Class ImageProxyPanel
JPanel
org.apache.fop.render.awt.viewer.ImageProxyPanel
public class ImageProxyPanel
extends JPanel
Panel used to display a single page of a document.
This is basically a lazy-load display panel which
gets the size of the image for layout purposes but
doesn't get the actual image data until needed.
The image data is then accessed via a soft reference,
so it will be garbage collected when moving through
large documents.
ImageProxyPanel
public ImageProxyPanel(AWTRenderer renderer,
int page)
Panel constructor. Doesn't allocate anything until needed.
renderer
- the AWTRenderer instance to use for paintingpage
- initial page number to show
getMinimumSize
public Dimension getMinimumSize()
- the size of the page plus the border.
getPreferredSize
public Dimension getPreferredSize()
- the size of the page plus the border.
paintComponent
public void paintComponent(Graphics graphics)
Gets the image data and paints it on screen. Will make
calls to getPageImage as required.
setPage
public void setPage(int pg)
Sets the number of the page to be displayed and refreshes the display.
Copyright 1999-2008 The Apache Software Foundation. All Rights Reserved.