org.apache.fop.render.awt.viewer
Class PreviewDialog
JFrame
org.apache.fop.render.awt.viewer.PreviewDialog
- StatusListener
public class PreviewDialog
extends JFrame
AWT Viewer main window.
Surrounds a PreviewPanel with a bunch of pretty buttons and controls.
foUserAgent
protected FOUserAgent foUserAgent
The FOUserAgent associated with this window
renderable
protected Renderable renderable
Renderable instance that can be used to reload and re-render a document after
modifications.
translator
protected Translator translator
The Translator for localization
PreviewDialog
public PreviewDialog(FOUserAgent foUserAgent)
Creates a new PreviewDialog that uses the given renderer.
foUserAgent
- the user agent
PreviewDialog
public PreviewDialog(FOUserAgent foUserAgent,
Renderable renderable)
Creates a new PreviewDialog that uses the given renderer.
foUserAgent
- the user agentrenderable
- the Renderable instance that is used to reload/re-render a document
after modifications.
createPreviewDialog
public static PreviewDialog createPreviewDialog(FOUserAgent foUserAgent,
Renderable renderable,
boolean asMainWindow)
Creates and initialize the AWT Viewer main window.
foUserAgent
- the FO user agentrenderable
- the target for the rendering
- the newly initialized preview dialog
goToFirstPage
public void goToFirstPage()
Shows the first page.
goToLastPage
public void goToLastPage()
Shows the last page.
goToNextPage
public void goToNextPage()
Shows the next page.
goToPage
public void goToPage(int number)
Changes the current visible page
number
- the page number to go to
goToPreviousPage
public void goToPreviousPage()
Shows the previous page.
notifyPageRendered
public void notifyPageRendered()
Updates the message to be shown in the info bar in a thread safe way.
- notifyPageRendered in interface StatusListener
reportException
public void reportException(Exception e)
Opens standard Swing error dialog box and reports given exception details.
setScale
public void setScale(double scaleFactor)
Scales page image
setScaleToFitWidth
public void setScaleToFitWidth()
setScaleToFitWindow
public void setScaleToFitWindow()
setStatus
public void setStatus(String message)
Sets message to be shown in the status bar in a thread safe way.
startPrinterJob
public void startPrinterJob(boolean showDialog)
Prints the document
Copyright 1999-2007 The Apache Software Foundation. All Rights Reserved.