Revision 593
org.gvsig.seismic/tags/org.gvsig.seismic-1.0.111/org.gvsig.seismic/pom.xml | ||
---|---|---|
1 |
<?xml version="1.0" encoding="ISO-8859-1"?> |
|
2 |
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
|
3 |
<modelVersion>4.0.0</modelVersion> |
|
4 |
<artifactId>org.gvsig.seismic</artifactId> |
|
5 |
<packaging>pom</packaging> |
|
6 |
<version>1.0.111</version> |
|
7 |
<name>org.gvsig.seismic</name> |
|
8 |
<description>Seismic Parser Driver</description> |
|
9 |
<parent> |
|
10 |
<groupId>org.gvsig</groupId> |
|
11 |
<artifactId>org.gvsig.desktop</artifactId> |
|
12 |
<version>2.0.298</version> |
|
13 |
</parent> |
|
14 |
<url>http://devel.gvsig.org/sites/org.gvsig.seismic/${project.version}</url> |
|
15 |
<scm> |
|
16 |
<connection>scm:svn:http://devel.gvsig.org/svn/gvsig-seismic/org.gvsig.seismic/tags/org.gvsig.seismic-1.0.111</connection> |
|
17 |
<developerConnection>scm:svn:http://devel.gvsig.org/svn/gvsig-seismic/org.gvsig.seismic/tags/org.gvsig.seismic-1.0.111</developerConnection> |
|
18 |
<url>http://devel.gvsig.org/svn/gvsig-seismic/org.gvsig.seismic/tags/org.gvsig.seismic-1.0.111</url> |
|
19 |
</scm> |
|
20 |
<developers> |
|
21 |
<developer> |
|
22 |
<id>jjdelcerro</id> |
|
23 |
<name>Joaqu�n Jos� del Cerro</name> |
|
24 |
<email>jjdelcerro@gvsig.org</email> |
|
25 |
<roles> |
|
26 |
<role>Architect</role> |
|
27 |
<role>Developer</role> |
|
28 |
</roles> |
|
29 |
</developer> |
|
30 |
<developer> |
|
31 |
<id>jbadia</id> |
|
32 |
<name>Jos� Bad�a</name> |
|
33 |
<email>badia_jos@gva.es</email> |
|
34 |
<roles> |
|
35 |
<role>Developer</role> |
|
36 |
</roles> |
|
37 |
</developer> |
|
38 |
</developers> |
|
39 |
<distributionManagement> |
|
40 |
<site> |
|
41 |
<id>gvsig-repository</id> |
|
42 |
<url>dav:https://devel.gvsig.org/sites/org.gvsig.seismic/${project.version}</url> |
|
43 |
</site> |
|
44 |
</distributionManagement> |
|
45 |
<repositories> |
|
46 |
<repository> |
|
47 |
<id>gvsig-public-http-repository</id> |
|
48 |
<name>gvSIG maven public HTTP repository</name> |
|
49 |
<url>http://devel.gvsig.org/m2repo/j2se</url> |
|
50 |
<releases> |
|
51 |
<enabled>true</enabled> |
|
52 |
<updatePolicy>daily</updatePolicy> |
|
53 |
<checksumPolicy>warn</checksumPolicy> |
|
54 |
</releases> |
|
55 |
<snapshots> |
|
56 |
<enabled>true</enabled> |
|
57 |
<updatePolicy>daily</updatePolicy> |
|
58 |
<checksumPolicy>warn</checksumPolicy> |
|
59 |
</snapshots> |
|
60 |
</repository> |
|
61 |
</repositories> |
|
62 |
<build> |
|
63 |
<plugins> |
|
64 |
<plugin> |
|
65 |
<groupId>org.apache.maven.plugins</groupId> |
|
66 |
<artifactId>maven-release-plugin</artifactId> |
|
67 |
<configuration> |
|
68 |
<tagBase>http://devel.gvsig.org/svn/gvsig-seismic/org.gvsig.seismic/tags</tagBase> |
|
69 |
</configuration> |
|
70 |
</plugin> |
|
71 |
</plugins> |
|
72 |
</build> |
|
73 |
<dependencyManagement> |
|
74 |
<dependencies> |
|
75 |
<dependency> |
|
76 |
<groupId>org.gvsig</groupId> |
|
77 |
<artifactId>org.gvsig.seismic.lib.api</artifactId> |
|
78 |
<version>1.0.111</version> |
|
79 |
</dependency> |
|
80 |
<dependency> |
|
81 |
<groupId>org.gvsig</groupId> |
|
82 |
<artifactId>org.gvsig.seismic.lib.api</artifactId> |
|
83 |
<version>1.0.111</version> |
|
84 |
<type>test-jar</type> |
|
85 |
</dependency> |
|
86 |
<dependency> |
|
87 |
<groupId>org.gvsig</groupId> |
|
88 |
<artifactId>org.gvsig.seismic.lib.impl</artifactId> |
|
89 |
<version>1.0.111</version> |
|
90 |
</dependency> |
|
91 |
<dependency> |
|
92 |
<groupId>org.gvsig</groupId> |
|
93 |
<artifactId>org.gvsig.seismic.swing.api</artifactId> |
|
94 |
<version>1.0.111</version> |
|
95 |
</dependency> |
|
96 |
<dependency> |
|
97 |
<groupId>org.gvsig</groupId> |
|
98 |
<artifactId>org.gvsig.seismic.swing.api</artifactId> |
|
99 |
<version>1.0.111</version> |
|
100 |
<type>test-jar</type> |
|
101 |
</dependency> |
|
102 |
<dependency> |
|
103 |
<groupId>org.gvsig</groupId> |
|
104 |
<artifactId>org.gvsig.seismic.swing.impl</artifactId> |
|
105 |
<version>1.0.111</version> |
|
106 |
</dependency> |
|
107 |
<dependency> |
|
108 |
<groupId>org.gvsig</groupId> |
|
109 |
<artifactId>org.gvsig.seismic.provider</artifactId> |
|
110 |
<version>1.0.111</version> |
|
111 |
</dependency> |
|
112 |
<dependency> |
|
113 |
<groupId>org.gvsig</groupId> |
|
114 |
<artifactId>org.gvsig.toolbox.math</artifactId> |
|
115 |
<version>1.0.2</version> |
|
116 |
</dependency> |
|
117 |
<dependency> |
|
118 |
<groupId>org.gvsig</groupId> |
|
119 |
<artifactId>org.gvsig.toolbox.core</artifactId> |
|
120 |
<version>1.0.2</version> |
|
121 |
</dependency> |
|
122 |
<dependency> |
|
123 |
<groupId>org.gvsig</groupId> |
|
124 |
<artifactId>org.gvsig.toolbox.gui</artifactId> |
|
125 |
<version>1.0.2</version> |
|
126 |
</dependency> |
|
127 |
<dependency> |
|
128 |
<groupId>org.gvsig</groupId> |
|
129 |
<artifactId>org.gvsig.toolbox.algorithm</artifactId> |
|
130 |
<version>1.0.2</version> |
|
131 |
</dependency> |
|
132 |
<dependency> |
|
133 |
<groupId>org.apache.httpcomponents</groupId> |
|
134 |
<artifactId>httpclient</artifactId> |
|
135 |
<version>4.3</version> |
|
136 |
</dependency> |
|
137 |
</dependencies> |
|
138 |
</dependencyManagement> |
|
139 |
<modules> |
|
140 |
<module>org.gvsig.seismic.lib</module> |
|
141 |
<module>org.gvsig.seismic.provider</module> |
|
142 |
<module>org.gvsig.seismic.swing</module> |
|
143 |
<!-- <module>org.gvsig.seismic.main</module> --> |
|
144 |
<module>org.gvsig.seismic.app</module> |
|
145 |
</modules> |
|
146 |
</project> |
|
0 | 147 |
org.gvsig.seismic/tags/org.gvsig.seismic-1.0.111/org.gvsig.seismic/org.gvsig.seismic.app/org.gvsig.seismic.app.mainplugin/src/main/assembly/gvsig-plugin-package.xml | ||
---|---|---|
1 |
<assembly> |
|
2 |
<id>gvsig-plugin-package</id> |
|
3 |
<formats> |
|
4 |
<format>zip</format> |
|
5 |
</formats> |
|
6 |
<baseDirectory>${project.artifactId}</baseDirectory> |
|
7 |
<includeBaseDirectory>true</includeBaseDirectory> |
|
8 |
<files> |
|
9 |
<file> |
|
10 |
<source>target/${project.artifactId}-${project.version}.jar</source> |
|
11 |
<outputDirectory>lib</outputDirectory> |
|
12 |
</file> |
|
13 |
<file> |
|
14 |
<source>target/package.info</source> |
|
15 |
</file> |
|
16 |
</files> |
|
17 |
|
|
18 |
<fileSets> |
|
19 |
<fileSet> |
|
20 |
<directory>src/main/resources-plugin</directory> |
|
21 |
<outputDirectory>.</outputDirectory> |
|
22 |
</fileSet> |
|
23 |
</fileSets> |
|
24 |
|
|
25 |
<dependencySets> |
|
26 |
<dependencySet> |
|
27 |
<useProjectArtifact>false</useProjectArtifact> |
|
28 |
<useTransitiveDependencies>false</useTransitiveDependencies> |
|
29 |
<outputDirectory>lib</outputDirectory> |
|
30 |
<includes> |
|
31 |
<include>org.gvsig:org.gvsig.symbology.lib.api</include> |
|
32 |
<include>org.gvsig:org.gvsig.seismic.lib.api</include> |
|
33 |
<include>org.gvsig:org.gvsig.seismic.swing.api</include> |
|
34 |
<include>org.gvsig:org.gvsig.seismic.lib.impl</include> |
|
35 |
<include>org.gvsig:org.gvsig.seismic.swing.impl</include> |
|
36 |
<include>org.gvsig:org.gvsig.seismic.provider</include> |
|
37 |
</includes> |
|
38 |
</dependencySet> |
|
39 |
</dependencySets> |
|
40 |
|
|
41 |
</assembly> |
|
0 | 42 |
org.gvsig.seismic/tags/org.gvsig.seismic-1.0.111/org.gvsig.seismic/org.gvsig.seismic.app/org.gvsig.seismic.app.mainplugin/src/main/java/org/gvsig/seismic/app/mainplugin/SeismicClientExtension.java | ||
---|---|---|
1 |
/* OSM layers for gvSIG. |
|
2 |
* Geographic Information System of the Valencian Government |
|
3 |
* |
|
4 |
* Copyright (C) 2012 Nacho Brodin |
|
5 |
* |
|
6 |
* This program is free software; you can redistribute it and/or |
|
7 |
* modify it under the terms of the GNU General Public License |
|
8 |
* as published by the Free Software Foundation; either version 2 |
|
9 |
* of the License, or (at your option) any later version. |
|
10 |
* |
|
11 |
* This program is distributed in the hope that it will be useful, |
|
12 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
13 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
14 |
* GNU General Public License for more details. |
|
15 |
* |
|
16 |
* You should have received a copy of the GNU General Public License |
|
17 |
* along with this program; if not, write to the Free Software |
|
18 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, |
|
19 |
* MA 02110-1301, USA. |
|
20 |
* |
|
21 |
*/ |
|
22 |
package org.gvsig.seismic.app.mainplugin; |
|
23 |
|
|
24 |
import java.io.File; |
|
25 |
import java.io.IOException; |
|
26 |
|
|
27 |
import javax.swing.JOptionPane; |
|
28 |
|
|
29 |
import org.gvsig.andami.plugins.Extension; |
|
30 |
import org.gvsig.app.extension.AddLayer; |
|
31 |
import org.gvsig.i18n.Messages; |
|
32 |
import org.gvsig.seismic.app.mainplugin.gui.SeismicDriverWizard; |
|
33 |
import org.slf4j.Logger; |
|
34 |
import org.slf4j.LoggerFactory; |
|
35 |
|
|
36 |
/** |
|
37 |
* Extension for adding driver support to gvSIG. |
|
38 |
* @author Jos? Bad?a (jbadia@scolab.es) |
|
39 |
*/ |
|
40 |
public class SeismicClientExtension extends Extension { |
|
41 |
private Logger log = LoggerFactory.getLogger(SeismicClientExtension.class); |
|
42 |
private String fileCheck = System.getProperty("user.home") + File.separator + "gvSIG" + File.separator + "osm_epsg_error"; |
|
43 |
|
|
44 |
public void initialize() { |
|
45 |
|
|
46 |
// IconThemeHelper.registerIcon(null, "icon-layer-osm", this); |
|
47 |
} |
|
48 |
|
|
49 |
/* |
|
50 |
* (non-Javadoc) |
|
51 |
* @see org.gvsig.andami.plugins.Extension#postInitialize() |
|
52 |
*/ |
|
53 |
public void postInitialize() { |
|
54 |
// addAboutInfo(); |
|
55 |
AddLayer.addWizard(SeismicDriverWizard.class); |
|
56 |
} |
|
57 |
|
|
58 |
|
|
59 |
public void messageErrorEpsg(String msg, File f) { |
|
60 |
String string1 = Messages.getText("dont_remind_me_anymore"); |
|
61 |
String string2 = Messages.getText("ok"); |
|
62 |
Object[] options = {string1, string2}; |
|
63 |
int n = JOptionPane.showOptionDialog(null, |
|
64 |
"<html>" + Messages.getText(msg).replaceAll("\n", "<br>") + "</html>", |
|
65 |
Messages.getText("confirmacion"), |
|
66 |
JOptionPane.YES_NO_OPTION, |
|
67 |
JOptionPane.QUESTION_MESSAGE, |
|
68 |
null, |
|
69 |
options, |
|
70 |
string1); |
|
71 |
if (n == 0) { |
|
72 |
try { |
|
73 |
f.createNewFile(); |
|
74 |
} catch (IOException e) { |
|
75 |
} |
|
76 |
} |
|
77 |
} |
|
78 |
|
|
79 |
public void execute(String actionCommand) { |
|
80 |
|
|
81 |
} |
|
82 |
|
|
83 |
public boolean isEnabled() { |
|
84 |
return true; |
|
85 |
} |
|
86 |
|
|
87 |
public boolean isVisible() { |
|
88 |
return true; |
|
89 |
} |
|
90 |
|
|
91 |
// private void addAboutInfo() { |
|
92 |
// ApplicationManager application = ApplicationLocator.getManager(); |
|
93 |
// |
|
94 |
// AboutManager about = application.getAbout(); |
|
95 |
// about.addDeveloper("Nacho Brodin", getClass().getClassLoader() |
|
96 |
// .getResource("about/osm-about.html"), 2); |
|
97 |
// |
|
98 |
// AboutParticipant participant = about.getDeveloper("Nacho Brodin"); |
|
99 |
// participant.addContribution( |
|
100 |
// "OSM", |
|
101 |
// "Open Street Map client for gvSIG", |
|
102 |
// 2012,1,1, |
|
103 |
// 2012,1,15 |
|
104 |
// ); |
|
105 |
// } |
|
106 |
} |
|
0 | 107 |
org.gvsig.seismic/tags/org.gvsig.seismic-1.0.111/org.gvsig.seismic/org.gvsig.seismic.app/org.gvsig.seismic.app.mainplugin/src/main/java/org/gvsig/seismic/app/mainplugin/gui/SeismicDriverWizard.java | ||
---|---|---|
1 |
/* gvSIG. Geographic Information System of the Valencian Government |
|
2 |
* |
|
3 |
* Copyright (C) 2007-2008 Infrastructures and Transports Department |
|
4 |
* of the Valencian Government (CIT) |
|
5 |
* |
|
6 |
* This program is free software; you can redistribute it and/or |
|
7 |
* modify it under the terms of the GNU General Public License |
|
8 |
* as published by the Free Software Foundation; either version 2 |
|
9 |
* of the License, or (at your option) any later version. |
|
10 |
* |
|
11 |
* This program is distributed in the hope that it will be useful, |
|
12 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
13 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
14 |
* GNU General Public License for more details. |
|
15 |
* |
|
16 |
* You should have received a copy of the GNU General Public License |
|
17 |
* along with this program; if not, write to the Free Software |
|
18 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, |
|
19 |
* MA 02110-1301, USA. |
|
20 |
* |
|
21 |
*/ |
|
22 |
package org.gvsig.seismic.app.mainplugin.gui; |
|
23 |
|
|
24 |
import java.awt.GridBagConstraints; |
|
25 |
import java.awt.GridBagLayout; |
|
26 |
import java.awt.event.MouseEvent; |
|
27 |
import java.awt.event.MouseListener; |
|
28 |
import java.util.ArrayList; |
|
29 |
import java.util.List; |
|
30 |
|
|
31 |
import javax.swing.JOptionPane; |
|
32 |
|
|
33 |
import org.cresques.cts.IProjection; |
|
34 |
import org.gvsig.andami.PluginServices; |
|
35 |
import org.gvsig.andami.ui.mdiManager.IWindow; |
|
36 |
import org.gvsig.app.ApplicationLocator; |
|
37 |
import org.gvsig.app.ApplicationManager; |
|
38 |
import org.gvsig.app.gui.WizardPanel; |
|
39 |
import org.gvsig.app.gui.wizards.WizardListener; |
|
40 |
import org.gvsig.app.gui.wizards.WizardListenerSupport; |
|
41 |
import org.gvsig.app.project.documents.view.gui.AbstractViewPanel; |
|
42 |
import org.gvsig.fmap.dal.DataStoreParameters; |
|
43 |
import org.gvsig.seismic.swing.SeismicSwingLocator; |
|
44 |
import org.gvsig.seismic.swing.SeismicSwingManager; |
|
45 |
import org.gvsig.seismic.swing.gui.JSeismicWizard; |
|
46 |
import org.gvsig.tools.dynobject.DynObject; |
|
47 |
import org.gvsig.tools.observer.Observable; |
|
48 |
import org.gvsig.tools.observer.Observer; |
|
49 |
import org.slf4j.Logger; |
|
50 |
import org.slf4j.LoggerFactory; |
|
51 |
|
|
52 |
/** |
|
53 |
* Wizard panel to add a new OSM raster layer |
|
54 |
* @author Jos? Bad?a (jbadia@scolab.es) |
|
55 |
*/ |
|
56 |
public class SeismicDriverWizard extends WizardPanel implements MouseListener, Observer { |
|
57 |
/** |
|
58 |
* |
|
59 |
*/ |
|
60 |
private static final long serialVersionUID = -464391550433699378L; |
|
61 |
private static final String TAB_NAME = "gvSeismic"; |
|
62 |
private static Logger logger = LoggerFactory.getLogger(SeismicDriverWizard.class.getName()); |
|
63 |
private AbstractViewPanel view = null; |
|
64 |
private WizardListenerSupport listenerSupport = null; |
|
65 |
|
|
66 |
private List<DynObject> objectSet; |
|
67 |
private SeismicSwingManager swingManager; |
|
68 |
private JSeismicWizard driverWizard; |
|
69 |
private SeismicWizardProcess process; |
|
70 |
|
|
71 |
public SeismicDriverWizard() { |
|
72 |
super(); |
|
73 |
this.swingManager = SeismicSwingLocator.getDriverSwingManager(); |
|
74 |
this.objectSet = new ArrayList<DynObject>(); |
|
75 |
initialize(); |
|
76 |
} |
|
77 |
|
|
78 |
/** |
|
79 |
* This method initializes this |
|
80 |
* |
|
81 |
* @return void |
|
82 |
*/ |
|
83 |
private void initialize() { |
|
84 |
setTabName(PluginServices.getText(this, TAB_NAME)); |
|
85 |
setLayout(new GridBagLayout()); |
|
86 |
|
|
87 |
|
|
88 |
IWindow iw = PluginServices.getMDIManager().getActiveWindow(); |
|
89 |
|
|
90 |
if (iw == null) { |
|
91 |
return; |
|
92 |
} |
|
93 |
|
|
94 |
if (!(iw instanceof AbstractViewPanel)) { |
|
95 |
return; |
|
96 |
} |
|
97 |
|
|
98 |
view = (AbstractViewPanel) iw; |
|
99 |
setMapCtrl(view.getMapControl()); |
|
100 |
|
|
101 |
GridBagConstraints gridBagConstraints = new GridBagConstraints(); |
|
102 |
gridBagConstraints.fill = GridBagConstraints.BOTH; |
|
103 |
gridBagConstraints.weightx = 1.0; |
|
104 |
gridBagConstraints.weighty = 1.0; |
|
105 |
gridBagConstraints.gridx = 0; |
|
106 |
gridBagConstraints.gridy = 0; |
|
107 |
add(getJDriverWizard().getJComponent(), gridBagConstraints); |
|
108 |
|
|
109 |
} |
|
110 |
|
|
111 |
private JSeismicWizard getJDriverWizard(IProjection proj) { |
|
112 |
if(this.driverWizard ==null){ |
|
113 |
this.driverWizard = swingManager.createWizard(proj); |
|
114 |
this.driverWizard.addObserver(this); |
|
115 |
} |
|
116 |
return this.driverWizard; |
|
117 |
} |
|
118 |
|
|
119 |
private JSeismicWizard getJDriverWizard() { |
|
120 |
return getJDriverWizard(null); |
|
121 |
} |
|
122 |
|
|
123 |
private WizardListenerSupport getWizardListenerSupport() { |
|
124 |
if(listenerSupport == null) |
|
125 |
listenerSupport = new WizardListenerSupport(); |
|
126 |
return listenerSupport; |
|
127 |
} |
|
128 |
|
|
129 |
/** |
|
130 |
* This method checks for the options selected within the configuration |
|
131 |
* dialog are correct. |
|
132 |
* |
|
133 |
* @return true if you're done, false if not. |
|
134 |
*/ |
|
135 |
public boolean areSettingsValid() { |
|
136 |
boolean exit = true; |
|
137 |
if(process != null){ |
|
138 |
exit = process.getJDriverWizard().accept(); |
|
139 |
} |
|
140 |
return exit; |
|
141 |
} |
|
142 |
|
|
143 |
public void addWizardListener(WizardListener listener) { |
|
144 |
getWizardListenerSupport().addWizardListener(listener); |
|
145 |
getWizardListenerSupport().callStateChanged(false); |
|
146 |
} |
|
147 |
|
|
148 |
public void removeWizardListener(WizardListener listener) { |
|
149 |
getWizardListenerSupport().removeWizardListener(listener); |
|
150 |
} |
|
151 |
|
|
152 |
@Override |
|
153 |
public void close() { |
|
154 |
} |
|
155 |
|
|
156 |
@Override |
|
157 |
public void execute() { |
|
158 |
if (process != null && process.isAlive()) { |
|
159 |
|
|
160 |
ApplicationManager application = ApplicationLocator.getManager(); |
|
161 |
application.messageDialog( |
|
162 |
"Process already running. Wait to terminate.", |
|
163 |
|
|
164 |
"Test task", JOptionPane.WARNING_MESSAGE); |
|
165 |
return; |
|
166 |
} |
|
167 |
process = new SeismicWizardProcess(getJDriverWizard()); |
|
168 |
process.addObserver(this); |
|
169 |
process.start(); |
|
170 |
} |
|
171 |
|
|
172 |
|
|
173 |
@Override |
|
174 |
public DataStoreParameters[] getParameters() { |
|
175 |
return null; |
|
176 |
} |
|
177 |
|
|
178 |
@Override |
|
179 |
public void initWizard() { |
|
180 |
} |
|
181 |
|
|
182 |
public void mouseClicked(MouseEvent e) { |
|
183 |
|
|
184 |
} |
|
185 |
|
|
186 |
public void mouseEntered(MouseEvent e) { |
|
187 |
|
|
188 |
} |
|
189 |
|
|
190 |
public void mouseExited(MouseEvent e) { |
|
191 |
|
|
192 |
} |
|
193 |
|
|
194 |
public void mousePressed(MouseEvent e) { |
|
195 |
getWizardListenerSupport().callStateChanged(true); |
|
196 |
} |
|
197 |
|
|
198 |
public void mouseReleased(MouseEvent e) { |
|
199 |
|
|
200 |
} |
|
201 |
|
|
202 |
public void update(Observable observable, Object notification) { |
|
203 |
areSettingsValid(); |
|
204 |
} |
|
205 |
|
|
206 |
} |
|
0 | 207 |
org.gvsig.seismic/tags/org.gvsig.seismic-1.0.111/org.gvsig.seismic/org.gvsig.seismic.app/org.gvsig.seismic.app.mainplugin/src/main/java/org/gvsig/seismic/app/mainplugin/gui/SeismicWizardProcess.java | ||
---|---|---|
1 |
package org.gvsig.seismic.app.mainplugin.gui; |
|
2 |
|
|
3 |
import java.util.ArrayList; |
|
4 |
import java.util.Iterator; |
|
5 |
import java.util.List; |
|
6 |
|
|
7 |
import javax.swing.JOptionPane; |
|
8 |
|
|
9 |
import org.cresques.cts.IProjection; |
|
10 |
import org.gvsig.app.ApplicationLocator; |
|
11 |
import org.gvsig.app.ApplicationManager; |
|
12 |
import org.gvsig.app.project.documents.Document; |
|
13 |
import org.gvsig.app.project.documents.view.ViewDocument; |
|
14 |
import org.gvsig.fmap.dal.store.seismic.SeismicStoreParameters; |
|
15 |
import org.gvsig.fmap.geom.primitive.Envelope; |
|
16 |
import org.gvsig.fmap.mapcontext.MapContext; |
|
17 |
import org.gvsig.fmap.mapcontext.exceptions.LoadLayerException; |
|
18 |
import org.gvsig.fmap.mapcontext.layers.vectorial.FLyrVect; |
|
19 |
import org.gvsig.seismic.Parser; |
|
20 |
import org.gvsig.seismic.swing.SeismicSwingLocator; |
|
21 |
import org.gvsig.seismic.swing.SeismicSwingManager; |
|
22 |
import org.gvsig.seismic.swing.gui.JSeismicWizard; |
|
23 |
import org.gvsig.seismic.swing.gui.ServiceDefinition; |
|
24 |
import org.gvsig.tools.observer.Observable; |
|
25 |
import org.gvsig.tools.observer.Observer; |
|
26 |
import org.gvsig.tools.task.AbstractMonitorableTask; |
|
27 |
import org.gvsig.tools.task.SimpleTaskStatus; |
|
28 |
import org.slf4j.Logger; |
|
29 |
import org.slf4j.LoggerFactory; |
|
30 |
|
|
31 |
public class SeismicWizardProcess extends AbstractMonitorableTask implements Observer, Observable { |
|
32 |
|
|
33 |
private static Logger logger = LoggerFactory.getLogger(SeismicWizardProcess.class); |
|
34 |
|
|
35 |
private ApplicationManager application = null; |
|
36 |
|
|
37 |
private SeismicSwingManager swingManager; |
|
38 |
|
|
39 |
private JSeismicWizard driverWizard; |
|
40 |
|
|
41 |
private List<Observer> observers; |
|
42 |
|
|
43 |
protected SeismicWizardProcess(JSeismicWizard jSeismicWizard) { |
|
44 |
super("gvSeismic: parsing process"); |
|
45 |
this.application = ApplicationLocator.getManager(); |
|
46 |
this.swingManager = SeismicSwingLocator.getDriverSwingManager(); |
|
47 |
|
|
48 |
this.observers = new ArrayList<Observer>(); |
|
49 |
this.driverWizard = jSeismicWizard; |
|
50 |
} |
|
51 |
|
|
52 |
public void run() { |
|
53 |
SimpleTaskStatus status = null; |
|
54 |
|
|
55 |
try { |
|
56 |
status = (SimpleTaskStatus) this.getTaskStatus(); |
|
57 |
ApplicationManager application = ApplicationLocator.getManager(); |
|
58 |
|
|
59 |
SeismicStoreParameters storeParameters = getJDriverWizard().getDriverStoreParameters(); |
|
60 |
//storeParameters.set |
|
61 |
Document doc = application.getProjectManager().getCurrentProject().getActiveDocument(); |
|
62 |
if(doc instanceof ViewDocument){ |
|
63 |
ViewDocument viewDoc = (ViewDocument) doc; |
|
64 |
getJDriverWizard(viewDoc.getMapContext().getProjection()); |
|
65 |
if(getJDriverWizard().accept()){ |
|
66 |
try { |
|
67 |
if(getJDriverWizard().getData() != null){ |
|
68 |
for(int i=0; i<getJDriverWizard().getData().size(); i++){ |
|
69 |
ServiceDefinition service = getJDriverWizard().getData().get(i); |
|
70 |
storeParameters.setFile(service.getFile()); |
|
71 |
Parser p = service.getParser(); |
|
72 |
if(p != null && p.getProjection() != null && service.getProjection() != null){ |
|
73 |
storeParameters.setDynValue("Parser", p.getName()); |
|
74 |
storeParameters.setCRS(service.getProjection()); |
|
75 |
FLyrVect layer = (FLyrVect) application.getMapContextManager().createLayer( |
|
76 |
service.getFile().getName(), storeParameters); |
|
77 |
viewDoc.getMapContext().setProjection(service.getProjection()); |
|
78 |
viewDoc.getMapContext().getLayers().addLayer(layer); |
|
79 |
} |
|
80 |
} |
|
81 |
MapContext mapCtrl = viewDoc.getMapContext(); |
|
82 |
|
|
83 |
Envelope all = mapCtrl.getLayers().getFullEnvelope(); |
|
84 |
if( all!=null && !all.isEmpty() ) { |
|
85 |
mapCtrl.getViewPort().setEnvelope(all); |
|
86 |
viewDoc.setModified(true); |
|
87 |
} |
|
88 |
} |
|
89 |
} catch (LoadLayerException e) { |
|
90 |
logger.error("Error loading layer gvSeismic", e); |
|
91 |
} |
|
92 |
} |
|
93 |
} |
|
94 |
|
|
95 |
application.message("Parsing process completed", JOptionPane.INFORMATION_MESSAGE); |
|
96 |
|
|
97 |
} catch (Exception e) { |
|
98 |
logger.info("Error in process", e); |
|
99 |
|
|
100 |
if (status != null) { |
|
101 |
status.abort(); |
|
102 |
|
|
103 |
} |
|
104 |
application.message("Process error", JOptionPane.WARNING_MESSAGE); |
|
105 |
application.messageDialog( |
|
106 |
|
|
107 |
"Se ha producido un error realizando el proceso y este terminara de forma inesperada.\n\n" |
|
108 |
+ e.getMessage(), this.getName(), |
|
109 |
JOptionPane.WARNING_MESSAGE); |
|
110 |
|
|
111 |
} finally { |
|
112 |
if (status != null) { |
|
113 |
if (status.isRunning()) { |
|
114 |
status.terminate(); |
|
115 |
} |
|
116 |
} |
|
117 |
} |
|
118 |
} |
|
119 |
|
|
120 |
private JSeismicWizard getJDriverWizard(IProjection proj) { |
|
121 |
if(this.driverWizard ==null){ |
|
122 |
this.driverWizard = swingManager.createWizard(proj); |
|
123 |
this.driverWizard.addObserver(this); |
|
124 |
} |
|
125 |
//this.driverWizard.setProjection(proj); |
|
126 |
return this.driverWizard; |
|
127 |
} |
|
128 |
|
|
129 |
public JSeismicWizard getJDriverWizard() { |
|
130 |
return getJDriverWizard(null); |
|
131 |
} |
|
132 |
|
|
133 |
public void addObserver(Observer o) { |
|
134 |
this.observers.add(o); |
|
135 |
} |
|
136 |
|
|
137 |
public void deleteObserver(Observer o) { |
|
138 |
this.observers.remove(o); |
|
139 |
} |
|
140 |
|
|
141 |
public void deleteObservers() { |
|
142 |
Iterator<Observer> it = observers.iterator(); |
|
143 |
while(it.hasNext()){ |
|
144 |
Observer o = (Observer) it.next(); |
|
145 |
deleteObserver(o); |
|
146 |
} |
|
147 |
} |
|
148 |
|
|
149 |
public void update(Observable observable, Object notification) { |
|
150 |
logger.warn("Hola, voy por SeismicWizardProcess"); |
|
151 |
notifyObservers(observable, notification); |
|
152 |
} |
|
153 |
|
|
154 |
public synchronized void notifyObservers(Observable observable, Object tableName) { |
|
155 |
for(int i =0; i<this.observers.size(); i++ ) { |
|
156 |
Observer o = (Observer) this.observers.get(i); |
|
157 |
o.update(this, tableName); |
|
158 |
} |
|
159 |
} |
|
160 |
|
|
161 |
} |
|
0 | 162 |
org.gvsig.seismic/tags/org.gvsig.seismic-1.0.111/org.gvsig.seismic/org.gvsig.seismic.app/org.gvsig.seismic.app.mainplugin/src/main/resources-plugin/i18n/text.properties | ||
---|---|---|
1 |
Fichero=Fichero |
|
2 |
Parseador=Parseador |
|
3 |
Parsear=Parsear |
|
4 |
crs_advice=Si no se especifica CRS (---), no ser? cargado |
|
5 |
red_files_cant_be_parsed=Los ficheros en rojo no pueden ser parseados |
|
6 |
Select_seismic_format=Selecciona formato de s?smica |
|
7 |
Seismic_format_parser=Selecciona parseador de s?smica |
|
8 |
resumen_ejecucion=Resumen de ejecuci?n |
|
9 |
Por_defecto=Por defecto |
|
10 |
Por_definir=Por definir |
|
11 |
Properties=Propiedades |
|
12 |
projection=proyecci?n |
|
13 |
no_driver_advice=No hay un driver que se adapte a este fichero |
|
14 |
several_options=Hay varias opciones para este fichero |
|
15 |
choose_manually=Selecciona otro de la lista |
|
16 |
available_providers=Proveedores disponibles |
|
17 |
selecciona_sistema_de_referencia=Selecciona sistema de referencia |
|
18 |
|
|
19 |
big_files_problems_title=Ficheros demasiado grandes |
|
20 |
big_files_problems_1=Los siguientes ficheros pueden generar problemas de memoria en equipos de menor pontencia |
|
21 |
big_files_problems_2=Se recomienda que los ficheros no excedan de las |
|
22 |
big_files_problems_3=entradas (lineas) |
|
23 |
|
|
24 |
File_supported=Fichero soportado |
|
25 |
File_not_supported=Fichero NO soportado |
|
26 |
|
|
27 |
Parsing_document=Parseando documento en |
|
28 |
File_metadata=Metadatos del fichero |
|
29 |
|
|
30 |
metadata_succesfull=METADATA LEIDA CON ?XITO |
|
31 |
error_parsing=ERROR EN EL PROCESO DE PARSEO |
|
32 |
error_File_not_supported=ERROR: Fichero NO soportado |
|
33 |
check_structure=Compruebe si el fichero contiene la estructura adecuada |
|
34 |
|
|
35 |
mandatory=obligatorio |
|
36 |
File=Fichero |
|
37 |
CRS=CRS |
|
38 |
|
|
0 | 39 |
org.gvsig.seismic/tags/org.gvsig.seismic-1.0.111/org.gvsig.seismic/org.gvsig.seismic.app/org.gvsig.seismic.app.mainplugin/src/main/resources-plugin/i18n/text_en.properties | ||
---|---|---|
1 |
Fichero=File |
|
2 |
Parseador=Parser |
|
3 |
Parsear=Parse |
|
4 |
crs_advice=Files without SRS (---), will not be loaded |
|
5 |
red_files_cant_be_parsed=Red file entries can't be parsed |
|
6 |
Select_seismic_format=Choose seismic format |
|
7 |
Seismic_format_parser=Choose seismic parser |
|
8 |
resumen_ejecucion=Execution output |
|
9 |
Por_defecto=By default |
|
10 |
Por_definir=Not defined |
|
11 |
Properties=Properties |
|
12 |
projection=projection |
|
13 |
no_driver_advice=Any driver fits to this file |
|
14 |
several_options=There are several options to this file |
|
15 |
choose_manually=Choose another one from the list |
|
16 |
available_providers=Available providers |
|
17 |
selecciona_sistema_de_referencia=Select coordinate system |
|
18 |
|
|
19 |
big_files_problems_title=Files too big |
|
20 |
big_files_problems_1=These files may cause problems in low-memory devices |
|
21 |
big_files_problems_2=Are recommended files with less than |
|
22 |
big_files_problems_3=entries (lines) |
|
23 |
|
|
24 |
File_supported=File supported |
|
25 |
File_not_supported=File NOT supported |
|
26 |
|
|
27 |
Parsing_document=Parsing document from |
|
28 |
File_metadata=File metadata |
|
29 |
|
|
30 |
metadata_succesfull=METADATA LOADED SUCCESFULLY |
|
31 |
error_parsing=ERROR IN PARSING PROCESS |
|
32 |
error_File_not_supported=ERROR: FILE NOT supported |
|
33 |
check_structure=Check if the file has a correct structure |
|
34 |
|
|
35 |
mandatory=mandatory |
|
36 |
File=File |
|
37 |
CRS=SRS |
|
0 | 38 |
org.gvsig.seismic/tags/org.gvsig.seismic-1.0.111/org.gvsig.seismic/org.gvsig.seismic.app/org.gvsig.seismic.app.mainplugin/src/main/resources-plugin/config.xml | ||
---|---|---|
1 |
<?xml version="1.0" encoding="ISO-8859-1"?> |
|
2 |
<plugin-config> |
|
3 |
<libraries library-dir="lib"> |
|
4 |
</libraries> |
|
5 |
<depends plugin-name="org.gvsig.app.mainplugin"/> |
|
6 |
<resourceBundle name="text"/> |
|
7 |
<extensions> |
|
8 |
<extension class-name="org.gvsig.seismic.app.mainplugin.SeismicClientExtension" |
|
9 |
description="Seismic Files Parser Driver" |
|
10 |
active="true"> |
|
11 |
</extension> |
|
12 |
</extensions> |
|
13 |
</plugin-config> |
|
0 | 14 |
org.gvsig.seismic/tags/org.gvsig.seismic-1.0.111/org.gvsig.seismic/org.gvsig.seismic.app/org.gvsig.seismic.app.mainplugin/pom.xml | ||
---|---|---|
1 |
<?xml version="1.0" encoding="UTF-8"?> |
|
2 |
|
|
3 |
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
|
4 |
|
|
5 |
<modelVersion>4.0.0</modelVersion> |
|
6 |
<artifactId>org.gvsig.seismic.app.mainplugin</artifactId> |
|
7 |
<packaging>jar</packaging> |
|
8 |
<name>org.gvsig.seismic.app.mainplugin</name> |
|
9 |
<description> |
|
10 |
Parser for some seismic formats. |
|
11 |
|
|
12 |
- UKOOA-GEOG |
|
13 |
- UKOOA-H19 |
|
14 |
- UKOOA-PTO |
|
15 |
- UKOOA-R06 |
|
16 |
- UKOOA-84 |
|
17 |
- CAD |
|
18 |
- P1-90 |
|
19 |
- RPS-SPS |
|
20 |
</description> |
|
21 |
<parent> |
|
22 |
<groupId>org.gvsig</groupId> |
|
23 |
<artifactId>org.gvsig.seismic.app</artifactId> |
|
24 |
<version>1.0.111</version> |
|
25 |
</parent> |
|
26 |
|
|
27 |
<dependencies> |
|
28 |
<dependency> |
|
29 |
<groupId>org.gvsig</groupId> |
|
30 |
<artifactId>org.gvsig.tools.lib</artifactId> |
|
31 |
<scope>compile</scope> |
|
32 |
</dependency> |
|
33 |
<dependency> |
|
34 |
<groupId>org.gvsig</groupId> |
|
35 |
<artifactId>org.gvsig.andami</artifactId> |
|
36 |
<scope>compile</scope> |
|
37 |
</dependency> |
|
38 |
<dependency> |
|
39 |
<groupId>org.gvsig</groupId> |
|
40 |
<artifactId>org.gvsig.app.mainplugin</artifactId> |
|
41 |
<scope>compile</scope> |
|
42 |
</dependency> |
|
43 |
<dependency> |
|
44 |
<groupId>org.gvsig</groupId> |
|
45 |
<artifactId>org.gvsig.fmap.control</artifactId> |
|
46 |
<scope>compile</scope> |
|
47 |
</dependency> |
|
48 |
<dependency> |
|
49 |
<groupId>org.gvsig</groupId> |
|
50 |
<artifactId>org.gvsig.fmap.mapcontext.api</artifactId> |
|
51 |
<scope>compile</scope> |
|
52 |
</dependency> |
|
53 |
<dependency> |
|
54 |
<groupId>org.gvsig</groupId> |
|
55 |
<artifactId>org.gvsig.fmap.geometry.api</artifactId> |
|
56 |
<scope>compile</scope> |
|
57 |
</dependency> |
|
58 |
<dependency> |
|
59 |
<groupId>org.gvsig</groupId> |
|
60 |
<artifactId>org.gvsig.fmap.dal.api</artifactId> |
|
61 |
<scope>compile</scope> |
|
62 |
</dependency> |
|
63 |
<dependency> |
|
64 |
<groupId>org.gvsig</groupId> |
|
65 |
<artifactId>org.gvsig.symbology.lib.api</artifactId> |
|
66 |
<scope>compile</scope> |
|
67 |
</dependency> |
|
68 |
<dependency> |
|
69 |
<groupId>org.gvsig</groupId> |
|
70 |
<artifactId>org.gvsig.seismic.lib.api</artifactId> |
|
71 |
<scope>compile</scope> |
|
72 |
</dependency> |
|
73 |
<dependency> |
|
74 |
<groupId>org.gvsig</groupId> |
|
75 |
<artifactId>org.gvsig.seismic.lib.impl</artifactId> |
|
76 |
<scope>runtime</scope> |
|
77 |
</dependency> |
|
78 |
<dependency> |
|
79 |
<groupId>org.gvsig</groupId> |
|
80 |
<artifactId>org.gvsig.seismic.swing.api</artifactId> |
|
81 |
<scope>compile</scope> |
|
82 |
</dependency> |
|
83 |
<dependency> |
|
84 |
<groupId>org.gvsig</groupId> |
|
85 |
<artifactId>org.gvsig.seismic.swing.impl</artifactId> |
|
86 |
<scope>runtime</scope> |
|
87 |
</dependency> |
|
88 |
<dependency> |
|
89 |
<groupId>org.gvsig</groupId> |
|
90 |
<artifactId>org.gvsig.seismic.provider</artifactId> |
|
91 |
<scope>compile</scope> |
|
92 |
</dependency> |
|
93 |
</dependencies> |
|
94 |
|
|
95 |
<properties> |
|
96 |
<!-- Package info property values --> |
|
97 |
<!-- Default values in org.gvsig.desktop --> |
|
98 |
<gvsig.package.info.name>Formats: Seismic formats support</gvsig.package.info.name> |
|
99 |
<gvsig.package.info.state>testing</gvsig.package.info.state> |
|
100 |
<gvsig.package.info.official>true</gvsig.package.info.official> |
|
101 |
<gvsig.package.info.dependencies>required: org.gvsig.app.mainplugin -ge 2.1.0-A</gvsig.package.info.dependencies> |
|
102 |
<gvsig.package.info.categories>Formats,Vector</gvsig.package.info.categories> |
|
103 |
<gvsig.package.info.poolURL>https://devel.gvsig.org/download/projects/gvsig-seismic/pool</gvsig.package.info.poolURL> |
|
104 |
<gvsig.package.info.operatingSystem>all</gvsig.package.info.operatingSystem> |
|
105 |
<gvsig.package.info.architecture>all</gvsig.package.info.architecture> |
|
106 |
<gvsig.install.plugin>true</gvsig.install.plugin> |
|
107 |
<gvsig.install.plugin.package>true</gvsig.install.plugin.package> |
|
108 |
</properties> |
|
109 |
|
|
110 |
|
|
111 |
|
|
112 |
|
|
113 |
<build> |
|
114 |
<plugins> |
|
115 |
|
|
116 |
<plugin> |
|
117 |
<!-- Skip compilation tests --> |
|
118 |
<groupId>org.apache.maven.plugins</groupId> |
|
119 |
<artifactId>maven-compiler-plugin</artifactId> |
|
120 |
<executions> |
|
121 |
<execution> |
|
122 |
<id>default-testCompile</id> |
|
123 |
<phase>process-test-sources</phase> |
|
124 |
<goals> |
|
125 |
<goal>testCompile</goal> |
|
126 |
</goals> |
|
127 |
<configuration> |
|
128 |
<skip>true</skip> |
|
129 |
</configuration> |
|
130 |
</execution> |
|
131 |
</executions> |
|
132 |
</plugin> |
|
133 |
|
|
134 |
<plugin> |
|
135 |
<!-- Skip test execution --> |
|
136 |
<groupId>org.apache.maven.plugins</groupId> |
|
137 |
<artifactId>maven-surefire-plugin</artifactId> |
|
138 |
<configuration> |
|
139 |
<skipTests>true</skipTests> |
|
140 |
</configuration> |
|
141 |
</plugin> |
|
142 |
|
|
143 |
</plugins> |
|
144 |
</build> |
|
145 |
|
|
146 |
</project> |
|
147 |
|
|
0 | 148 |
org.gvsig.seismic/tags/org.gvsig.seismic-1.0.111/org.gvsig.seismic/org.gvsig.seismic.app/org.gvsig.seismic.app.mainplugin/buildNumber.properties | ||
---|---|---|
1 |
#Sun Oct 04 02:34:55 CEST 2020 |
|
2 |
buildNumber=134 |
|
0 | 3 |
org.gvsig.seismic/tags/org.gvsig.seismic-1.0.111/org.gvsig.seismic/org.gvsig.seismic.app/org.gvsig.seismic.app.geoprocess/pom.xml | ||
---|---|---|
1 |
<?xml version="1.0" encoding="UTF-8"?> |
|
2 |
|
|
3 |
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
|
4 |
|
|
5 |
<modelVersion>4.0.0</modelVersion> |
|
6 |
<artifactId>org.gvsig.seismic.app.geoprocess</artifactId> |
|
7 |
<packaging>jar</packaging> |
|
8 |
<name>Geoprocess: gvSeismic algorithms</name> |
|
9 |
<description> |
|
10 |
Geoprocess dedicated to the seismic analysis: |
|
11 |
- Convex Hull (replace base gvSIG algorithm) |
|
12 |
- Points to lines |
|
13 |
|
|
14 |
</description> |
|
15 |
<parent> |
|
16 |
<groupId>org.gvsig</groupId> |
|
17 |
<artifactId>org.gvsig.seismic.app</artifactId> |
|
18 |
<version>1.0.0-SNAPSHOT</version> |
|
19 |
</parent> |
|
20 |
|
|
21 |
<dependencies> |
|
22 |
<dependency> |
|
23 |
<groupId>org.gvsig</groupId> |
|
24 |
<artifactId>org.gvsig.geoprocess.algorithm.base</artifactId> |
|
25 |
<scope>compile</scope> |
|
26 |
</dependency> |
|
27 |
<dependency> |
|
28 |
<groupId>org.gvsig</groupId> |
|
29 |
<artifactId>org.gvsig.geoprocess.algorithm.convexhull</artifactId> |
|
30 |
<scope>compile</scope> |
|
31 |
</dependency> |
|
32 |
<dependency> |
|
33 |
<groupId>org.gvsig</groupId> |
|
34 |
<artifactId>org.gvsig.fmap.geometry.api</artifactId> |
|
35 |
<scope>compile</scope> |
|
36 |
</dependency> |
|
37 |
<dependency> |
|
38 |
<groupId>org.gvsig</groupId> |
|
39 |
<artifactId>org.gvsig.fmap.geometry.impl</artifactId> |
|
40 |
<scope>runtime</scope> |
|
41 |
</dependency> |
|
42 |
<dependency> |
|
43 |
<groupId>org.gvsig</groupId> |
|
44 |
<artifactId>org.gvsig.fmap.geometry.operation</artifactId> |
|
45 |
<scope>compile</scope> |
|
46 |
</dependency> |
|
47 |
<dependency> |
|
48 |
<groupId>org.gvsig</groupId> |
|
49 |
<artifactId>org.gvsig.fmap.dal.api</artifactId> |
|
50 |
<scope>compile</scope> |
|
51 |
</dependency> |
|
52 |
<dependency> |
|
53 |
<groupId>org.gvsig</groupId> |
|
54 |
<artifactId>org.gvsig.fmap.dal.impl</artifactId> |
|
55 |
<scope>compile</scope> |
|
56 |
</dependency> |
|
57 |
<dependency> |
|
58 |
<groupId>org.gvsig</groupId> |
|
59 |
<artifactId>org.gvsig.toolbox.core</artifactId> |
|
60 |
<scope>compile</scope> |
|
61 |
</dependency> |
|
62 |
<dependency> |
|
63 |
<groupId>org.gvsig</groupId> |
|
64 |
<artifactId>org.gvsig.tools.lib</artifactId> |
|
65 |
<scope>compile</scope> |
|
66 |
</dependency> |
|
67 |
<dependency> |
|
68 |
<groupId>org.gvsig</groupId> |
|
69 |
<artifactId>org.gvsig.i18n</artifactId> |
|
70 |
<scope>compile</scope> |
|
71 |
</dependency> |
|
72 |
<dependency> |
|
73 |
<groupId>org.gvsig</groupId> |
|
74 |
<artifactId>org.gvsig.ui</artifactId> |
|
75 |
<scope>compile</scope> |
|
76 |
</dependency> |
|
77 |
<dependency> |
|
78 |
<groupId>org.gvsig</groupId> |
|
79 |
<artifactId>org.gvsig.fmap.control</artifactId> |
|
80 |
<scope>compile</scope> |
|
81 |
</dependency> |
|
82 |
<dependency> |
|
83 |
<groupId>org.gvsig</groupId> |
|
84 |
<artifactId>org.gvsig.metadata.lib.basic.api</artifactId> |
|
85 |
<scope>compile</scope> |
|
86 |
</dependency> |
|
87 |
<dependency> |
|
88 |
<groupId>org.gvsig</groupId> |
|
89 |
<artifactId>org.gvsig.seismic.lib.api</artifactId> |
|
90 |
<scope>compile</scope> |
|
91 |
</dependency> |
|
92 |
<dependency> |
|
93 |
<groupId>org.gvsig</groupId> |
|
94 |
<artifactId>org.gvsig.seismic.lib.impl</artifactId> |
|
95 |
<scope>runtime</scope> |
|
96 |
</dependency> |
|
97 |
<dependency> |
|
98 |
<groupId>org.gvsig</groupId> |
|
99 |
<artifactId>org.gvsig.seismic.swing.api</artifactId> |
|
100 |
<scope>compile</scope> |
|
101 |
</dependency> |
|
102 |
<dependency> |
|
103 |
<groupId>org.gvsig</groupId> |
|
104 |
<artifactId>org.gvsig.seismic.swing.impl</artifactId> |
|
105 |
<scope>runtime</scope> |
|
106 |
</dependency> |
|
107 |
<dependency> |
|
108 |
<groupId>org.gvsig</groupId> |
|
109 |
<artifactId>org.gvsig.seismic.provider</artifactId> |
|
110 |
<scope>compile</scope> |
|
111 |
</dependency> |
|
112 |
<dependency> |
|
113 |
<groupId>junit</groupId> |
|
114 |
<artifactId>junit</artifactId> |
|
115 |
<scope>test</scope> |
|
116 |
</dependency> |
|
117 |
</dependencies> |
|
118 |
|
|
119 |
<properties> |
|
120 |
<!-- Package info property values --> |
|
121 |
<!-- Default values in org.gvsig.desktop --> |
|
122 |
<gvsig.package.info.state>testing</gvsig.package.info.state> |
|
123 |
<gvsig.package.info.official>true</gvsig.package.info.official> |
|
124 |
<gvsig.package.info.dependencies>required: org.gvsig.app.mainplugin -ge 2.1.0-A, required: org.gvsig.geoprocess.app.algorithm -ge 2.2.2-A</gvsig.package.info.dependencies> |
|
125 |
<gvsig.package.info.categories>View,Geoprocess</gvsig.package.info.categories> |
|
126 |
<gvsig.package.info.poolURL>http://devel.gvsig.org/download/projects/gvsig-seismic/pool</gvsig.package.info.poolURL> |
|
127 |
<gvsig.package.info.operatingSystem>all</gvsig.package.info.operatingSystem> |
|
128 |
<gvsig.package.info.architecture>all</gvsig.package.info.architecture> |
|
129 |
<gvsig.install.plugin>true</gvsig.install.plugin> |
|
130 |
<gvsig.install.plugin.package>true</gvsig.install.plugin.package> |
|
131 |
</properties> |
|
132 |
|
|
133 |
|
|
134 |
|
|
135 |
|
|
136 |
<build> |
|
137 |
<plugins> |
|
138 |
|
|
139 |
<plugin> |
|
140 |
<!-- Skip compilation tests --> |
|
141 |
<groupId>org.apache.maven.plugins</groupId> |
|
142 |
<artifactId>maven-compiler-plugin</artifactId> |
|
143 |
<executions> |
|
144 |
<execution> |
|
145 |
<id>default-testCompile</id> |
|
146 |
<phase>process-test-sources</phase> |
|
147 |
<goals> |
|
148 |
<goal>testCompile</goal> |
|
149 |
</goals> |
|
150 |
<configuration> |
|
151 |
<skip>true</skip> |
|
152 |
</configuration> |
|
153 |
</execution> |
|
154 |
</executions> |
|
155 |
</plugin> |
|
156 |
|
|
157 |
<plugin> |
|
158 |
<!-- Skip test execution --> |
|
159 |
<groupId>org.apache.maven.plugins</groupId> |
|
160 |
<artifactId>maven-surefire-plugin</artifactId> |
|
161 |
<configuration> |
|
162 |
<skipTests>true</skipTests> |
|
163 |
</configuration> |
|
164 |
</plugin> |
|
165 |
|
|
166 |
</plugins> |
|
167 |
</build> |
|
168 |
|
|
169 |
|
|
170 |
</project> |
|
171 |
|
|
0 | 172 |
org.gvsig.seismic/tags/org.gvsig.seismic-1.0.111/org.gvsig.seismic/org.gvsig.seismic.app/org.gvsig.seismic.app.geoprocess/buildNumber.properties | ||
---|---|---|
1 |
#Fri Nov 15 00:11:27 CET 2013 |
|
2 |
buildNumber=2 |
|
0 | 3 |
org.gvsig.seismic/tags/org.gvsig.seismic-1.0.111/org.gvsig.seismic/org.gvsig.seismic.app/org.gvsig.seismic.app.geoprocess/src/main/java/org/gvsig/seismic/geoprocess/pointtoline/PointToLineParametersPanel.java | ||
---|---|---|
1 |
/** |
|
2 |
* gvSIG. Desktop Geographic Information System. |
|
3 |
* |
|
4 |
* Copyright (C) 2007-2012 gvSIG Association. |
|
5 |
* |
|
6 |
* This program is free software; you can redistribute it and/or |
|
7 |
* modify it under the terms of the GNU General Public License |
|
8 |
* as published by the Free Software Foundation; either version 2 |
|
9 |
* of the License, or (at your option) any later version. |
|
10 |
* |
|
11 |
* This program is distributed in the hope that it will be useful, |
|
12 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
13 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
14 |
* GNU General Public License for more details. |
|
15 |
* |
|
16 |
* You should have received a copy of the GNU General Public License |
|
17 |
* along with this program; if not, write to the Free Software |
|
18 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, |
|
19 |
* MA 02110-1301, USA. |
|
20 |
* |
|
21 |
* For any additional information, do not hesitate to contact us |
|
22 |
* at info AT gvsig.com, or visit our website www.gvsig.com. |
|
23 |
*/ |
|
24 |
package org.gvsig.seismic.geoprocess.pointtoline; |
|
25 |
|
|
26 |
import java.awt.BorderLayout; |
|
27 |
import java.awt.Color; |
|
28 |
import java.awt.Dimension; |
|
29 |
import java.awt.GridBagConstraints; |
|
30 |
import java.awt.GridBagLayout; |
|
31 |
import java.awt.Insets; |
|
32 |
import java.awt.ScrollPane; |
|
33 |
import java.awt.event.ActionEvent; |
|
34 |
import java.awt.event.ActionListener; |
|
35 |
import java.awt.event.MouseEvent; |
|
36 |
import java.awt.event.MouseListener; |
|
37 |
import java.util.ArrayList; |
|
38 |
import java.util.List; |
|
39 |
|
|
40 |
import javax.swing.AbstractButton; |
|
41 |
import javax.swing.BorderFactory; |
|
42 |
import javax.swing.BoxLayout; |
|
43 |
import javax.swing.ComboBoxModel; |
|
44 |
import javax.swing.DefaultComboBoxModel; |
|
45 |
import javax.swing.JButton; |
|
46 |
import javax.swing.JCheckBox; |
|
47 |
import javax.swing.JComboBox; |
|
48 |
import javax.swing.JLabel; |
|
49 |
import javax.swing.JPanel; |
|
50 |
import javax.swing.border.TitledBorder; |
|
51 |
|
|
52 |
import org.gvsig.fmap.dal.exception.DataException; |
|
53 |
import org.gvsig.fmap.dal.feature.FeatureStore; |
|
54 |
import org.gvsig.fmap.dal.feature.FeatureType; |
|
55 |
import org.gvsig.geoprocess.lib.api.GeoProcessLocator; |
|
56 |
import org.gvsig.geoprocess.lib.sextante.dataObjects.FlyrVectIVectorLayer; |
|
57 |
import org.gvsig.geoprocess.sextante.gui.algorithm.AlgorithmOutputPanel; |
|
58 |
import org.gvsig.tools.dataTypes.DataTypes; |
|
59 |
|
|
60 |
import es.unex.sextante.core.GeoAlgorithm; |
|
61 |
import es.unex.sextante.core.ObjectAndDescription; |
|
62 |
import es.unex.sextante.core.OutputObjectsSet; |
|
63 |
import es.unex.sextante.core.ParametersSet; |
|
64 |
import es.unex.sextante.core.Sextante; |
|
65 |
import es.unex.sextante.dataObjects.IVectorLayer; |
|
66 |
import es.unex.sextante.gui.algorithm.GeoAlgorithmParametersPanel; |
|
67 |
import es.unex.sextante.gui.algorithm.OutputChannelSelectionPanel; |
|
68 |
import es.unex.sextante.gui.core.SextanteGUI; |
|
69 |
import es.unex.sextante.outputs.Output; |
|
70 |
|
|
71 |
public class PointToLineParametersPanel extends GeoAlgorithmParametersPanel implements ActionListener, MouseListener { |
|
72 |
|
|
73 |
/** |
|
74 |
* |
|
75 |
*/ |
|
76 |
private static final long serialVersionUID = 7681551721513083013L; |
|
77 |
|
|
78 |
private GeoAlgorithm m_Algorithm = null; |
|
79 |
private List<JComboBox> groupingFields = null; |
|
80 |
private JComboBox layersCombo = null; |
|
81 |
private AlgorithmOutputPanel output = null; |
|
82 |
|
|
83 |
private OutputChannelSelectionPanel outputChannelSelectionPanel; |
|
84 |
private JPanel outputPanel; |
|
85 |
|
|
86 |
private JCheckBox joinByField = null; |
|
87 |
|
|
88 |
private JPanel fieldContainer; |
|
89 |
|
|
90 |
private JButton addButton; |
|
91 |
private JButton removebutton; |
|
92 |
|
|
93 |
private JLabel groupLabel = null; |
|
94 |
|
|
95 |
public PointToLineParametersPanel() { |
|
96 |
super(); |
|
97 |
} |
|
98 |
|
|
99 |
public void init(GeoAlgorithm algorithm) { |
|
100 |
m_Algorithm = algorithm; |
|
101 |
groupingFields = new ArrayList<JComboBox>(); |
|
102 |
|
|
103 |
initGUI(); |
|
104 |
reloadFields(); |
|
105 |
} |
|
106 |
|
|
107 |
private void initGUI() { |
|
108 |
this.setLayout(new BorderLayout()); |
|
109 |
groupLabel = new JLabel(); |
|
110 |
|
|
111 |
JPanel pan = new JPanel(); |
|
112 |
GridBagLayout gbl = new GridBagLayout(); |
|
113 |
pan.setLayout(gbl); |
|
114 |
pan.setBorder(BorderFactory.createLineBorder(Color.gray)); |
|
115 |
|
|
116 |
GridBagConstraints gbc = new GridBagConstraints(); |
|
117 |
gbc.fill = GridBagConstraints.HORIZONTAL; |
|
118 |
gbc.weightx = 1.0; |
|
119 |
gbc.gridx = 0; |
|
120 |
gbc.insets = new Insets(0, 4, 4, 4); |
|
121 |
|
|
122 |
gbc.gridy = 0; |
|
123 |
JPanel fileContainer0 = new JPanel(); |
|
124 |
fileContainer0.setPreferredSize(new Dimension(fileContainer0.getWidth(),65)); |
|
125 |
fileContainer0.setLayout(new BoxLayout(fileContainer0,BoxLayout.Y_AXIS)); |
|
126 |
fileContainer0.setBorder(new TitledBorder("Entrada")); |
|
127 |
fileContainer0.add(getComboPanel(GeoProcessLocator.getGeoProcessManager().getTranslation("grouping_layer"), getLayers1Combo())); |
|
128 |
pan.add(fileContainer0, gbc); |
|
129 |
|
|
130 |
|
|
131 |
gbc.gridy = 1; |
|
132 |
JPanel p = new JPanel(); |
|
133 |
p.setLayout(new BorderLayout()); |
|
134 |
p.setBorder(new TitledBorder("Opciones")); |
|
135 |
|
|
136 |
p.add(getCheckBox(),BorderLayout.WEST); |
|
137 |
p.add(getButtons(),BorderLayout.EAST); |
|
138 |
|
|
139 |
fieldContainer = new JPanel(); |
|
140 |
GridBagLayout gbl2 = new GridBagLayout(); |
|
141 |
fieldContainer.setLayout(gbl2); |
|
142 |
//fieldContainer.setPreferredSize(new Dimension(fileContainer0.getWidth(),65)); |
|
143 |
fieldContainer.setLayout(new BoxLayout(fieldContainer,BoxLayout.Y_AXIS)); |
|
144 |
fieldContainer.add(getFieldComboPanel()); |
|
145 |
|
|
146 |
p.add(fieldContainer, BorderLayout.SOUTH); |
|
147 |
|
|
148 |
pan.add(p, gbc); |
|
149 |
|
|
150 |
getFieldList(true); |
|
151 |
|
|
152 |
gbc.gridy = 5; |
|
153 |
JPanel fileContainer2 = new JPanel(); |
|
154 |
fileContainer2.setPreferredSize(new Dimension(fileContainer0.getWidth(),65)); |
|
155 |
fileContainer2.setLayout(new BoxLayout(fileContainer2,BoxLayout.Y_AXIS)); |
|
156 |
fileContainer2.setBorder(new TitledBorder("Salida")); |
|
157 |
fileContainer2.add(getOutputChannelSelectionPanel()); |
|
158 |
pan.add(fileContainer2, gbc); |
|
159 |
|
|
160 |
ScrollPane scroll = new ScrollPane(); |
|
161 |
scroll.setPreferredSize(new Dimension(scroll.getWidth(), 250)); |
|
162 |
scroll.add(pan); |
|
163 |
this.add(scroll, BorderLayout.CENTER); |
|
164 |
} |
|
165 |
|
|
166 |
private JPanel getButtons() { |
|
167 |
JPanel p = new JPanel(); |
|
168 |
p.add(getAddButton(),BorderLayout.WEST); |
|
169 |
p.add(getRemoveButton(),BorderLayout.EAST); |
|
170 |
return p; |
|
171 |
} |
|
172 |
|
|
173 |
private JCheckBox getCheckBox() { |
|
174 |
if(this.joinByField == null){ |
|
175 |
this.joinByField = new JCheckBox(GeoProcessLocator.getGeoProcessManager().getTranslation("Option")); |
|
176 |
this.joinByField.setSelected(true); |
|
177 |
this.joinByField.addActionListener(new ActionListener() { |
|
178 |
public void actionPerformed(ActionEvent arg0) { |
|
179 |
for(int i=0; i<groupingFields.size();i++){ |
|
180 |
groupingFields.get(i).setEnabled(joinByField.isSelected()); |
|
181 |
} |
|
182 |
getAddButton().setEnabled(joinByField.isSelected()); |
|
183 |
getRemoveButton().setEnabled(joinByField.isSelected()); |
|
184 |
groupLabel.setEnabled(joinByField.isSelected()); |
|
185 |
} |
|
186 |
|
|
187 |
}); |
|
188 |
} |
|
189 |
return joinByField; |
|
190 |
} |
|
191 |
|
|
192 |
private JButton getRemoveButton() { |
|
193 |
if(removebutton == null){ |
|
194 |
removebutton = new JButton("-"); |
|
195 |
removebutton.setPreferredSize(new Dimension(25,25)); |
|
196 |
removebutton.addActionListener(new ActionListener() { |
|
197 |
public void actionPerformed(ActionEvent arg0) { |
|
198 |
if(fieldContainer.getComponentCount()>1){ |
|
199 |
fieldContainer.remove(fieldContainer.getComponentCount()-1); |
|
200 |
groupingFields.remove(groupingFields.size()-1); |
|
201 |
refreshPanel(); |
|
202 |
} |
|
203 |
} |
|
204 |
}); |
|
205 |
} |
|
206 |
return removebutton; |
|
207 |
} |
|
208 |
|
|
209 |
private AbstractButton getAddButton() { |
|
210 |
if(addButton == null){ |
|
211 |
addButton = new JButton("+"); |
|
212 |
addButton.setPreferredSize(new Dimension(25,25)); |
|
213 |
addButton.addActionListener(new ActionListener() { |
|
214 |
public void actionPerformed(ActionEvent arg0) { |
|
215 |
fieldContainer.add(getFieldComboPanel()); |
|
216 |
refreshPanel(); |
|
217 |
} |
|
218 |
}); |
|
219 |
} |
|
220 |
return addButton; |
|
221 |
} |
|
222 |
|
|
223 |
private void refreshPanel() { |
|
224 |
fieldContainer.repaint(); |
|
225 |
fieldContainer.revalidate(); |
|
226 |
} |
|
227 |
/** |
|
228 |
* Gets the output panel (SEXTANTE) |
|
229 |
* @return |
|
230 |
*/ |
|
231 |
private JPanel getOutputChannelSelectionPanel() { |
|
232 |
if(outputPanel == null) { |
|
233 |
try { |
|
234 |
outputPanel = new JPanel(); |
|
235 |
outputPanel.setLayout(new BorderLayout()); |
|
236 |
final OutputObjectsSet ooSet = m_Algorithm.getOutputObjects(); |
|
237 |
final Output out = ooSet.getOutput(PointToLineAlgorithm.RESULT); |
|
238 |
outputChannelSelectionPanel = new OutputChannelSelectionPanel(out, m_Algorithm.getParameters()); |
|
239 |
outputPanel.add(new JLabel("Capa de salida [Vectorial] "), BorderLayout.WEST); |
|
240 |
outputPanel.add(outputChannelSelectionPanel, BorderLayout.CENTER); |
|
241 |
} catch (final Exception e) { |
|
242 |
Sextante.addErrorToLog(e); |
|
243 |
} |
|
244 |
} |
|
245 |
return outputPanel; |
|
246 |
} |
|
247 |
|
|
248 |
/** |
|
249 |
* Gets the output panel (DAL) |
|
250 |
* @return |
|
251 |
*/ |
|
252 |
@SuppressWarnings("unused") |
|
253 |
private AlgorithmOutputPanel getAlgorithmOutputPanel() { |
|
254 |
if(output == null) { |
|
255 |
output = new AlgorithmOutputPanel(); |
|
256 |
} |
|
257 |
return output; |
|
258 |
} |
|
259 |
|
|
260 |
public JPanel getComboPanel(String text, JComboBox combo) { |
|
261 |
JPanel panel = new JPanel(); |
|
262 |
GridBagLayout gbl = new GridBagLayout(); |
|
263 |
panel.setLayout(gbl); |
|
264 |
|
|
265 |
GridBagConstraints gbc = new GridBagConstraints(); |
|
266 |
gbc.fill = GridBagConstraints.NONE; |
Also available in: Unified diff