|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
java.awt.Window
java.awt.Dialog
javax.swing.JDialog
org.jfree.report.modules.gui.pdf.PDFSaveDialog
A dialog that is used to perform the printing of a report into a PDF file. It is primarily
used to edit the properties of the PDFOutputTarget
before the target is used to print
the report.
The main method to call the dialog is PDFSaveDialog.savePDF(). Given a report and a pageformat, the dialog is shown and if the user approved the dialog, the pdf is saved using the settings made in the dialog.
Nested Class Summary |
Nested classes inherited from class javax.swing.JDialog |
javax.swing.JDialog.AccessibleJDialog |
Nested classes inherited from class java.awt.Dialog |
java.awt.Dialog.AccessibleAWTDialog |
Nested classes inherited from class java.awt.Window |
java.awt.Window.AccessibleAWTWindow |
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 |
BASE_RESOURCE_CLASS
The base resource class. |
Fields inherited from class javax.swing.JDialog |
accessibleContext, rootPane, rootPaneCheckingEnabled |
Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface javax.swing.WindowConstants |
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, EXIT_ON_CLOSE, HIDE_ON_CLOSE |
Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
PDFSaveDialog()
Creates a new PDF save dialog. |
|
PDFSaveDialog(java.awt.Dialog owner)
Creates a new PDF save dialog. |
|
PDFSaveDialog(java.awt.Frame owner)
Creates a new PDF save dialog. |
Method Summary | |
void |
clear()
Clears all selections, input fields and set the selected encryption level to none. |
protected javax.swing.Action |
getActionCancel()
Returns a single instance of the dialog cancel action. |
java.lang.String |
getAuthor()
Gets the author of this report. |
java.util.Properties |
getDialogContents()
Returns the user input of this dialog as properties collection. |
java.lang.String |
getEncoding()
Returns the selected encoding. |
java.lang.String |
getEncryptionValue()
Queries the currently selected encryption. |
java.lang.String |
getFilename()
Defines the filename of the pdf file. |
java.lang.String |
getOwnerPassword()
Returns the owner password for the pdf file. |
java.lang.String |
getPDFTitle()
Defines the title of the pdf file. |
protected java.util.ResourceBundle |
getResources()
Retrieves the resources for this PreviewFrame. |
java.lang.String |
getUserPassword()
returns the defined user password for the pdf file. |
void |
initFromConfiguration(ReportConfiguration config)
Initialises the PDF save dialog from the settings in the report configuration. |
boolean |
isAllowAssembly()
Gets the AllowAssembly permission for the generated PDF-file. |
boolean |
isAllowCopy()
Defines whether the contents of the file are allowed to be copied. |
boolean |
isAllowDegradedPrinting()
Gets the AllowDegradedPrinting permission for the generated PDF-file. |
boolean |
isAllowFillIn()
Defines whether the contents of form fields may be changed by the user. |
boolean |
isAllowModifyAnnotations()
Defines whether the user is allowed to add or modify annotations in this file. |
boolean |
isAllowModifyContents()
Defines whether the user is allowed to modify the contents of this file. |
boolean |
isAllowPrinting()
Defines whether the user is allowed to print the file. |
boolean |
isAllowScreenreaders()
Defines whether the generated pdf may accessed using screenreaders. |
boolean |
isConfirmed()
Gets the confirmation state of the dialog. |
static void |
main(java.lang.String[] args)
For debugging. |
boolean |
performQueryForExport(JFreeReport report)
Opens the dialog to query all necessary input from the user. |
protected void |
performSelectFile()
selects a file to use as target for the report processing. |
boolean |
performValidate()
Validates the contents of the dialogs input fields. |
void |
setAllowAssembly(boolean allowAssembly)
Defines whether the generated pdf may be reassembled. |
void |
setAllowCopy(boolean allowCopy)
Defines whether the contents of the file are allowed to be copied. |
void |
setAllowFillIn(boolean allowFillIn)
Defines whether the contents of form fields may be changed by the user. |
void |
setAllowModifyAnnotations(boolean allowModifyAnnotations)
Defines whether the user is allowed to add or modify annotations in this file. |
void |
setAllowModifyContents(boolean allowModifyContents)
Defines whether the user is allowed to modify the contents of this file. |
void |
setAllowScreenreaders(boolean allowScreenreaders)
Defines whether the generated pdf may accessed using screenreaders. |
void |
setAuthor(java.lang.String author)
Defines the Author of the report. |
protected void |
setConfirmed(boolean confirmed)
Defines whether this dialog has been finished using the 'OK' or the 'Cancel' option. |
void |
setDialogContents(java.util.Properties p)
Restores the user input from a properties collection. |
void |
setEncoding(java.lang.String encoding)
Sets the encoding. |
void |
setEncryptionValue(java.lang.String b)
Defines the currently selected encryption. |
void |
setFilename(java.lang.String filename)
Defines the filename of the pdf file. |
void |
setOwnerPassword(java.lang.String ownerPassword)
Defines the owner password for the pdf file. |
void |
setPDFTitle(java.lang.String title)
Defines the title of the pdf file. |
void |
setPrintLevel(boolean allowPrinting,
boolean degraded)
Defines whether the user is allowed to print the file. |
void |
setUserPassword(java.lang.String userPassword)
Defines the user password for the pdf file. |
void |
storeToConfiguration(ReportConfiguration config)
Stores the input from the dialog into the report configuration of the report. |
protected void |
updateSecurityPanelEnabled()
Updates the security panel state. |
Methods inherited from class javax.swing.JDialog |
addImpl, createRootPane, dialogInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getJMenuBar, getLayeredPane, getRootPane, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, update |
Methods inherited from class java.awt.Dialog |
addNotify, dispose, getTitle, hide, isModal, isResizable, isUndecorated, setModal, setResizable, setTitle, setUndecorated, show |
Methods inherited from class java.awt.Window |
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, finalize, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getGraphicsConfiguration, getInputContext, getListeners, getLocale, getMostRecentFocusOwner, getOwnedWindows, getOwner, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindowStateListeners, isActive, isFocusableWindow, isFocusCycleRoot, isFocused, isShowing, pack, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, setCursor, setFocusableWindowState, setFocusCycleRoot, setLocationRelativeTo, toBack, toFront |
Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, removeNotify, setFocusTraversalKeys, setFocusTraversalPolicy, setFont, 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, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isOpaque, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, size, toString, transferFocus, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final java.lang.String BASE_RESOURCE_CLASS
Constructor Detail |
public PDFSaveDialog(java.awt.Frame owner)
owner
- the dialog owner.public PDFSaveDialog(java.awt.Dialog owner)
owner
- the dialog owner.public PDFSaveDialog()
Method Detail |
protected void updateSecurityPanelEnabled()
protected java.util.ResourceBundle getResources()
protected javax.swing.Action getActionCancel()
public java.lang.String getUserPassword()
public void setUserPassword(java.lang.String userPassword)
userPassword
- the defined password. The password can be null.public java.lang.String getOwnerPassword()
public void setOwnerPassword(java.lang.String ownerPassword)
ownerPassword
- the defined password. The password can be null.public java.lang.String getEncoding()
public void setEncoding(java.lang.String encoding)
encoding
- the encoding (name).public boolean isAllowDegradedPrinting()
public boolean isAllowAssembly()
public void setAllowAssembly(boolean allowAssembly)
allowAssembly
- the flag.public boolean isAllowScreenreaders()
public void setAllowScreenreaders(boolean allowScreenreaders)
allowScreenreaders
- a flag containing true, if screenreaders are allowed to access the
content of this file, false otherwisepublic boolean isAllowFillIn()
public void setAllowFillIn(boolean allowFillIn)
allowFillIn
- set to true to allow the change/filling of form fieldspublic boolean isAllowCopy()
public void setAllowCopy(boolean allowCopy)
allowCopy
- set to true, if the user is allowed to copy the contents of the file.public boolean isAllowModifyAnnotations()
public void setAllowModifyAnnotations(boolean allowModifyAnnotations)
allowModifyAnnotations
- the flag.public boolean isAllowModifyContents()
public void setAllowModifyContents(boolean allowModifyContents)
allowModifyContents
- set to true, if this files content can be modified, false otherwisepublic boolean isAllowPrinting()
public void setPrintLevel(boolean allowPrinting, boolean degraded)
allowDegradedPrinting
allowPrinting
- set to true
, if this file can be printed,
false
otherwise.degraded
- set to true
, to allow degraded printing, and false
otherwise.public java.lang.String getFilename()
public void setFilename(java.lang.String filename)
filename
- the filename of the pdf filepublic java.lang.String getPDFTitle()
public void setPDFTitle(java.lang.String title)
title
- the titlepublic java.lang.String getAuthor()
public void setAuthor(java.lang.String author)
author
- the name of the author.public java.lang.String getEncryptionValue()
null
is
returned. If no encryption is set, the security properties have no defined state.
public void setEncryptionValue(java.lang.String b)
b
- the new encryption state, one of null, Boolean.TRUE or Boolean.FALSEpublic boolean isConfirmed()
protected void setConfirmed(boolean confirmed)
confirmed
- set to true, if OK was pressed, false otherwisepublic void clear()
public java.util.Properties getDialogContents()
public void setDialogContents(java.util.Properties p)
p
- the user input.protected void performSelectFile()
public boolean performValidate()
public boolean performQueryForExport(JFreeReport report)
report
- the report that should be processed.
public void storeToConfiguration(ReportConfiguration config)
config
- the report configuration that should receive the new
settings.public void initFromConfiguration(ReportConfiguration config)
config
- the report configuration.public static void main(java.lang.String[] args)
args
- ignored.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |