| Constructor: |
public PreviewDialog() {
init();
}
Creates a non-modal dialog without a title and without a specified Frame owner. A shared, hidden
frame will be set as the owner of the dialog.
This constructor sets the component's locale property to the value returned by
JComponent.getDefaultLocale. Throws:
java.awt.HeadlessException - if GraphicsEnvironment.isHeadless() returns true.
Also see:
- java.awt.GraphicsEnvironment#isHeadless
- javax.swing.JComponent#getDefaultLocale
|
public PreviewDialog(Frame owner) {
super(owner);
init();
}
Creates a non-modal dialog without a title with the specified Frame as its owner. If
owner is null, a shared, hidden frame will be set as the owner of the dialog.
This constructor sets the component's locale property to the value returned by
JComponent.getDefaultLocale. Parameters:
owner - the Frame from which the dialog is displayed
Throws:
java.awt.HeadlessException - if GraphicsEnvironment.isHeadless() returns true.
Also see:
- java.awt.GraphicsEnvironment#isHeadless
- javax.swing.JComponent#getDefaultLocale
|
public PreviewDialog(Dialog owner) {
super(owner);
init();
}
Creates a non-modal dialog without a title with the specified Dialog as its owner.
This constructor sets the component's locale property to the value returned by
JComponent.getDefaultLocale. Parameters:
owner - the non-null Dialog from which the dialog is displayed
Throws:
java.awt.HeadlessException - if GraphicsEnvironment.isHeadless() returns true.
Also see:
- java.awt.GraphicsEnvironment#isHeadless
- javax.swing.JComponent#getDefaultLocale
|
public PreviewDialog(JFreeReport report) {
init();
setReportJob(report);
}
Creates a non-modal dialog without a title and without a specified Frame owner. A shared, hidden
frame will be set as the owner of the dialog.
This constructor sets the component's locale property to the value returned by
JComponent.getDefaultLocale. Throws:
java.awt.HeadlessException - if GraphicsEnvironment.isHeadless() returns true.
Also see:
- java.awt.GraphicsEnvironment#isHeadless
- javax.swing.JComponent#getDefaultLocale
|
public PreviewDialog(Frame owner,
boolean modal) {
super(owner, modal);
init();
}
Creates a modal or non-modal dialog without a title and with the specified owner Frame. If
owner is null, a shared, hidden frame will be set as the owner of the dialog.
This constructor sets the component's locale property to the value returned by
JComponent.getDefaultLocale. Parameters:
owner - the Frame from which the dialog is displayed
modal - true for a modal dialog, false for one that allows others windows to be active at the same time
Throws:
java.awt.HeadlessException - if GraphicsEnvironment.isHeadless() returns true.
Also see:
- java.awt.GraphicsEnvironment#isHeadless
- javax.swing.JComponent#getDefaultLocale
|
public PreviewDialog(Dialog owner,
boolean modal) {
super(owner, modal);
init();
}
Creates a modal or non-modal dialog without a title and with the specified owner dialog.
This constructor sets the component's locale property to the value returned by
JComponent.getDefaultLocale. Parameters:
owner - the non-null Dialog from which the dialog is displayed
modal - true for a modal dialog, false for one that allows other windows to be active at the same time
Throws:
java.awt.HeadlessException - if GraphicsEnvironment.isHeadless() returns true.
Also see:
- java.awt.GraphicsEnvironment#isHeadless
- javax.swing.JComponent#getDefaultLocale
|
public PreviewDialog(JFreeReport report,
Frame owner) {
super(owner);
init();
setReportJob(report);
}
Creates a non-modal dialog without a title with the specified Frame as its owner. If
owner is null, a shared, hidden frame will be set as the owner of the dialog.
This constructor sets the component's locale property to the value returned by
JComponent.getDefaultLocale. Parameters:
owner - the Frame from which the dialog is displayed
Throws:
java.awt.HeadlessException - if GraphicsEnvironment.isHeadless() returns true.
Also see:
- java.awt.GraphicsEnvironment#isHeadless
- javax.swing.JComponent#getDefaultLocale
|
public PreviewDialog(JFreeReport report,
Dialog owner) {
super(owner);
init();
setReportJob(report);
}
Creates a non-modal dialog without a title with the specified Dialog as its owner.
This constructor sets the component's locale property to the value returned by
JComponent.getDefaultLocale. Parameters:
owner - the non-null Dialog from which the dialog is displayed
Throws:
java.awt.HeadlessException - if GraphicsEnvironment.isHeadless() returns true.
Also see:
- java.awt.GraphicsEnvironment#isHeadless
- javax.swing.JComponent#getDefaultLocale
|
public PreviewDialog(JFreeReport report,
Frame owner,
boolean modal) {
super(owner, modal);
init();
setReportJob(report);
}
Creates a modal or non-modal dialog without a title and with the specified owner Frame. If
owner is null, a shared, hidden frame will be set as the owner of the dialog.
This constructor sets the component's locale property to the value returned by
JComponent.getDefaultLocale. Parameters:
owner - the Frame from which the dialog is displayed
modal - true for a modal dialog, false for one that allows others windows to be active at the same time
Throws:
java.awt.HeadlessException - if GraphicsEnvironment.isHeadless() returns true.
Also see:
- java.awt.GraphicsEnvironment#isHeadless
- javax.swing.JComponent#getDefaultLocale
|
public PreviewDialog(JFreeReport report,
Dialog owner,
boolean modal) {
super(owner, modal);
init();
setReportJob(report);
}
Creates a modal or non-modal dialog without a title and with the specified owner dialog.
This constructor sets the component's locale property to the value returned by
JComponent.getDefaultLocale. Parameters:
owner - the non-null Dialog from which the dialog is displayed
modal - true for a modal dialog, false for one that allows other windows to be active at the same time
Throws:
java.awt.HeadlessException - if GraphicsEnvironment.isHeadless() returns true.
Also see:
- java.awt.GraphicsEnvironment#isHeadless
- javax.swing.JComponent#getDefaultLocale
|
| Methods from java.awt.Component: |
|---|
|
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, bounds, checkImage, checkImage, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, deliverEvent, disable, dispatchEvent, doLayout, enable, enable, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAccessibleContext, getAlignmentX, getAlignmentY, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeys, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getMinimumSize, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusCycleRoot, isFocusOwner, isFocusTraversable, isFocusable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paint, paintAll, postEvent, preferredSize, prepareImage, prepareImage, print, printAll, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setFocusable, setFont, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle, update, validate |
| Method from org.jfree.report.modules.gui.base.PreviewDialog Detail: |
public void dispose() {
super.dispose();
previewPane.setClosed(true);
}
|
public IconTheme getIconTheme() {
return previewPane.getIconTheme();
}
|
public PreviewPane getPreviewPane() {
return previewPane;
}
|
public ReportController getReportController() {
return previewPane.getReportController();
}
|
public JFreeReport getReportJob() {
return previewPane.getReportJob();
}
|
public JStatusBar getStatusBar() {
return statusBar;
}
|
public double getZoom() {
return previewPane.getZoom();
}
|
protected void init() {
addComponentListener(new RequestFocusHandler());
messages = new Messages(getLocale(), SwingPreviewModule.BUNDLE_NAME);
previewPane = new PreviewPane();
previewPane.setDeferredRepagination(true);
addComponentListener(new TriggerPaginationListener(previewPane));
statusBar = new JStatusBar(previewPane.getIconTheme());
pageLabel = new JLabel();
final Configuration configuration = JFreeReportBoot.getInstance().getGlobalConfig();
final boolean progressBarEnabled = "true".equals(configuration //$NON-NLS-1$
.getConfigProperty("org.jfree.report.modules.gui.base.ProgressBarEnabled")); //$NON-NLS-1$
final boolean progressDialogEnabled = "true".equals(configuration //$NON-NLS-1$
.getConfigProperty("org.jfree.report.modules.gui.base.ProgressDialogEnabled")); //$NON-NLS-1$
if (progressBarEnabled)
{
progressBar = new ReportProgressBar();
progressBar.setVisible(false);
previewPane.addReportProgressListener(progressBar);
previewPane.addPropertyChangeListener(new PreviewPanePropertyChangeHandler());
}
else
{
progressBar = null;
}
if (progressDialogEnabled)
{
progressDialog = new ReportProgressDialog(this);
final JFreeReport reportJob = previewPane.getReportJob();
if (reportJob == null || reportJob.getTitle() == null)
{
progressDialog.setTitle(messages.getString("ProgressDialog.EMPTY_TITLE"));
progressDialog.setMessage(messages.getString("ProgressDialog.EMPTY_TITLE"));
}
else
{
progressDialog.setTitle(messages.getString("ProgressDialog.TITLE", reportJob.getTitle()));
progressDialog.setMessage(messages.getString("ProgressDialog.TITLE", reportJob.getTitle()));
}
progressDialog.pack();
}
else
{
progressDialog = null;
}
final JComponent extensionArea = statusBar.getExtensionArea();
extensionArea.setLayout(new BoxLayout(extensionArea, BoxLayout.X_AXIS));
if (progressBar != null)
{
extensionArea.add(progressBar);
}
extensionArea.add(pageLabel);
final JComponent contentPane = new JPanel();
contentPane.setLayout(new BorderLayout());
contentPane.add(previewPane, BorderLayout.CENTER);
contentPane.add(statusBar, BorderLayout.SOUTH);
setContentPane(contentPane);
updateMenu(previewPane.getMenu());
setTitle(previewPane.getTitle());
statusBar.setIconTheme(previewPane.getIconTheme());
statusBar.setStatus(previewPane.getStatusType(), previewPane.getStatusText());
}
|
public boolean isToolbarFloatable() {
return previewPane.isToolbarFloatable();
}
|
public void setIconTheme(IconTheme theme) {
previewPane.setIconTheme(theme);
}
|
public void setReportController(ReportController reportController) {
previewPane.setReportController(reportController);
}
|
public void setReportJob(JFreeReport reportJob) {
previewPane.setReportJob(reportJob);
}
|
public void setToolbarFloatable(boolean toolbarFloatable) {
previewPane.setToolbarFloatable(toolbarFloatable);
}
|
public void setZoom(double zoom) {
previewPane.setZoom(zoom);
}
|