Logo Search packages:      
Sourcecode: pcalendar version File versions  Download package

void net::sf::linuxorg::pcal::MainWindow::loadFileHandler ( final File  selectedFile,
char[]  password 
) [inline, private]

This method is responsible for the actual file loading

Parameters:
selectedFile
password- a password to be used for the file decryption. Can be null or empty for unencrypted files.

Definition at line 1471 of file MainWindow.java.

References loadFileHandler(), net::sf::linuxorg::pcal::engine::Engine::loadFromFile(), setBusyCursor(), showPasswordWindow(), and updateWindowTitle().

                                                                             {
            setBusyCursor(true);
            try {
                  PCalendar.engine.loadFromFile(selectedFile, password);
                  updateWindowTitle();
            } catch (SAXException e1) {
                  JOptionPane.showMessageDialog(frame,
                              Messages.getString("MainWindow.93") + e1.getMessage() , //$NON-NLS-1$
                              Messages.getString("MainWindow.94"), //$NON-NLS-1$
                              JOptionPane.ERROR_MESSAGE);
            } catch (IOException e1) {
                  JOptionPane.showMessageDialog(frame,
                              Messages.getString("MainWindow.95") + e1.getMessage() , //$NON-NLS-1$
                              Messages.getString("MainWindow.96"), //$NON-NLS-1$
                              JOptionPane.ERROR_MESSAGE);
            } catch (ParserConfigurationException e1) {
                  JOptionPane.showMessageDialog(frame,
                              Messages.getString("MainWindow.97") + e1.getMessage() , //$NON-NLS-1$
                              Messages.getString("MainWindow.98"), //$NON-NLS-1$
                              JOptionPane.ERROR_MESSAGE);
            } catch (PasswordRequiredException e) {
                  // showPasswordWindow will block the gui unil the password will be entered
                  char[] pwd = showPasswordWindow();
                  if(pwd!=null) {
                        if(pwd.length>0) {
                              loadFileHandler(selectedFile, pwd);
                        }
                  }                 
            }
            setBusyCursor(false);
      }

Here is the call graph for this function:


Generated by  Doxygen 1.6.0   Back to index