Statistics
| Revision:

root / trunk / extensions / extCAD / src / com / iver / cit / gvsig / SimpleDynamicLogoJWizard.java @ 4364

History | View | Annotate | Download (3.47 KB)

1
package com.iver.cit.gvsig;
2

    
3
import java.beans.PropertyChangeEvent;
4
import java.beans.PropertyChangeListener;
5
import java.io.File;
6

    
7
import javax.swing.ImageIcon;
8
import javax.swing.JFrame;
9
import javax.swing.JLabel;
10
import javax.swing.SwingUtilities;
11
import javax.swing.UIManager;
12

    
13
import com.hardcode.driverManager.WriterManager;
14
import com.iver.cit.gvsig.fmap.edition.writers.shp.ShpWriter;
15
import com.iver.cit.gvsig.fmap.layers.LayerFactory;
16
import com.iver.cit.gvsig.gui.cad.panels.ChooseGeometryType;
17
import com.iver.cit.gvsig.gui.cad.panels.ChooseWriteDriver;
18

    
19
import jwizardcomponent.JWizardPanel;
20
import jwizardcomponent.Utilities;
21
import jwizardcomponent.example.SimpleDynamicWizardPanel;
22
import jwizardcomponent.example.SimpleLabelWizardPanel;
23
import jwizardcomponent.frame.SimpleLogoJWizardFrame;
24

    
25
/**
26
 * <p>Title: JWizardComponent</p>
27
 * <p>Description: Swing-Based Wizard Framework for Wizards</p>
28
 * <p>Copyright (C) 2003 William Ready
29
 * 
30
 * <br>This library is free software; you can redistribute it and/or
31
 * <br>modify it under the terms of the GNU Lesser General Public
32
 * <br>License as published by the Free Software Foundation; either
33
 * <br>version 2.1 of the License, or (at your option) any later version.
34
 *
35
 * <br>This library is distributed in the hope that it will be useful,
36
 * <br>but WITHOUT ANY WARRANTY; without even the implied warranty of
37
 * <br>MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
38
 * <br>See the GNU Lesser General Public License for more details.
39
 *
40
 * <br>To receive a copy of the GNU Lesser General Public License 
41
 * <br>write to:  The Free Software Foundation, Inc., 
42
 * <br>59 Temple Place, Suite 330 
43
 * <br>Boston, MA 02111-1307 USA</p>
44
 * @author William Ready
45
 * @version 1.0
46
 */
47

    
48
public class SimpleDynamicLogoJWizard {
49

    
50
  static ImageIcon LOGO;
51

    
52
  public static void main(String [] args) {
53
    try {
54
            
55
            LOGO = new javax.swing.ImageIcon("images/package_graphics.png");
56
                        // new ImageIcon(DefaultJWizardComponents.class.getResource("images/logo.jpeg"));
57

    
58
      SimpleLogoJWizardFrame wizardFrame = new SimpleLogoJWizardFrame(
59
          LOGO);
60
      wizardFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
61

    
62
      UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
63
      SwingUtilities.updateComponentTreeUI(wizardFrame);
64
      
65
      wizardFrame.setTitle("Nuevo tema");
66

    
67
      /* wizardFrame.getWizardComponents().addWizardPanel(
68
          new SimpleLabelWizardPanel(wizardFrame.getWizardComponents(),
69
          new JLabel("Dynamic Test"))); */
70
      LayerFactory.setWritersPath("D:/eclipse/workspace/_fwAndami/gvSIG/extensiones/com.iver.cit.gvsig/writers");
71
      
72
      WriterManager writerManager = LayerFactory.getWM(); 
73
      
74
      
75

    
76
      wizardFrame.getWizardComponents().addWizardPanel(
77
                      new ChooseWriteDriver(wizardFrame.getWizardComponents(),
78
              "Dynamic Test", writerManager.getWriterNames())); 
79
      
80
      wizardFrame.getWizardComponents().addWizardPanel(
81
              new ChooseGeometryType(wizardFrame.getWizardComponents()));
82

    
83
      
84
      wizardFrame.getWizardComponents().addWizardPanel(
85
          new SimpleDynamicWizardPanel(wizardFrame.getWizardComponents()));
86

    
87
      wizardFrame.getWizardComponents().addWizardPanel(
88
          new SimpleLabelWizardPanel(wizardFrame.getWizardComponents(),
89
          new JLabel("Done!")));
90
      wizardFrame.setSize(500, 300);
91
      
92
      Utilities.centerComponentOnScreen(wizardFrame);
93
      wizardFrame.show();
94

    
95
    } catch (Exception e) {
96
      e.printStackTrace();
97
    }
98
  }
99

    
100
}