org.apache.fop.viewer
Class PreviewDialog

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--java.awt.Window
                    |
                    +--java.awt.Frame
                          |
                          +--javax.swing.JFrame
                                |
                                +--org.apache.fop.viewer.PreviewDialog

public class PreviewDialog
extends JFrame
implements MessageListener, ProgressListener

Frame and User Interface for Preview


Inner Class Summary
 (package private) classPreviewDialog.showPageImage
          This class is used to update the page image in a thread safe way.
 (package private) classPreviewDialog.showProgress
          This class is used to show status and error messages in a thread safe way.

Inner classes inherited from class javax.swing.JFrame
JFrame.AccessibleJFrame

Inner classes inherited from class java.awt.Frame
Frame.AccessibleAWTFrame

Inner classes inherited from class java.awt.Window
Window.AccessibleAWTWindow

Inner classes inherited from class java.awt.Container
Container.AccessibleAWTContainer

Inner classes inherited from class java.awt.Component
Component.AccessibleAWTComponent

Fields inherited from class javax.swing.JFrame
EXIT_ON_CLOSE

Fields inherited from class java.awt.Frame
DEFAULT_CURSOR, CROSSHAIR_CURSOR, TEXT_CURSOR, WAIT_CURSOR, SW_RESIZE_CURSOR, SE_RESIZE_CURSOR, NW_RESIZE_CURSOR, NE_RESIZE_CURSOR, N_RESIZE_CURSOR, S_RESIZE_CURSOR, W_RESIZE_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, MOVE_CURSOR, NORMAL, ICONIFIED

Fields inherited from class java.awt.Component
TOP_ALIGNMENT, CENTER_ALIGNMENT, BOTTOM_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT

Constructor Summary
PreviewDialog(AWTRenderer aRenderer, Translator aRes)
          Create a new PreviewDialog that uses the given renderer and translator.

Method Summary
 voiddispose()
           
 voidprocessMessage(MessageEvent event)
          Called by MessageHandler if an error message or a log message is received.
 voidprogress(int percentage)
           
 voidprogress(int percentage, String message)
           
 voidprogress(String message)
          Setting the text of a JLabel is not thread save, it needs to be done in the EventThread.
 (package private) voidscale_actionPerformed(ActionEvent e)
           
 voidsetScale(double scaleFactor)
           
 voidshowPage()
           
 voidstartHelpAbout(ActionEvent e)
          Show the About box

Methods inherited from class javax.swing.JFrame
setDefaultCloseOperation, getDefaultCloseOperation, update, setJMenuBar, getJMenuBar, remove, setLayout, getRootPane, getContentPane, setContentPane, getLayeredPane, setLayeredPane, getGlassPane, setGlassPane, getAccessibleContext

Methods inherited from class java.awt.Frame
addNotify, getTitle, setTitle, getIconImage, setIconImage, getMenuBar, setMenuBar, isResizable, setResizable, setState, getState, remove, removeNotify, setCursor, getCursorType, getFrames

Methods inherited from class java.awt.Window
pack, show, hide, toFront, toBack, getToolkit, getWarningString, getLocale, getInputContext, setCursor, getOwner, getOwnedWindows, addWindowListener, removeWindowListener, getListeners, getFocusOwner, postEvent, isShowing, applyResourceBundle, applyResourceBundle, getGraphicsConfiguration

Methods inherited from class java.awt.Container
getComponentCount, countComponents, getComponent, getComponents, getInsets, insets, add, add, add, add, add, remove, removeAll, getLayout, doLayout, layout, invalidate, validate, setFont, getPreferredSize, preferredSize, getMinimumSize, minimumSize, getMaximumSize, getAlignmentX, getAlignmentY, paint, print, paintComponents, printComponents, addContainerListener, removeContainerListener, deliverEvent, getComponentAt, locate, getComponentAt, findComponentAt, findComponentAt, isAncestorOf, list, list

Methods inherited from class java.awt.Component
getName, setName, getParent, getPeer, setDropTarget, getDropTarget, getTreeLock, isValid, isDisplayable, isVisible, isEnabled, setEnabled, enable, enable, disable, isDoubleBuffered, enableInputMethods, setVisible, show, getForeground, setForeground, getBackground, setBackground, getFont, setLocale, getColorModel, getLocation, getLocationOnScreen, location, setLocation, move, setLocation, getSize, size, setSize, resize, setSize, resize, getBounds, bounds, setBounds, reshape, setBounds, getX, getY, getWidth, getHeight, getBounds, getSize, getLocation, isOpaque, isLightweight, getGraphics, getFontMetrics, getCursor, paintAll, repaint, repaint, repaint, repaint, printAll, imageUpdate, createImage, createImage, prepareImage, prepareImage, checkImage, checkImage, contains, inside, contains, dispatchEvent, addComponentListener, removeComponentListener, addFocusListener, removeFocusListener, addHierarchyListener, removeHierarchyListener, addHierarchyBoundsListener, removeHierarchyBoundsListener, addKeyListener, removeKeyListener, addMouseListener, removeMouseListener, addMouseMotionListener, removeMouseMotionListener, addInputMethodListener, removeInputMethodListener, getInputMethodRequests, handleEvent, mouseDown, mouseDrag, mouseUp, mouseMove, mouseEnter, mouseExit, keyDown, keyUp, action, gotFocus, lostFocus, isFocusTraversable, requestFocus, transferFocus, nextFocus, hasFocus, add, toString, list, list, list, addPropertyChangeListener, removePropertyChangeListener, addPropertyChangeListener, removePropertyChangeListener, setComponentOrientation, getComponentOrientation

Methods inherited from class java.lang.Object
getClass, hashCode, equals, notify, notifyAll, wait, wait, wait

Constructor Detail

PreviewDialog

public PreviewDialog(AWTRenderer aRenderer, Translator aRes)
Create a new PreviewDialog that uses the given renderer and translator.
Parameters:
aRenderer - the to use renderer
aRes - the to use translator
Method Detail

dispose

public void dispose()

processMessage

public void processMessage(MessageEvent event)
Called by MessageHandler if an error message or a log message is received.

progress

public void progress(int percentage)

progress

public void progress(int percentage, String message)

progress

public void progress(String message)
Setting the text of a JLabel is not thread save, it needs to be done in the EventThread. Here we make sure it is done.

scale_actionPerformed

void scale_actionPerformed(ActionEvent e)

setScale

public void setScale(double scaleFactor)

showPage

public void showPage()

startHelpAbout

public void startHelpAbout(ActionEvent e)
Show the About box
Parameters:
e - a value of type 'ActionEvent'

Association Links

to Class org.apache.fop.viewer.Translator

to Class org.apache.fop.render.awt.AWTRenderer

to Class org.apache.fop.viewer.IconToolBar

to Class org.apache.fop.viewer.Command

to Class org.apache.fop.viewer.Command

to Class org.apache.fop.viewer.Command

to Class org.apache.fop.viewer.Command

to Class org.apache.fop.viewer.Command

to Class javax.swing.JLabel

to Class javax.swing.JComboBox

to Class javax.swing.JScrollPane

to Class javax.swing.JPanel

to Class java.awt.GridBagLayout

to Class javax.swing.JLabel

to Class javax.swing.JLabel

to Class javax.swing.JLabel

to Class javax.swing.JLabel