/*Called when the panel is set. Real istallation will start from here */ @Override public void display() { progressBar.setIndeterminate(true); // now start the real installation!! final BatchInstaller batch = new BatchInstaller( WizardSettingsContainer.getInstance().getDbInfos(), WizardSettingsContainer.getInstance().getInstallDirectoryPath(), progressBar, progressString, WizardSettingsContainer.getInstance().isInitDB(), WizardSettingsContainer.getInstance().isInstallDesigner()); // Execute installation task in background: GUI is still responsive :) SwingWorker<String, Object> worker = new SwingWorker() { public String doInBackground() { batch.doInstall(); ActualInstallationWizardPanel.this.remove(progressBar); waitLabel.setText("Installation Completed"); reallyFinisehd = true; ActualInstallationWizardPanel.this.repaint(); return "finished"; } protected void done() { progressBar.setEnabled(false); } }; worker.execute(); }
@Override public void finish() { String tempDirPath = WizardSettingsContainer.getInstance().getInstallDirectoryPath() + "/tmp"; tempDirPath = tempDirPath.replace('/', '\\'); File tmpDir = new File(tempDirPath); if (tmpDir.exists()) { // delete temp directory for (File toDel : tmpDir.listFiles()) { toDel.delete(); } tmpDir.delete(); } }