| | |
| | | |
| | | private GuiApplication application; |
| | | |
| | | private QuickSetup quickSetup; |
| | | |
| | | private boolean forceToDisplay; |
| | | |
| | | /** |
| | | * Constructor of QuickSetupDialog. |
| | | * @param app Application to run in as a wizard |
| | | * @param installStatus of the current environment |
| | | * @param qs QuickSetup acting as controller |
| | | */ |
| | | public QuickSetupDialog(GuiApplication app, |
| | | CurrentInstallStatus installStatus) |
| | | CurrentInstallStatus installStatus, |
| | | QuickSetup qs) |
| | | { |
| | | if (app == null) { |
| | | throw new IllegalArgumentException("application cannot be null"); |
| | | } |
| | | this.application = app; |
| | | this.installStatus = installStatus; |
| | | |
| | | this.quickSetup = qs; |
| | | frame = new JFrame(application.getFrameTitle()); |
| | | frame.getContentPane().add(getFramePanel()); |
| | | frame.addWindowListener(new WindowAdapter() { |
| | |
| | | { |
| | | displayedStep = step; |
| | | // First call the panels to do the required updates on their layout |
| | | getButtonsPanel().setDisplayedStep(step); |
| | | getButtonsPanel().updateButtons(step); |
| | | getStepsPanel().setDisplayedStep(step, userData); |
| | | getCurrentStepPanel().setDisplayedStep(step, userData); |
| | | } |
| | |
| | | if (stepsPanel == null) |
| | | { |
| | | stepsPanel = new StepsPanel(application); |
| | | stepsPanel.setQuickSetup(quickSetup); |
| | | } |
| | | return stepsPanel; |
| | | } |
| | |
| | | { |
| | | if (currentStepPanel == null) |
| | | { |
| | | currentStepPanel = new CurrentStepPanel(application); |
| | | currentStepPanel = new CurrentStepPanel(application, quickSetup); |
| | | } |
| | | return currentStepPanel; |
| | | } |
| | |
| | | if (buttonsPanel == null) |
| | | { |
| | | buttonsPanel = new ButtonsPanel(application); |
| | | buttonsPanel.setQuickSetup(quickSetup); |
| | | } |
| | | return buttonsPanel; |
| | | } |
| | |
| | | installedPanel = new QuickSetupErrorPanel( |
| | | application, |
| | | installStatus); |
| | | installedPanel.setQuickSetup(quickSetup); |
| | | } |
| | | return installedPanel; |
| | | } |