com.icesoft.pdf.ri.common
Class MyGUISecurityCallback

java.lang.Object
  extended bycom.icesoft.pdf.ri.common.MyGUISecurityCallback
All Implemented Interfaces:
SecurityCallback

public class MyGUISecurityCallback
extends Object
implements SecurityCallback

This class is reference code for displaying a password dialog box for encrypted PDF documents.

Since:
1.1
Author:
Patrick Corless

Constructor Summary
MyGUISecurityCallback(JFrame frame, ResourceBundle messageBundle)
          Create a new instance of a SecurityCallback.
 
Method Summary
 String requestPassword(Document document)
          This method is called when a security manager needs to receive a password for opening an encrypted PDF document.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MyGUISecurityCallback

public MyGUISecurityCallback(JFrame frame,
                             ResourceBundle messageBundle)
Create a new instance of a SecurityCallback. This class displays a dialog when the requestPassword method is called to retrieve the document's password from the user.

Parameters:
frame - frame that the dialog will be centered on.
Method Detail

requestPassword

public String requestPassword(Document document)
Description copied from interface: SecurityCallback
This method is called when a security manager needs to receive a password for opening an encrypted PDF document.

Specified by:
requestPassword in interface SecurityCallback
Parameters:
document - document being opened.