| | |
| | | setCurrentStep(application.getFirstWizardStep()); |
| | | } |
| | | |
| | | /** |
| | | * This method displays the setup dialog. |
| | | * This method must be called from the event thread. |
| | | */ |
| | | /** This method displays the setup dialog. This method must be called from the event thread. */ |
| | | public void display() |
| | | { |
| | | getDialog().packAndShow(); |
| | |
| | | * @param ev |
| | | * the ButtonEvent we receive. |
| | | */ |
| | | @Override |
| | | public void buttonActionPerformed(ButtonEvent ev) |
| | | { |
| | | switch (ev.getButtonName()) |
| | |
| | | * the ProgressUpdateEvent we receive. |
| | | * @see #runDisplayUpdater() |
| | | */ |
| | | @Override |
| | | public void progressUpdate(ProgressUpdateEvent ev) |
| | | { |
| | | synchronized (this) |
| | |
| | | |
| | | SwingUtilities.invokeLater(new Runnable() |
| | | { |
| | | @Override |
| | | public void run() |
| | | { |
| | | if (application.isFinished() && !getCurrentStep().isFinishedStep()) |
| | |
| | | { |
| | | BackgroundTask<?> worker = new BackgroundTask<Object>() |
| | | { |
| | | @Override |
| | | public Object processBackgroundTask() throws UserDataException |
| | | { |
| | | try |
| | |
| | | return null; |
| | | } |
| | | |
| | | @Override |
| | | public void backgroundTaskCompleted(Object returnValue, Throwable throwable) |
| | | { |
| | | getDialog().workerFinished(); |
| | |
| | | { |
| | | BackgroundTask<Object> worker = new BackgroundTask<Object>() |
| | | { |
| | | @Override |
| | | public Object processBackgroundTask() throws UserDataException |
| | | { |
| | | try |
| | |
| | | return null; |
| | | } |
| | | |
| | | @Override |
| | | public void backgroundTaskCompleted(Object returnValue, Throwable throwable) |
| | | { |
| | | getDialog().getFrame().setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR)); |
| | |
| | | new Thread(application, "Application Thread").start(); |
| | | Thread t = new Thread(new Runnable() |
| | | { |
| | | @Override |
| | | public void run() |
| | | { |
| | | runDisplayUpdater(); |
| | |
| | | return new ProgressDescriptor(status, ratio, newProgressLabel, LocalizableMessage.raw(progressDetails.toString())); |
| | | } |
| | | |
| | | /** |
| | | * This is a class used when the user clicks on next and that extends |
| | | * BackgroundTask. |
| | | */ |
| | | /** This is a class used when the user clicks on next and that extends BackgroundTask. */ |
| | | private class NextClickedBackgroundTask extends BackgroundTask<Object> |
| | | { |
| | | private WizardStep cStep; |
| | |
| | | this.cStep = cStep; |
| | | } |
| | | |
| | | @Override |
| | | public Object processBackgroundTask() throws UserDataException |
| | | { |
| | | try |
| | |
| | | return null; |
| | | } |
| | | |
| | | @Override |
| | | public void backgroundTaskCompleted(Object returnValue, Throwable throwable) |
| | | { |
| | | getDialog().workerFinished(); |