org.pdfsam.guiclient.utils
Class DialogUtility

java.lang.Object
  extended by org.pdfsam.guiclient.utils.DialogUtility

public class DialogUtility
extends java.lang.Object

Utility to show dialogs

Author:
Andrea Vacondio

Field Summary
static int AT_LEAST_ONE_DOC
           
static int DIRECTORY_DESTINATION
           
static int FILE_DESTINATION
           
static int ONE_DOC
           
static int TWO_DOC
           
 
Constructor Summary
DialogUtility()
           
 
Method Summary
static java.lang.String askForDocumentPasswordDialog(java.awt.Component comp, java.lang.String filename)
          Show a dialog to ask the user for the document password
static int askForEmptySelectionPanel(java.awt.Component comp)
          Shows a yes/no confirmation dialog to ask the user if he wants to empty the selection list
static int askForOverwriteConfirmation(java.awt.Component comp)
          Shows a yes/no/cancel asking the user for a confirmation about the overwrite check
static int askForOverwriteOutputFileDialog(java.awt.Component comp, java.lang.String filename)
          Shows a yes/no/cancel dialog to ask the user about overwriting output file
static int askForPdfVersionConfilct(java.awt.Component comp, java.lang.String lowestVersion)
          Shows a yes/no confirmation dialog to ask the user if he wants to continue even if the selected pdf version is lower than the lowest available
static void errorGenericDialog(java.awt.Component comp, java.lang.String title, java.lang.String message)
          Generic error dialog
static void errorValidatingBounds(java.awt.Component comp, java.lang.String bounds)
          Shows an error dialog
static int showConfirmOuputLocationDialog(java.awt.Component comp, java.lang.String suggestedDir)
          Shows a yes/no/cancel dialog to ask for change the output directory
static void showWarningAddingDocument(java.awt.Component comp)
          Shows a warning dialog telling the user that the selection panel is still adding files.
static void showWarningNoDestinationSelected(java.awt.Component comp, int msgType)
          Shows a warning dialog telling the user that the destination is not set
static void showWarningNoDocsSelected(java.awt.Component comp, int msgType)
          Shows a warning dialog telling the user that at least one document should be selected
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

AT_LEAST_ONE_DOC

public static final int AT_LEAST_ONE_DOC
See Also:
Constant Field Values

ONE_DOC

public static final int ONE_DOC
See Also:
Constant Field Values

TWO_DOC

public static final int TWO_DOC
See Also:
Constant Field Values

FILE_DESTINATION

public static final int FILE_DESTINATION
See Also:
Constant Field Values

DIRECTORY_DESTINATION

public static final int DIRECTORY_DESTINATION
See Also:
Constant Field Values
Constructor Detail

DialogUtility

public DialogUtility()
Method Detail

showConfirmOuputLocationDialog

public static int showConfirmOuputLocationDialog(java.awt.Component comp,
                                                 java.lang.String suggestedDir)
Shows a yes/no/cancel dialog to ask for change the output directory

Parameters:
comp - parent component
suggestedDir - suggested directory
Returns:
an integer indicating the option chosen by the user

showWarningNoDocsSelected

public static void showWarningNoDocsSelected(java.awt.Component comp,
                                             int msgType)
Shows a warning dialog telling the user that at least one document should be selected

Parameters:
comp -
msgType - the type of the message

showWarningAddingDocument

public static void showWarningAddingDocument(java.awt.Component comp)
Shows a warning dialog telling the user that the selection panel is still adding files.

Parameters:
comp -
msgType -

showWarningNoDestinationSelected

public static void showWarningNoDestinationSelected(java.awt.Component comp,
                                                    int msgType)
Shows a warning dialog telling the user that the destination is not set

Parameters:
comp -
msgType -

askForOverwriteOutputFileDialog

public static int askForOverwriteOutputFileDialog(java.awt.Component comp,
                                                  java.lang.String filename)
Shows a yes/no/cancel dialog to ask the user about overwriting output file

Parameters:
comp - parent component
filename - suggested directory
Returns:
an integer indicating the option chosen by the user

askForOverwriteConfirmation

public static int askForOverwriteConfirmation(java.awt.Component comp)
Shows a yes/no/cancel asking the user for a confirmation about the overwrite check

Parameters:
comp -
Returns:

errorValidatingBounds

public static void errorValidatingBounds(java.awt.Component comp,
                                         java.lang.String bounds)
Shows an error dialog

Parameters:
comp -
bounds -

errorGenericDialog

public static void errorGenericDialog(java.awt.Component comp,
                                      java.lang.String title,
                                      java.lang.String message)
Generic error dialog

Parameters:
comp -
title -
message -

askForDocumentPasswordDialog

public static java.lang.String askForDocumentPasswordDialog(java.awt.Component comp,
                                                            java.lang.String filename)
Show a dialog to ask the user for the document password

Parameters:
comp -
Returns:
an integer indicating the option chosen by the user

askForEmptySelectionPanel

public static int askForEmptySelectionPanel(java.awt.Component comp)
Shows a yes/no confirmation dialog to ask the user if he wants to empty the selection list

Parameters:
comp -
Returns:
an integer indicating the option chosen by the user

askForPdfVersionConfilct

public static int askForPdfVersionConfilct(java.awt.Component comp,
                                           java.lang.String lowestVersion)
Shows a yes/no confirmation dialog to ask the user if he wants to continue even if the selected pdf version is lower than the lowest available

Parameters:
comp -
lowestVersion -
Returns: