JPedal 4.74b27 Click here for Tutorials, code examples, help forums and support

org.jpedal.examples.simpleviewer.gui.popups
Class SignWizardModel

java.lang.Object
  extended by org.jpedal.examples.simpleviewer.gui.popups.SignWizardModel
All Implemented Interfaces:
WizardPanelModel

public class SignWizardModel
extends java.lang.Object
implements WizardPanelModel

This class implements the WizardPanelModel and in this case contains the JPanels to be drawn as inner classes. The methods in SignWizardModel are mainly concerned with controlling what panels are next and whether they can be currently reached.


Field Summary
static java.lang.String NO_FILE_SELECTED
           
 
Constructor Summary
SignWizardModel(SignData signData, java.lang.String pdfFile, java.lang.String rootDir)
           
 
Method Summary
 boolean canAdvance()
          Indicates whether the next or finish button can be enabled.
 void close()
          To avoid memory leaks I want to close the decoder I opened in this class when ever the dialog is closed.
 java.util.Map getJPanels()
          A map of the JPanels the Wizard Dialog should contain.
 java.lang.String getStartPanelID()
           
 boolean hasPrevious()
           
 boolean isFinishPanel()
           
 java.lang.String next()
          Advance to the next JPanel.
 java.lang.String previous()
          Set the current JPanel to the previous JPanel.
 void registerNextChangeListeners(javax.swing.event.ChangeListener wizard)
          When an event is triggered with one of the registered panels the wizard will call back this class and check if the panel can be advanced.
 void registerNextKeyListeners(java.awt.event.KeyListener wizard)
          Same as the previous method but listens for key changes instead.
 void updateSignData()
          Harvest user data from the currently displayed panel
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NO_FILE_SELECTED

public static final java.lang.String NO_FILE_SELECTED
Constructor Detail

SignWizardModel

public SignWizardModel(SignData signData,
                       java.lang.String pdfFile,
                       java.lang.String rootDir)
Parameters:
signData - Will contain all the information acquired from the user for signing a Pdf
pdfFile - The path to the Pdf document to be signed.
Method Detail

getJPanels

public java.util.Map getJPanels()
A map of the JPanels the Wizard Dialog should contain.

Specified by:
getJPanels in interface WizardPanelModel
Returns:
The ID strings mapped to their corresponding JPanels

next

public java.lang.String next()
Advance to the next JPanel.

Specified by:
next in interface WizardPanelModel
Returns:
Unique identifier for the now current JPanel

previous

public java.lang.String previous()
Set the current JPanel to the previous JPanel.

Specified by:
previous in interface WizardPanelModel
Returns:
Unique identifier for the now current JPanel

hasPrevious

public boolean hasPrevious()
Specified by:
hasPrevious in interface WizardPanelModel
Returns:
true if the current panel has a previous panel

getStartPanelID

public java.lang.String getStartPanelID()
Specified by:
getStartPanelID in interface WizardPanelModel
Returns:
The unique ID String of the first JPanel to be shown

isFinishPanel

public boolean isFinishPanel()
Specified by:
isFinishPanel in interface WizardPanelModel
Returns:
true if the currently displayed panel requires a Finish box instead of a next box.

canAdvance

public boolean canAdvance()
Indicates whether the next or finish button can be enabled.

Specified by:
canAdvance in interface WizardPanelModel
Returns:
true if the current panel can be advanced in its current state

updateSignData

public void updateSignData()
Harvest user data from the currently displayed panel


registerNextChangeListeners

public void registerNextChangeListeners(javax.swing.event.ChangeListener wizard)
When an event is triggered with one of the registered panels the wizard will call back this class and check if the panel can be advanced.

Specified by:
registerNextChangeListeners in interface WizardPanelModel
Parameters:
wizard - Listeners to enable/disable advance button

registerNextKeyListeners

public void registerNextKeyListeners(java.awt.event.KeyListener wizard)
Same as the previous method but listens for key changes instead.

Specified by:
registerNextKeyListeners in interface WizardPanelModel
Parameters:
wizard - Listeners to enable/disable advance button

close

public void close()
To avoid memory leaks I want to close the decoder I opened in this class when ever the dialog is closed. Also collects any last data.

Specified by:
close in interface WizardPanelModel

JPedal 4.74b27 Click here for Tutorials, code examples, help forums and support

JPedal 4.74b27 Click here for Tutorials, code examples, help forums and support