org.jfree.report.modules.gui.base
Class PreviewProxyBase

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjavax.swing.JComponent
              extended byorg.jfree.report.modules.gui.base.PreviewProxyBase
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable

public class PreviewProxyBase
extends javax.swing.JComponent

A preview proxy. This class is the backend for all preview components.

Author:
Thomas Morgner.
See Also:
Serialized Form

Nested Class Summary
protected  class PreviewProxyBase.ZoomSetAction
          A zoom set action.
 
Nested classes inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Nested classes inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
static java.lang.String ABOUT_ACTION_KEY
          A key to query an action from the action map.
static java.lang.String ACTION_ABOUT_PROPERTY
          A configuration key to define whether and how the about action should be included.
static java.lang.String ACTION_NAVIGATION_PROPERTY
          A configuration key to define whether and how the navigation actions should be included.
static java.lang.String ACTION_ZOOM_PROPERTY
          A configuration key to define whether and how the zoom actions should be included.
static java.lang.String BASE_RESOURCE_CLASS
          The base class for localised resources.
static java.lang.String CLOSE_ACTION_KEY
          A key to query an action from the action map.
static java.lang.String CONF_ALL_DISABLED
           
static java.lang.String CONF_ALL_ENABLED
           
static java.lang.String CONF_MENUBAR_ENABLED
           
static java.lang.String CONF_TOOLBAR_ENABLED
           
static java.lang.String CREATE_MENUBAR_PROPERTY
          A configuration key to define whether the toolbar is floatable.
static java.lang.String CREATE_TOOLBAR_PROPERTY
          A configuration key to define whether the toolbar is created.
static int DEFAULT_REPORT_PANE_HEIGHT
          The default height of the report pane.
static int DEFAULT_REPORT_PANE_WIDTH
          The default width of the report pane.
static java.lang.String FIRSTPAGE_ACTION_KEY
          A key to query an action from the action map.
static java.lang.String GOTO_ACTION_KEY
          A key to query an action from the action map.
static java.lang.String LARGE_ICONS_ENABLED_PROPERTY
          A configuration key to define whether large toolbar icons are enabled.
static java.lang.String LARGE_ICONS_PROPERTY
          The property name for the largeIconsEnabled property for the toolbar.
static java.lang.String LASTPAGE_ACTION_KEY
          A key to query an action from the action map.
static java.lang.String NEXT_PAGE_ACTION_KEY
          A key to query an action from the action map.
static java.lang.String PREV_PAGE_ACTION_KEY
          A key to query an action from the action map.
static java.lang.String PREVIEW_MAXIMUM_HEIGHT
          The maximum height key.
static java.lang.String PREVIEW_MAXIMUM_WIDTH
          The maximum width key.
static java.lang.String PREVIEW_PREFERRED_HEIGHT
          The preferred height key.
static java.lang.String PREVIEW_PREFERRED_WIDTH
          The preferred width key.
static java.lang.String PROGRESS_BAR_ENABLE_PROPERTY
          A configuration key to define whether the toolbar is floatable.
static java.lang.String PROGRESS_DIALOG_ENABLE_PROPERTY
          A configuration key to define whether the toolbar is floatable.
static java.lang.String REPORT_PANE_PROPERTY
           
static java.lang.String TOOLBAR_FLOATABLE_PROPERTY
          A configuration key to define whether the toolbar is floatable.
static java.lang.String TOOLBAR_FLOATABLE_PROPERTYNAME
          The property name for the toolbarFloatable property.
protected static float[] ZOOM_FACTORS
          The available zoom factors.
static java.lang.String ZOOM_IN_ACTION_KEY
          A key to query an action from the action map.
static java.lang.String ZOOM_OUT_ACTION_KEY
          A key to query an action from the action map.
 
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
PreviewProxyBase(PreviewProxy proxy)
          Creates a preview proxy.
 
Method Summary
 void addRepaginationListener(RepaginationListener listener)
          Adds a repagination listener to this component.
 void close()
          Shuts down the preview component.
protected  javax.swing.JButton createButton(javax.swing.Action action)
          Creates a button using the given action properties for the button's initialisation.
protected  javax.swing.Action createDefaultAboutAction()
          Creates the AboutAction used in this previewframe.
protected  javax.swing.Action createDefaultFirstPageAction()
          Creates the FirstPageAction used in this previewframe.
protected  javax.swing.Action createDefaultGotoAction()
          Creates the GotoPageAction used in this previewframe.
protected  javax.swing.Action createDefaultLastPageAction()
          Creates the LastPageAction used in this previewframe.
protected  javax.swing.Action createDefaultNextPageAction()
          Creates the NextPageAction used in this previewframe.
protected  javax.swing.Action createDefaultPreviousPageAction()
          Creates the PreviousPageAction used in this previewframe.
protected  javax.swing.Action createDefaultZoomInAction()
          Creates the ZoomInAction used in this previewframe.
protected  javax.swing.Action createDefaultZoomOutAction()
          Creates the ZoomOutAction used in this previewframe.
protected  javax.swing.JMenu createFileMenu()
          Creates and returns the file menu of the preview base.
protected  javax.swing.JMenu createHelpMenu()
          Creates and returns the help menu of the preview base.
protected  javax.swing.JMenuBar createMenuBar()
          Creates and returns a menu-bar for the frame.
protected  javax.swing.JMenuItem createMenuItem(javax.swing.Action action)
          Creates a menu item based on the supplied action.
protected  javax.swing.JMenu createNavigationMenu()
          Creates and returns the navigation menu of the preview base.
protected  ReportPane createReportPane(JFreeReport report)
          Creates the ReportPane for the report.
protected  javax.swing.JPanel createStatusBar()
          Creates the statusbar for this frame.
protected  javax.swing.JToolBar createToolBar()
          Creates an empty toolbar.
protected  javax.swing.JMenu createZoomMenu()
          Creates and returns the zoom menu of the preview base.
protected  javax.swing.JComponent createZoomPane()
          Creates a panel containing a combobox with available zoom-values.
protected  javax.swing.Action createZoomSelectAction()
          Creates a zoom select action.
protected  javax.swing.JComboBox createZoomSelector()
           
protected  void decreasePageNumber()
          Decreases the page number.
protected  void decreaseZoom()
          Decreases the zoom factor for the report pane (unless it is already at the minimum zoom).
protected  void disableButtons()
          Disables the buttons.
 void dispose()
          Disposes the preview frame.
 void finalize()
          Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.
protected  void firstPage()
          Activates the display of the first page, if not already on the first page.
protected  void freeResources()
          Performs a minor dispose operation and interrupts the repagination worker.
 javax.swing.Action getAboutAction()
          Returns the 'About' action.
 DowngradeActionMap getBaseActionMap()
          Returns the base action map containing all basic actions.
 javax.swing.Action getCloseAction()
          Returns the 'Close' action.
 DowngradeActionMap getCustomActionMap()
           
 DowngradeActionMap getExportActionMap()
          Returns the export action map containing all export related actions.
protected  java.util.HashMap getExportActions()
          Returns the map of export plugins available to the report.
protected  java.util.List getExportPlugins()
          Returns the list of export plugins available to the report.
protected  WorkerPool getExportWorkerPool()
          Returns the export worker used for exporting.
 javax.swing.Action getFirstPageAction()
          Returns the 'First Page' action.
 javax.swing.Action getGotoAction()
          Returns the 'Goto' action.
 javax.swing.Action getLastPageAction()
          Returns the 'Last Page' action.
 DowngradeActionMap getNavigationActionMap()
          Returns the navigation action map containing all navigation related actions.
 javax.swing.Action getNextPageAction()
          Returns the 'Next Page' action.
 java.awt.print.Pageable getPageable()
          Returns the report pane, which implements the Pageable interface.
 javax.swing.Action getPreviousPageAction()
          Returns the 'Previous Page' action.
 java.awt.print.Printable getPrintable()
          Returns the report pane, which implements the Printable interface.
protected  ReportProgressBar getProgressBar()
           
protected  ReportProgressDialog getProgressDialog()
          Returns the repagination report progress dialog.
protected  Worker getRepaginationWorker()
          Returns the pagination worker used when paginating the report.
 JFreeReport getReport()
           
 ReportPane getReportPane()
          Returns the report pane used to preview the report.
protected  java.util.ResourceBundle getResources()
          Retrieves the resources for this PreviewFrame.
 java.lang.String getStatusText()
          Returns the status text of the status line.
protected  javax.swing.JToolBar getToolbar()
          Returns the toolbar used in this component.
 DowngradeActionMap getZoomActionMap()
          Returns the zoom action map containing all zoom related actions.
 float getZoomFactor()
          Returns the current zoom factor.
 javax.swing.Action getZoomInAction()
          Returns the 'Zoom In' action.
 javax.swing.Action getZoomOutAction()
          Returns the 'Zoom Out' action.
protected  javax.swing.JComboBox getZoomSelect()
          Returns the zoom selection combobox.
protected  void increasePageNumber()
          Increases the page number.
protected  void increaseZoom()
          Increases the zoom factor for the report pane (unless it is already at maximum zoom).
 void init(JFreeReport report)
          Deprecated. use setReport(..) instead.
protected  void initializeToolBar()
          Creates and returns a toolbar containing controls for print, page forward and backward, zoom in and out, and an about box.
 boolean isClosed()
          Checks, wether the preview frame was finally closed.
 boolean isLargeIconsEnabled()
          Returns true if large icons are enabled for the toolbar.
 boolean isLockInterface()
          Checks, whether the interface is locked.
protected  boolean isMenuActionEnabled(java.lang.String property)
           
 boolean isProgressBarEnabled()
           
 boolean isProgressDialogEnabled()
           
protected  boolean isToolbarActionEnabled(java.lang.String property)
           
 boolean isToolbarFloatable()
          Returns true, if the toolbar is floatable, false otherwise.
protected  void lastPage()
          Method lastPage moves to the last page.
protected  void performPagination()
          Paginates the report.
 void refresh()
           
protected  void registerAction(javax.swing.Action action)
          Checks whether this action has a keystroke assigned.
protected  void reinitialize()
          Call this method, whenever actions have changed.
 void removeRepaginationListener(RepaginationListener listener)
          Removes the specified repagination listener from this component.
 void setAboutAction(javax.swing.Action aboutAction)
          Sets the 'About' action.
 void setCloseAction(javax.swing.Action closeAction)
          Sets the 'Close' action.
 void setFirstPageAction(javax.swing.Action firstPageAction)
          Sets the 'First Page' action.
 void setGotoAction(javax.swing.Action gotoAction)
          Sets the 'Goto' action.
 void setLargeIconsEnabled(boolean b)
          Sets a flag that controls whether or not large icons are used in the toolbar.
 void setLastPageAction(javax.swing.Action lastPageAction)
          Sets the 'Last Page' action.
 void setLockInterface(boolean lockInterface)
          Defines, whether the interface is locked.
 void setNextPageAction(javax.swing.Action nextPageAction)
          Sets the 'Next Page' action.
 void setPreviousPageAction(javax.swing.Action previousPageAction)
          Sets the 'Previous Page' action.
 void setProgressBarEnabled(boolean progressBarEnabled)
           
 void setProgressDialogEnabled(boolean progressDialogEnabled)
           
 void setReport(JFreeReport report)
           
 void setStatusText(java.lang.String text)
          Defines the text of the status line.
 void setToolbarFloatable(boolean b)
          Defines whether the toolbar is floatable.
 void setZoomFactor(int index)
          Sets the zoomfactor of the report pane.
 void setZoomInAction(javax.swing.Action zoomInAction)
          Sets the 'Zoom In' action.
 void setZoomOutAction(javax.swing.Action zoomOutAction)
          Sets the 'Zoom Out' action.
protected  void showExceptionDialog(java.lang.String localisationBase, java.lang.Exception e)
          Shows the exception dialog by using localized messages.
 void updatePageFormat(java.awt.print.PageFormat pf)
          Updates the pageformat of the ReportPane.
protected  void validateButtons()
          Updates the states of all buttons to reflect the state of the assigned ReportPane.
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getAccessibleContext, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, paramString, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update, updateUI
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

LARGE_ICONS_PROPERTY

public static final java.lang.String LARGE_ICONS_PROPERTY
The property name for the largeIconsEnabled property for the toolbar.

See Also:
Constant Field Values

GOTO_ACTION_KEY

public static final java.lang.String GOTO_ACTION_KEY
A key to query an action from the action map.

See Also:
Constant Field Values

ABOUT_ACTION_KEY

public static final java.lang.String ABOUT_ACTION_KEY
A key to query an action from the action map.

See Also:
Constant Field Values

CLOSE_ACTION_KEY

public static final java.lang.String CLOSE_ACTION_KEY
A key to query an action from the action map.

See Also:
Constant Field Values

FIRSTPAGE_ACTION_KEY

public static final java.lang.String FIRSTPAGE_ACTION_KEY
A key to query an action from the action map.

See Also:
Constant Field Values

LASTPAGE_ACTION_KEY

public static final java.lang.String LASTPAGE_ACTION_KEY
A key to query an action from the action map.

See Also:
Constant Field Values

NEXT_PAGE_ACTION_KEY

public static final java.lang.String NEXT_PAGE_ACTION_KEY
A key to query an action from the action map.

See Also:
Constant Field Values

PREV_PAGE_ACTION_KEY

public static final java.lang.String PREV_PAGE_ACTION_KEY
A key to query an action from the action map.

See Also:
Constant Field Values

ZOOM_IN_ACTION_KEY

public static final java.lang.String ZOOM_IN_ACTION_KEY
A key to query an action from the action map.

See Also:
Constant Field Values

ZOOM_OUT_ACTION_KEY

public static final java.lang.String ZOOM_OUT_ACTION_KEY
A key to query an action from the action map.

See Also:
Constant Field Values

DEFAULT_REPORT_PANE_WIDTH

public static final int DEFAULT_REPORT_PANE_WIDTH
The default width of the report pane.

See Also:
Constant Field Values

DEFAULT_REPORT_PANE_HEIGHT

public static final int DEFAULT_REPORT_PANE_HEIGHT
The default height of the report pane.

See Also:
Constant Field Values

PREVIEW_PREFERRED_WIDTH

public static final java.lang.String PREVIEW_PREFERRED_WIDTH
The preferred width key.

See Also:
Constant Field Values

PREVIEW_PREFERRED_HEIGHT

public static final java.lang.String PREVIEW_PREFERRED_HEIGHT
The preferred height key.

See Also:
Constant Field Values

PREVIEW_MAXIMUM_WIDTH

public static final java.lang.String PREVIEW_MAXIMUM_WIDTH
The maximum width key.

See Also:
Constant Field Values

PREVIEW_MAXIMUM_HEIGHT

public static final java.lang.String PREVIEW_MAXIMUM_HEIGHT
The maximum height key.

See Also:
Constant Field Values

PROGRESS_BAR_ENABLE_PROPERTY

public static final java.lang.String PROGRESS_BAR_ENABLE_PROPERTY
A configuration key to define whether the toolbar is floatable.

See Also:
Constant Field Values

PROGRESS_DIALOG_ENABLE_PROPERTY

public static final java.lang.String PROGRESS_DIALOG_ENABLE_PROPERTY
A configuration key to define whether the toolbar is floatable.

See Also:
Constant Field Values

LARGE_ICONS_ENABLED_PROPERTY

public static final java.lang.String LARGE_ICONS_ENABLED_PROPERTY
A configuration key to define whether large toolbar icons are enabled.

See Also:
Constant Field Values

TOOLBAR_FLOATABLE_PROPERTY

public static final java.lang.String TOOLBAR_FLOATABLE_PROPERTY
A configuration key to define whether the toolbar is floatable.

See Also:
Constant Field Values

CREATE_TOOLBAR_PROPERTY

public static final java.lang.String CREATE_TOOLBAR_PROPERTY
A configuration key to define whether the toolbar is created.

See Also:
Constant Field Values

CREATE_MENUBAR_PROPERTY

public static final java.lang.String CREATE_MENUBAR_PROPERTY
A configuration key to define whether the toolbar is floatable.

See Also:
Constant Field Values

TOOLBAR_FLOATABLE_PROPERTYNAME

public static final java.lang.String TOOLBAR_FLOATABLE_PROPERTYNAME
The property name for the toolbarFloatable property.

See Also:
Constant Field Values

ACTION_ABOUT_PROPERTY

public static final java.lang.String ACTION_ABOUT_PROPERTY
A configuration key to define whether and how the about action should be included. Can be set to "disable", "menu", "toolbar", "enable"

See Also:
Constant Field Values

ACTION_ZOOM_PROPERTY

public static final java.lang.String ACTION_ZOOM_PROPERTY
A configuration key to define whether and how the zoom actions should be included. Can be set to "disable", "menu", "toolbar", "enable"

See Also:
Constant Field Values

ACTION_NAVIGATION_PROPERTY

public static final java.lang.String ACTION_NAVIGATION_PROPERTY
A configuration key to define whether and how the navigation actions should be included. Can be set to "disable", "menu", "toolbar", "enable"

See Also:
Constant Field Values

BASE_RESOURCE_CLASS

public static final java.lang.String BASE_RESOURCE_CLASS
The base class for localised resources.


CONF_TOOLBAR_ENABLED

public static final java.lang.String CONF_TOOLBAR_ENABLED
See Also:
Constant Field Values

CONF_ALL_ENABLED

public static final java.lang.String CONF_ALL_ENABLED
See Also:
Constant Field Values

CONF_ALL_DISABLED

public static final java.lang.String CONF_ALL_DISABLED
See Also:
Constant Field Values

CONF_MENUBAR_ENABLED

public static final java.lang.String CONF_MENUBAR_ENABLED
See Also:
Constant Field Values

REPORT_PANE_PROPERTY

public static final java.lang.String REPORT_PANE_PROPERTY
See Also:
Constant Field Values

ZOOM_FACTORS

protected static final float[] ZOOM_FACTORS
The available zoom factors.

Constructor Detail

PreviewProxyBase

public PreviewProxyBase(PreviewProxy proxy)
Creates a preview proxy.

Parameters:
proxy - the proxy.
Method Detail

getExportPlugins

protected java.util.List getExportPlugins()
Returns the list of export plugins available to the report.

Returns:
the list of export plugins.

getExportActions

protected java.util.HashMap getExportActions()
Returns the map of export plugins available to the report. Using a plugin as key you can query the assigned action for that plugin.

Returns:
the list of export plugins.

getExportWorkerPool

protected WorkerPool getExportWorkerPool()
Returns the export worker used for exporting.

Returns:
the worker.

getRepaginationWorker

protected Worker getRepaginationWorker()
Returns the pagination worker used when paginating the report.

Returns:
the worker.

init

public void init(JFreeReport report)
          throws ReportProcessingException
Deprecated. use setReport(..) instead.

Initialises the preview dialog.

Parameters:
report - the report.
Throws:
ReportProcessingException - if there is a problem processing the report.

reinitialize

protected void reinitialize()
Call this method, whenever actions have changed. The menu and toolbar will be rebuild.


createToolBar

protected javax.swing.JToolBar createToolBar()
Creates an empty toolbar. The toolbar will be inizialized later by calling inizializeToolbar().

Returns:
the created toolbar.

isMenuActionEnabled

protected boolean isMenuActionEnabled(java.lang.String property)

isToolbarActionEnabled

protected boolean isToolbarActionEnabled(java.lang.String property)

createReportPane

protected ReportPane createReportPane(JFreeReport report)
                               throws ReportProcessingException
Creates the ReportPane for the report.

Parameters:
report - the report for this pane.
Returns:
the report pane.
Throws:
ReportProcessingException - if there is a problem processing the report.

getResources

protected java.util.ResourceBundle getResources()
Retrieves the resources for this PreviewFrame. If the resources are not initialized, they get loaded on the first call to this method.

Returns:
this frames ResourceBundle.

getZoomFactor

public float getZoomFactor()
Returns the current zoom factor.

Returns:
The current zoom factor.

getPageable

public java.awt.print.Pageable getPageable()
Returns the report pane, which implements the Pageable interface.

Returns:
the report pane.

getPrintable

public java.awt.print.Printable getPrintable()
Returns the report pane, which implements the Printable interface.

Returns:
the report pane.

getReportPane

public ReportPane getReportPane()
Returns the report pane used to preview the report.

Returns:
the report pane.

showExceptionDialog

protected void showExceptionDialog(java.lang.String localisationBase,
                                   java.lang.Exception e)
Shows the exception dialog by using localized messages. The message base is used to construct the localisation key by appending ".title" and ".message" to the base name.

Parameters:
localisationBase - the resource key prefix.
e - the exception.

lastPage

protected void lastPage()
Method lastPage moves to the last page.


increasePageNumber

protected void increasePageNumber()
Increases the page number.


firstPage

protected void firstPage()
Activates the display of the first page, if not already on the first page.


decreasePageNumber

protected void decreasePageNumber()
Decreases the page number.


increaseZoom

protected void increaseZoom()
Increases the zoom factor for the report pane (unless it is already at maximum zoom).


decreaseZoom

protected void decreaseZoom()
Decreases the zoom factor for the report pane (unless it is already at the minimum zoom).


setZoomFactor

public void setZoomFactor(int index)
Sets the zoomfactor of the report pane.

Parameters:
index - the index into the array of standard zoom factors.

registerAction

protected void registerAction(javax.swing.Action action)
Checks whether this action has a keystroke assigned. If it has one, the keystroke is assigned to the frame.

Parameters:
action - the action.

createDefaultNextPageAction

protected javax.swing.Action createDefaultNextPageAction()
Creates the NextPageAction used in this previewframe.

Returns:
the 'next page' action.

createDefaultPreviousPageAction

protected javax.swing.Action createDefaultPreviousPageAction()
Creates the PreviousPageAction used in this previewframe.

Returns:
the 'previous page' action.

createDefaultZoomInAction

protected javax.swing.Action createDefaultZoomInAction()
Creates the ZoomInAction used in this previewframe.

Returns:
the 'zoom in' action.

createDefaultZoomOutAction

protected javax.swing.Action createDefaultZoomOutAction()
Creates the ZoomOutAction used in this previewframe.

Returns:
the 'zoom out' action.

createDefaultAboutAction

protected javax.swing.Action createDefaultAboutAction()
Creates the AboutAction used in this previewframe.

If you subclass PreviewFrame, and override this method, you can display your own 'about' dialog.

Returns:
the 'about' action.

createZoomSelectAction

protected javax.swing.Action createZoomSelectAction()
Creates a zoom select action.

Returns:
the action.

createDefaultGotoAction

protected javax.swing.Action createDefaultGotoAction()
Creates the GotoPageAction used in this previewframe.

Returns:
the 'goto' action.

createDefaultFirstPageAction

protected javax.swing.Action createDefaultFirstPageAction()
Creates the FirstPageAction used in this previewframe.

Returns:
the 'first page' action.

createDefaultLastPageAction

protected javax.swing.Action createDefaultLastPageAction()
Creates the LastPageAction used in this previewframe.

Returns:
the 'last page' action.

getStatusText

public java.lang.String getStatusText()
Returns the status text of the status line.

Returns:
the status text.

setStatusText

public void setStatusText(java.lang.String text)
Defines the text of the status line.

Parameters:
text - the new text of the status line.

createStatusBar

protected javax.swing.JPanel createStatusBar()
Creates the statusbar for this frame. Use setStatus() to display text on the status bar.

Returns:
the status bar.

createMenuBar

protected javax.swing.JMenuBar createMenuBar()
Creates and returns a menu-bar for the frame.

Returns:
A ready-made JMenuBar.

createFileMenu

protected javax.swing.JMenu createFileMenu()
Creates and returns the file menu of the preview base. The actions must be assigned in this method.

Returns:
A ready-made FileMenu.

createNavigationMenu

protected javax.swing.JMenu createNavigationMenu()
Creates and returns the navigation menu of the preview base. The actions must be assigned in this method.

Returns:
A ready-made navigation Menu.

createZoomMenu

protected javax.swing.JMenu createZoomMenu()
Creates and returns the zoom menu of the preview base. The actions must be assigned in this method.

Returns:
A ready-made zoom menu.

createHelpMenu

protected javax.swing.JMenu createHelpMenu()
Creates and returns the help menu of the preview base. The actions must be assigned in this method.

Returns:
A ready-made help menu.

createButton

protected javax.swing.JButton createButton(javax.swing.Action action)
Creates a button using the given action properties for the button's initialisation.

Parameters:
action - the action used to set up the button.
Returns:
a button based on the supplied action.

createMenuItem

protected javax.swing.JMenuItem createMenuItem(javax.swing.Action action)
Creates a menu item based on the supplied action.

Parameters:
action - the action.
Returns:
the menu item.

getToolbar

protected final javax.swing.JToolBar getToolbar()
Returns the toolbar used in this component. If the toolbar is disabled in the global report configuration, then null is returned.

Returns:
the toolbar of this component or null

initializeToolBar

protected void initializeToolBar()
Creates and returns a toolbar containing controls for print, page forward and backward, zoom in and out, and an about box.


isToolbarFloatable

public boolean isToolbarFloatable()
Returns true, if the toolbar is floatable, false otherwise.

Returns:
true when the toolbar is floatable.

setToolbarFloatable

public void setToolbarFloatable(boolean b)
Defines whether the toolbar is floatable.

Parameters:
b - a flag that indicates whether or not the toolbar is floatable.

createZoomSelector

protected javax.swing.JComboBox createZoomSelector()

createZoomPane

protected javax.swing.JComponent createZoomPane()
Creates a panel containing a combobox with available zoom-values.

Returns:
a panel containing a combobox with zoom values.

validateButtons

protected void validateButtons()
Updates the states of all buttons to reflect the state of the assigned ReportPane.


getZoomSelect

protected javax.swing.JComboBox getZoomSelect()
Returns the zoom selection combobox. Use this to enable or diable it, but dont modify it, or be doomed.

Returns:
the zoom selection combobox.

disableButtons

protected void disableButtons()
Disables the buttons.


getExportActionMap

public DowngradeActionMap getExportActionMap()
Returns the export action map containing all export related actions. This map contains the actions for the export plugins.

Returns:
the export action map.

getBaseActionMap

public DowngradeActionMap getBaseActionMap()
Returns the base action map containing all basic actions. This map contains such actions like the Close-Action or the About-Action.

Returns:
the export action map.

getNavigationActionMap

public DowngradeActionMap getNavigationActionMap()
Returns the navigation action map containing all navigation related actions. This map contains the various "Goto..." actions.

Returns:
the export action map.

getZoomActionMap

public DowngradeActionMap getZoomActionMap()
Returns the zoom action map containing all zoom related actions. This map contains actions controling the zoom level of the report pane.

Returns:
the export action map.

getProgressDialog

protected ReportProgressDialog getProgressDialog()
Returns the repagination report progress dialog.

Returns:
the repaginiation progress dialog.

isLargeIconsEnabled

public boolean isLargeIconsEnabled()
Returns true if large icons are enabled for the toolbar.

Returns:
true if large icons are enabled.

setLargeIconsEnabled

public void setLargeIconsEnabled(boolean b)
Sets a flag that controls whether or not large icons are used in the toolbar.

Parameters:
b - the new value of the flag.

dispose

public void dispose()
Disposes the preview frame.


freeResources

protected final void freeResources()
Performs a minor dispose operation and interrupts the repagination worker.


isClosed

public boolean isClosed()
Checks, wether the preview frame was finally closed. Closing the frame does not just mean to make it invisible, it also kills all worker threads. Once the preview is closed, it is not possible to reactivate it again.

Returns:
true, if the preview is closed, false otherwise

close

public void close()
Shuts down the preview component. Once the component is closed, it cannot be reactivated anymore. Calling this method will abort all worker threads, will close the progress dialog and dispose all components.


finalize

public void finalize()
              throws java.lang.Throwable
Called by the garbage collector on an object when garbage collection determines that there are no more references to the object. A subclass overrides the finalize method to dispose of system resources or to perform other cleanup.

Throws:
java.lang.Throwable - the Exception raised by this method

getAboutAction

public javax.swing.Action getAboutAction()
Returns the 'About' action.

Returns:
the 'About' action.

setAboutAction

public void setAboutAction(javax.swing.Action aboutAction)
Sets the 'About' action.

Parameters:
aboutAction - the 'About' action.

getCloseAction

public javax.swing.Action getCloseAction()
Returns the 'Close' action.

Returns:
the 'Close' action.

setCloseAction

public void setCloseAction(javax.swing.Action closeAction)
Sets the 'Close' action.

Parameters:
closeAction - the 'Close' action.

getFirstPageAction

public javax.swing.Action getFirstPageAction()
Returns the 'First Page' action.

Returns:
the 'First Page' action.

setFirstPageAction

public void setFirstPageAction(javax.swing.Action firstPageAction)
Sets the 'First Page' action.

Parameters:
firstPageAction - the 'First Page' action.

getLastPageAction

public javax.swing.Action getLastPageAction()
Returns the 'Last Page' action.

Returns:
the 'Last Page' action.

setLastPageAction

public void setLastPageAction(javax.swing.Action lastPageAction)
Sets the 'Last Page' action.

Parameters:
lastPageAction - the 'Last Page' action.

getNextPageAction

public javax.swing.Action getNextPageAction()
Returns the 'Next Page' action.

Returns:
the 'Next Page' action.

setNextPageAction

public void setNextPageAction(javax.swing.Action nextPageAction)
Sets the 'Next Page' action.

Parameters:
nextPageAction - the 'Next Page' action.

getPreviousPageAction

public javax.swing.Action getPreviousPageAction()
Returns the 'Previous Page' action.

Returns:
the 'Previous Page' action.

setPreviousPageAction

public void setPreviousPageAction(javax.swing.Action previousPageAction)
Sets the 'Previous Page' action.

Parameters:
previousPageAction - the 'Previous Page' action.

getZoomInAction

public javax.swing.Action getZoomInAction()
Returns the 'Zoom In' action.

Returns:
the 'Zoom In' action.

setZoomInAction

public void setZoomInAction(javax.swing.Action zoomInAction)
Sets the 'Zoom In' action.

Parameters:
zoomInAction - the 'Zoom In' action.

getZoomOutAction

public javax.swing.Action getZoomOutAction()
Returns the 'Zoom Out' action.

Returns:
the 'Zoom Out' action.

setZoomOutAction

public void setZoomOutAction(javax.swing.Action zoomOutAction)
Sets the 'Zoom Out' action.

Parameters:
zoomOutAction - the 'Zoom Out' action.

getGotoAction

public javax.swing.Action getGotoAction()
Returns the 'Goto' action.

Returns:
the 'Goto' action.

setGotoAction

public void setGotoAction(javax.swing.Action gotoAction)
Sets the 'Goto' action.

Parameters:
gotoAction - the 'Goto' action.

updatePageFormat

public void updatePageFormat(java.awt.print.PageFormat pf)
                      throws ReportProcessingException
Updates the pageformat of the ReportPane.

Parameters:
pf - the new page format object.
Throws:
ReportProcessingException

performPagination

protected void performPagination()
Paginates the report. This method should be called from the event dispatcher thread, or funny things could happen.


isLockInterface

public boolean isLockInterface()
Checks, whether the interface is locked. A locked interface has all actions disabled and waits for a certain task to be completed. The only actions that are always enabled are teh help and the exit actions.

Returns:
true, if the interface is in the locked state, or false otherwise.

setLockInterface

public void setLockInterface(boolean lockInterface)
Defines, whether the interface is locked. A locked interface has all actions disabled and waits for a certain task to be completed. The only actions that are always enabled are teh help and the exit actions.

Parameters:
lockInterface - set to true, if the interface should be set into the locked state, or false otherwise.

addRepaginationListener

public void addRepaginationListener(RepaginationListener listener)
Adds a repagination listener to this component. The listener will be informed about the pagination progress.

Parameters:
listener - the listener to be added.

removeRepaginationListener

public void removeRepaginationListener(RepaginationListener listener)
Removes the specified repagination listener from this component.

Parameters:
listener - the listener to be removed.

setReport

public void setReport(JFreeReport report)
               throws ReportProcessingException
Throws:
ReportProcessingException

getReport

public JFreeReport getReport()

refresh

public void refresh()
             throws ReportProcessingException
Throws:
ReportProcessingException

getCustomActionMap

public DowngradeActionMap getCustomActionMap()

isProgressBarEnabled

public boolean isProgressBarEnabled()

setProgressBarEnabled

public void setProgressBarEnabled(boolean progressBarEnabled)

isProgressDialogEnabled

public boolean isProgressDialogEnabled()

setProgressDialogEnabled

public void setProgressDialogEnabled(boolean progressDialogEnabled)

getProgressBar

protected ReportProgressBar getProgressBar()