if (jcheckboxResOneTableAtTime.isSelected())
options += FBBackupManager.RESTORE_ONE_AT_A_TIME;
if (jcheckboxResUseAllSpace.isSelected())
options += FBBackupManager.RESTORE_USE_ALL_SPACE;
FBBackupManager bckManager = new FBBackupManager();
if (jcheckboxResPageSize.isSelected())
bckManager.setRestorePageSize(Integer.parseInt(jtextfieldPageSize.getText()));
bckManager.setRestoreReplace(jcheckboxResReplaceDatabase.isSelected());
bckManager.setBackupPath(jtextfieldResBackupFile.getText());
bckManager.setDatabase(jtextfieldResDBFile.getText());
bckManager.setHost(jtextfieldResDBHost.getText());
bckManager.setPort(Integer.parseInt(jtextfieldResPort.getText()));
bckManager.setUser(jtextfieldUsername.getText());
bckManager.setPassword(new String(jpasswordfieldPW.getPassword()));
TextAreaOutputStream textOutputStream = new TextAreaOutputStream(jtextareaProcess, jscrollpaneProcess);
bckManager.setLogger(textOutputStream);
bckManager.setVerbose(jcheckboxDisplayProcess.isSelected());
try {
jtextareaProcess.setText("");
if (options == 0) {
bckManager.restoreDatabase();
} else {
bckManager.restoreDatabase(options);
}
jtextareaProcess.append(i18n.INFO_RESTORE_COMPLETED);
} catch (SQLException e) {
jtextareaProcess.append(e.getLocalizedMessage()+ CR + i18n.INFO_RESTORE_CANCELED);
}