forked from geodmms/xdgnjobs

?? ?
2008-08-05 264ace6a491c915f47c61d49ef12bd08d8b5cce3
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
package com.ximple.eofms;
 
import java.awt.Dimension;
import javax.swing.JFrame;
import javax.swing.WindowConstants;
import javax.swing.JLabel;
 
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.awl.Wizard;
import org.awl.DefaultWizard;
import org.awl.DefaultWizardPageDescriptor;
import org.awl.WizardConstants;
 
public class XQuartzJobWizard
{
    static Log logger = LogFactory.getLog(XQuartzJobWizard.class);
 
    public static void main(String[] args)
    {
        Wizard wizard = new DefaultWizard((JFrame)null);
        initializeWizardComponent(wizard);
 
        wizard.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
        wizard.setTitle("Read a bad book...");
        wizard.setSize(new Dimension(430, 300));
        wizard.setVisible(true);
    }
 
    private static void initializeWizardComponent(Wizard wizard)
    {
        DefaultWizardPageDescriptor page1 = new DefaultWizardPageDescriptor();
        page1.setComponent(new JLabel("this is my first page"));
        page1.setDescription("my first page");
 
        DefaultWizardPageDescriptor page2 = new DefaultWizardPageDescriptor();
        page2.setComponent(new JLabel("this is my second page"));
        page2.setDescription("my second page");
 
        page1.setNextDescriptorId("2");
        page2.setPreviousDescriptorId("1");
        page1.setPreviousDescriptorId(WizardConstants.STARTING_DESCRIPTOR_ID);
        page2.setNextDescriptorId(WizardConstants.TERMINAL_DESCRIPTOR_ID);
 
        wizard.addPage(page1, "1");
        wizard.addPage(page2, "2");
    }
}