Revision 4487 trunk/extensions/extCAD/src/com/iver/cit/gvsig/NewTheme.java
NewTheme.java | ||
---|---|---|
20 | 20 |
import com.iver.cit.gvsig.fmap.layers.LayerFactory; |
21 | 21 |
import com.iver.cit.gvsig.gui.View; |
22 | 22 |
import com.iver.cit.gvsig.gui.cad.MyFinishAction; |
23 |
import com.iver.cit.gvsig.gui.cad.WizardAndami; |
|
23 | 24 |
import com.iver.cit.gvsig.gui.cad.panels.ChooseGeometryType; |
24 | 25 |
import com.iver.cit.gvsig.gui.cad.panels.JPanelFieldDefinition; |
25 | 26 |
import com.iver.cit.gvsig.gui.cad.panels.ShpPanel; |
... | ... | |
52 | 53 |
|
53 | 54 |
LOGO = new javax.swing.ImageIcon(this.getClass().getClassLoader() |
54 | 55 |
.getResource("images/package_graphics.png")); |
55 |
// new |
|
56 |
// ImageIcon(DefaultJWizardComponents.class.getResource("images/logo.jpeg")); |
|
57 | 56 |
|
58 |
SimpleLogoJWizardFrame wizardFrame = new SimpleLogoJWizardFrame( |
|
57 |
/* SimpleLogoJWizardFrame wizardFrame = new SimpleLogoJWizardFrame(
|
|
59 | 58 |
LOGO); |
60 | 59 |
wizardFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); |
61 | 60 |
|
62 | 61 |
SwingUtilities.updateComponentTreeUI(wizardFrame); |
63 | 62 |
|
64 |
wizardFrame.setTitle("Creaci?n de un nuevo Tema"); |
|
63 |
wizardFrame.setTitle("Creaci?n de un nuevo Tema"); */ |
|
64 |
WizardAndami wizard = new WizardAndami(LOGO); |
|
65 | 65 |
|
66 | 66 |
DriverManager writerManager = LayerFactory.getDM(); |
67 | 67 |
ArrayList spatialDrivers = new ArrayList(); |
... | ... | |
73 | 73 |
spatialDrivers.add(drv.getName()); |
74 | 74 |
} |
75 | 75 |
|
76 |
ChooseGeometryType panelChoose = new ChooseGeometryType(wizardFrame.getWizardComponents());
|
|
77 |
JPanelFieldDefinition panelFields = new JPanelFieldDefinition(wizardFrame.getWizardComponents());
|
|
78 |
wizardFrame.getWizardComponents().addWizardPanel(panelChoose);
|
|
76 |
ChooseGeometryType panelChoose = new ChooseGeometryType(wizard.getWizardComponents()); |
|
77 |
JPanelFieldDefinition panelFields = new JPanelFieldDefinition(wizard.getWizardComponents()); |
|
78 |
wizard.getWizardComponents().addWizardPanel(panelChoose); |
|
79 | 79 |
|
80 |
wizardFrame.getWizardComponents().addWizardPanel(panelFields);
|
|
80 |
wizard.getWizardComponents().addWizardPanel(panelFields); |
|
81 | 81 |
|
82 | 82 |
if (actionCommand.equals("SHP")) |
83 | 83 |
{ |
84 | 84 |
panelChoose.setDriver((ISpatialWriter) writerManager.getDriver("gvSIG shp driver")); |
85 |
wizardFrame.getWizardComponents().addWizardPanel(
|
|
86 |
new ShpPanel(wizardFrame.getWizardComponents()));
|
|
85 |
wizard.getWizardComponents().addWizardPanel( |
|
86 |
new ShpPanel(wizard.getWizardComponents())); |
|
87 | 87 |
|
88 |
wizardFrame.getWizardComponents().setFinishAction(
|
|
89 |
new MyFinishAction(wizardFrame.getWizardComponents(),
|
|
90 |
vista.getMapControl(), actionCommand));
|
|
88 |
wizard.getWizardComponents().setFinishAction( |
|
89 |
new MyFinishAction(wizard.getWizardComponents(), |
|
90 |
vista, actionCommand)); |
|
91 | 91 |
} |
92 | 92 |
if (actionCommand.equals("DXF")) |
93 | 93 |
{ |
94 |
wizardFrame.getWizardComponents().addWizardPanel(
|
|
95 |
new SimpleLabelWizardPanel(wizardFrame
|
|
94 |
wizard.getWizardComponents().addWizardPanel( |
|
95 |
new SimpleLabelWizardPanel(wizard |
|
96 | 96 |
.getWizardComponents(), new JLabel("Done!"))); |
97 | 97 |
} |
98 | 98 |
if (actionCommand.equals("POSTGIS")) |
99 | 99 |
{ |
100 |
wizardFrame.getWizardComponents().addWizardPanel(
|
|
101 |
new SimpleLabelWizardPanel(wizardFrame
|
|
100 |
wizard.getWizardComponents().addWizardPanel( |
|
101 |
new SimpleLabelWizardPanel(wizard |
|
102 | 102 |
.getWizardComponents(), new JLabel("Done!"))); |
103 | 103 |
} |
104 | 104 |
|
105 |
wizardFrame.setSize(540, 350); |
|
106 |
Utilities.centerComponentOnScreen(wizardFrame); |
|
107 |
wizardFrame.show(); |
|
105 |
wizard.getViewInfo().setWidth(540); |
|
106 |
wizard.getViewInfo().setHeight(350); |
|
107 |
wizard.getViewInfo().setTitle(PluginServices.getText(this,"new_theme")); |
|
108 |
// Utilities.centerComponentOnScreen(wizard); |
|
109 |
// wizardFrame.show(); |
|
110 |
PluginServices.getMDIManager().addView(wizard); |
|
108 | 111 |
// System.out.println("Salgo con " + panelChoose.getLayerName()); |
109 | 112 |
} |
110 | 113 |
} |
Also available in: Unified diff