Revision 4385 trunk/extensions/extCAD/src/com/iver/cit/gvsig/gui/cad/MyFinishAction.java
MyFinishAction.java | ||
---|---|---|
2 | 2 |
|
3 | 3 |
import jwizardcomponent.FinishAction; |
4 | 4 |
import jwizardcomponent.JWizardComponents; |
5 |
import jwizardcomponent.JWizardPanel; |
|
6 | 5 |
|
6 |
import com.iver.cit.gvsig.fmap.drivers.FieldDescription; |
|
7 |
import com.iver.cit.gvsig.fmap.drivers.LayerDefinition; |
|
8 |
import com.iver.cit.gvsig.fmap.edition.ISpatialWriter; |
|
9 |
import com.iver.cit.gvsig.fmap.layers.LayerFactory; |
|
10 |
import com.iver.cit.gvsig.gui.cad.panels.ChooseGeometryType; |
|
11 |
import com.iver.cit.gvsig.gui.cad.panels.ChooseWriteDriver; |
|
12 |
import com.iver.cit.gvsig.gui.cad.panels.JPanelFieldDefinition; |
|
13 |
|
|
7 | 14 |
public class MyFinishAction extends FinishAction |
8 | 15 |
{ |
9 | 16 |
JWizardComponents myWizardComponents; |
10 | 17 |
FinishAction oldAction; |
18 |
LayerDefinition lyrDef = null; |
|
11 | 19 |
public MyFinishAction(JWizardComponents wizardComponents) { |
12 | 20 |
super(wizardComponents); |
13 | 21 |
oldAction = wizardComponents.getFinishAction(); |
... | ... | |
18 | 26 |
public void performAction() { |
19 | 27 |
// TODO Auto-generated method stub |
20 | 28 |
try { |
21 |
JWizardPanel lastPanel = myWizardComponents.getCurrentPanel(); |
|
29 |
ChooseWriteDriver driverPanel = (ChooseWriteDriver) myWizardComponents.getWizardPanel(0); |
|
30 |
ChooseGeometryType geometryTypePanel = (ChooseGeometryType) myWizardComponents.getWizardPanel(1); |
|
31 |
JPanelFieldDefinition fieldDefinitionPanel = (JPanelFieldDefinition) myWizardComponents.getWizardPanel(1); |
|
32 |
|
|
33 |
String layerName = driverPanel.getLayerName(); |
|
34 |
String selectedDriver = driverPanel.getSelectedDriver(); |
|
35 |
int geometryType = geometryTypePanel.getSelectedGeometryType(); |
|
36 |
FieldDescription[] fieldsDesc = fieldDefinitionPanel.getFieldsDescription(); |
|
37 |
|
|
38 |
ISpatialWriter drv = (ISpatialWriter) LayerFactory.getWM().getWriter(selectedDriver); |
|
39 |
|
|
22 | 40 |
} catch (Exception e) { |
23 | 41 |
// TODO Auto-generated catch block |
24 | 42 |
e.printStackTrace(); |
Also available in: Unified diff