001 package org.springframework.richclient.samples.showcase.wizard;
002
003 import javax.swing.JComponent;
004 import javax.swing.JLabel;
005 import javax.swing.JPanel;
006
007 import org.springframework.core.io.Resource;
008 import org.springframework.richclient.application.setup.SetupLicenseWizardPage;
009 import org.springframework.richclient.wizard.AbstractWizard;
010 import org.springframework.richclient.wizard.AbstractWizardPage;
011
012 public class InstallWizard extends AbstractWizard {
013
014 private Resource licenseResource;
015
016 public void setLicenseResource(Resource licenseResource) {
017 this.licenseResource = licenseResource;
018 }
019
020 public void addPages() {
021 addPage(new SetupLicenseWizardPage(licenseResource));
022 addPage(new DirectoryInputPage());
023 }
024
025 protected boolean onFinish() {
026 return true;
027 }
028
029 private class DirectoryInputPage extends AbstractWizardPage {
030 public DirectoryInputPage() {
031 super("directoryInputPage");
032 }
033
034 protected JComponent createControl() {
035 JPanel panel = new JPanel();
036 panel.add(new JLabel("directory input"));
037 return panel;
038 }
039 }
040 }