Revision 3980
org.gvsig.vectorediting/tags/org.gvsig.vectorediting-1.0.239/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 |
<groupId>org.gvsig</groupId> |
|
5 |
<artifactId>org.gvsig.vectorediting</artifactId> |
|
6 |
<packaging>pom</packaging> |
|
7 |
<version>1.0.239</version> |
|
8 |
<name>${project.artifactId}</name> |
|
9 |
<description>Vectorediting project</description> |
|
10 |
<parent> |
|
11 |
<groupId>org.gvsig</groupId> |
|
12 |
<artifactId>org.gvsig.desktop</artifactId> |
|
13 |
<version>2.0.419</version> |
|
14 |
</parent> |
|
15 |
<url>https://devel.gvsig.org/sites/org.gvsig.vectorediting/${project.version}</url> |
|
16 |
<scm> |
|
17 |
<connection>scm:svn:https://devel.gvsig.org/svn/gvsig-vectorediting/org.gvsig.vectorediting/tags/org.gvsig.vectorediting-1.0.239</connection> |
|
18 |
<developerConnection>scm:svn:https://devel.gvsig.org/svn/gvsig-vectorediting/org.gvsig.vectorediting/tags/org.gvsig.vectorediting-1.0.239</developerConnection> |
|
19 |
<url>https://devel.gvsig.org/redmine/projects/gvsig-vector-editing/repository/show/org.gvsig.vectorediting/tags/org.gvsig.vectorediting-1.0.239</url> |
|
20 |
</scm> |
|
21 |
<repositories> |
|
22 |
<repository> |
|
23 |
<id>gvsig-public-http-repository</id> |
|
24 |
<name>gvSIG maven public HTTP repository</name> |
|
25 |
<url>http://devel.gvsig.org/m2repo/j2se</url> |
|
26 |
<releases> |
|
27 |
<enabled>true</enabled> |
|
28 |
<updatePolicy>daily</updatePolicy> |
|
29 |
<checksumPolicy>warn</checksumPolicy> |
|
30 |
</releases> |
|
31 |
<snapshots> |
|
32 |
<enabled>true</enabled> |
|
33 |
<updatePolicy>daily</updatePolicy> |
|
34 |
<checksumPolicy>warn</checksumPolicy> |
|
35 |
</snapshots> |
|
36 |
</repository> |
|
37 |
</repositories> |
|
38 |
|
|
39 |
<distributionManagement> |
|
40 |
<site> |
|
41 |
<id>gvsig-repository</id> |
|
42 |
<url>dav:https://devel.gvsig.org/download/projects/gvsig-vectorediting/pool/${project.artifactId}/${project.version}</url> |
|
43 |
</site> |
|
44 |
</distributionManagement> |
|
45 |
|
|
46 |
<build> |
|
47 |
<plugins> |
|
48 |
<plugin> |
|
49 |
<groupId>org.apache.maven.plugins</groupId> |
|
50 |
<artifactId>maven-release-plugin</artifactId> |
|
51 |
<configuration> |
|
52 |
<tagBase>https://devel.gvsig.org/svn/gvsig-vectorediting/org.gvsig.vectorediting/tags</tagBase> |
|
53 |
</configuration> |
|
54 |
</plugin> |
|
55 |
</plugins> |
|
56 |
</build> |
|
57 |
|
|
58 |
<modules> |
|
59 |
<module>org.gvsig.vectorediting.lib</module> |
|
60 |
<module>org.gvsig.vectorediting.swing</module> |
|
61 |
<module>org.gvsig.vectorediting.main</module> |
|
62 |
<module>org.gvsig.vectorediting.app</module> |
|
63 |
</modules> |
|
64 |
|
|
65 |
<dependencyManagement> |
|
66 |
<dependencies> |
|
67 |
<dependency> |
|
68 |
<groupId>org.gvsig</groupId> |
|
69 |
<artifactId>org.gvsig.vectorediting.lib.api</artifactId> |
|
70 |
<version>1.0.239</version> |
|
71 |
</dependency> |
|
72 |
<dependency> |
|
73 |
<groupId>org.gvsig</groupId> |
|
74 |
<artifactId> |
|
75 |
org.gvsig.vectorediting.lib.impl |
|
76 |
</artifactId> |
|
77 |
<version>1.0.239</version> |
|
78 |
</dependency> |
|
79 |
<dependency> |
|
80 |
<groupId>org.gvsig</groupId> |
|
81 |
<artifactId>org.gvsig.vectorediting.lib.spi</artifactId> |
|
82 |
<version>1.0.239</version> |
|
83 |
</dependency> |
|
84 |
<dependency> |
|
85 |
<groupId>org.gvsig</groupId> |
|
86 |
<artifactId> |
|
87 |
org.gvsig.vectorediting.swing.api |
|
88 |
</artifactId> |
|
89 |
<version>1.0.239</version> |
|
90 |
</dependency> |
|
91 |
<dependency> |
|
92 |
<groupId>org.gvsig</groupId> |
|
93 |
<artifactId> |
|
94 |
org.gvsig.vectorediting.swing.impl |
|
95 |
</artifactId> |
|
96 |
<version>1.0.239</version> |
|
97 |
</dependency> |
|
98 |
<dependency> |
|
99 |
<groupId>org.gvsig</groupId> |
|
100 |
<artifactId> |
|
101 |
org.gvsig.vectorediting.lib.prov.point |
|
102 |
</artifactId> |
|
103 |
<version>1.0.239</version> |
|
104 |
</dependency> |
|
105 |
<dependency> |
|
106 |
<groupId>org.gvsig</groupId> |
|
107 |
<artifactId> |
|
108 |
org.gvsig.vectorediting.lib.prov.circlecr |
|
109 |
</artifactId> |
|
110 |
<version>1.0.239</version> |
|
111 |
</dependency> |
|
112 |
<dependency> |
|
113 |
<groupId>org.gvsig</groupId> |
|
114 |
<artifactId> |
|
115 |
org.gvsig.vectorediting.lib.prov.polyline |
|
116 |
</artifactId> |
|
117 |
<version>1.0.239</version> |
|
118 |
</dependency> |
|
119 |
<dependency> |
|
120 |
<groupId>org.gvsig</groupId> |
|
121 |
<artifactId> |
|
122 |
org.gvsig.vectorediting.lib.prov.symmetry |
|
123 |
</artifactId> |
|
124 |
<version>1.0.0-SNAPSHOT</version> |
|
125 |
</dependency> |
|
126 |
<dependency> |
|
127 |
<groupId>org.gvsig</groupId> |
|
128 |
<artifactId> |
|
129 |
org.gvsig.vectorediting.lib.prov.internalpolygon |
|
130 |
</artifactId> |
|
131 |
<version>1.0.239</version> |
|
132 |
</dependency> |
|
133 |
<dependency> |
|
134 |
<groupId>org.gvsig</groupId> |
|
135 |
<artifactId> |
|
136 |
org.gvsig.vectorediting.lib.prov.line |
|
137 |
</artifactId> |
|
138 |
<version>1.0.239</version> |
|
139 |
</dependency> |
|
140 |
<dependency> |
|
141 |
<groupId>org.gvsig</groupId> |
|
142 |
<artifactId> |
|
143 |
org.gvsig.vectorediting.lib.prov.arc |
|
144 |
</artifactId> |
|
145 |
<version>1.0.239</version> |
|
146 |
</dependency> |
|
147 |
<dependency> |
|
148 |
<groupId>org.gvsig</groupId> |
|
149 |
<artifactId> |
|
150 |
org.gvsig.vectorediting.app.mainplugin |
|
151 |
</artifactId> |
|
152 |
<version>1.0.239</version> |
|
153 |
</dependency> |
|
154 |
<dependency> |
|
155 |
<groupId>org.gvsig</groupId> |
|
156 |
<artifactId> |
|
157 |
org.gvsig.vectorediting.lib.prov.ellipse |
|
158 |
</artifactId> |
|
159 |
<version>1.0.239</version> |
|
160 |
</dependency> |
|
161 |
<dependency> |
|
162 |
<groupId>org.gvsig</groupId> |
|
163 |
<artifactId> |
|
164 |
org.gvsig.vectorediting.lib.prov.regularpolygon |
|
165 |
</artifactId> |
|
166 |
<version>1.0.239</version> |
|
167 |
</dependency> |
|
168 |
<dependency> |
|
169 |
<groupId>org.gvsig</groupId> |
|
170 |
<artifactId> |
|
171 |
org.gvsig.vectorediting.lib.prov.rectangle |
|
172 |
</artifactId> |
|
173 |
<version>1.0.239</version> |
|
174 |
</dependency> |
|
175 |
<dependency> |
|
176 |
<groupId>org.gvsig</groupId> |
|
177 |
<artifactId> |
|
178 |
org.gvsig.vectorediting.lib.prov.spline |
|
179 |
</artifactId> |
|
180 |
<version>1.0.239</version> |
|
181 |
</dependency> |
|
182 |
<dependency> |
|
183 |
<groupId>org.gvsig</groupId> |
|
184 |
<artifactId> |
|
185 |
org.gvsig.vectorediting.lib.prov.circle3p |
|
186 |
</artifactId> |
|
187 |
<version>1.0.239</version> |
|
188 |
</dependency> |
|
189 |
<dependency> |
|
190 |
<groupId>org.gvsig</groupId> |
|
191 |
<artifactId> |
|
192 |
org.gvsig.vectorediting.lib.prov.explode |
|
193 |
</artifactId> |
|
194 |
<version>1.0.239</version> |
|
195 |
</dependency> |
|
196 |
<dependency> |
|
197 |
<groupId>org.gvsig</groupId> |
|
198 |
<artifactId> |
|
199 |
org.gvsig.vectorediting.lib.prov.move |
|
200 |
</artifactId> |
|
201 |
<version>1.0.239</version> |
|
202 |
</dependency> |
|
203 |
<dependency> |
|
204 |
<groupId>org.gvsig</groupId> |
|
205 |
<artifactId> |
|
206 |
org.gvsig.vectorediting.lib.prov.rotate |
|
207 |
</artifactId> |
|
208 |
<version>1.0.239</version> |
|
209 |
</dependency> |
|
210 |
<dependency> |
|
211 |
<groupId>org.gvsig</groupId> |
|
212 |
<artifactId> |
|
213 |
org.gvsig.vectorediting.lib.prov.duplicate |
|
214 |
</artifactId> |
|
215 |
<version>1.0.239</version> |
|
216 |
</dependency> |
|
217 |
<dependency> |
|
218 |
<groupId>org.gvsig</groupId> |
|
219 |
<artifactId> |
|
220 |
org.gvsig.vectorediting.lib.prov.splitline |
|
221 |
</artifactId> |
|
222 |
<version>1.0.239</version> |
|
223 |
</dependency> |
|
224 |
<dependency> |
|
225 |
<groupId>org.gvsig</groupId> |
|
226 |
<artifactId> |
|
227 |
org.gvsig.vectorediting.lib.prov.scale |
|
228 |
</artifactId> |
|
229 |
<version>1.0.239</version> |
|
230 |
</dependency> |
|
231 |
<dependency> |
|
232 |
<groupId>org.gvsig</groupId> |
|
233 |
<artifactId> |
|
234 |
org.gvsig.vectorediting.lib.prov.simplify |
|
235 |
</artifactId> |
|
236 |
<version>1.0.239</version> |
|
237 |
</dependency> |
|
238 |
<dependency> |
|
239 |
<groupId>org.gvsig</groupId> |
|
240 |
<artifactId> |
|
241 |
org.gvsig.vectorediting.lib.prov.multipoint |
|
242 |
</artifactId> |
|
243 |
<version>1.0.239</version> |
|
244 |
</dependency> |
|
245 |
<dependency> |
|
246 |
<groupId>org.gvsig</groupId> |
|
247 |
<artifactId> |
|
248 |
org.gvsig.vectorediting.lib.prov.autopolygon |
|
249 |
</artifactId> |
|
250 |
<version>1.0.239</version> |
|
251 |
</dependency> |
|
252 |
<dependency> |
|
253 |
<groupId>org.gvsig</groupId> |
|
254 |
<artifactId> |
|
255 |
org.gvsig.vectorediting.lib.prov.join |
|
256 |
</artifactId> |
|
257 |
<version>1.0.239</version> |
|
258 |
</dependency> |
|
259 |
<dependency> |
|
260 |
<groupId>org.gvsig</groupId> |
|
261 |
<artifactId> |
|
262 |
org.gvsig.vectorediting.lib.prov.stretch |
|
263 |
</artifactId> |
|
264 |
<version>1.0.239</version> |
|
265 |
</dependency> |
|
266 |
<dependency> |
|
267 |
<groupId>org.gvsig</groupId> |
|
268 |
<artifactId> |
|
269 |
org.gvsig.vectorediting.lib.prov.extendline |
|
270 |
</artifactId> |
|
271 |
<version>1.0.239</version> |
|
272 |
</dependency> |
|
273 |
<dependency> |
|
274 |
<groupId>org.gvsig</groupId> |
|
275 |
<artifactId> |
|
276 |
org.gvsig.vectorediting.lib.prov.split |
|
277 |
</artifactId> |
|
278 |
<version>1.0.239</version> |
|
279 |
</dependency> |
|
280 |
<dependency> |
|
281 |
<groupId>org.gvsig</groupId> |
|
282 |
<artifactId> |
|
283 |
org.gvsig.vectorediting.lib.prov.smoothline |
|
284 |
</artifactId> |
|
285 |
<version>1.0.239</version> |
|
286 |
</dependency> |
|
287 |
<dependency> |
|
288 |
<groupId>org.gvsig</groupId> |
|
289 |
<artifactId> |
|
290 |
org.gvsig.vectorediting.lib.prov.trimline |
|
291 |
</artifactId> |
|
292 |
<version>1.0.239</version> |
|
293 |
</dependency> |
|
294 |
<dependency> |
|
295 |
<groupId>org.gvsig</groupId> |
|
296 |
<artifactId> |
|
297 |
org.gvsig.vectorediting.lib.prov.rectangularmatrix |
|
298 |
</artifactId> |
|
299 |
<version>1.0.239</version> |
|
300 |
</dependency> |
|
301 |
<dependency> |
|
302 |
<groupId>org.gvsig</groupId> |
|
303 |
<artifactId> |
|
304 |
org.gvsig.vectorediting.lib.prov.polarmatrix |
|
305 |
</artifactId> |
|
306 |
<version>1.0.239</version> |
|
307 |
</dependency> |
|
308 |
|
|
309 |
<dependency> |
|
310 |
<groupId>org.gvsig</groupId> |
|
311 |
<artifactId> |
|
312 |
org.gvsig.vectorediting.lib.prov.editvertex |
|
313 |
</artifactId> |
|
314 |
<version>1.0.239</version> |
|
315 |
</dependency> |
|
316 |
<dependency> |
|
317 |
<groupId>org.gvsig</groupId> |
|
318 |
<artifactId> |
|
319 |
org.gvsig.vectorediting.lib.prov.remove |
|
320 |
</artifactId> |
|
321 |
<version>1.0.239</version> |
|
322 |
</dependency> |
|
323 |
<dependency> |
|
324 |
<groupId>org.gvsig</groupId> |
|
325 |
<artifactId>org.gvsig.vectorediting.lib.prov.converttopolyline</artifactId> |
|
326 |
<version>1.0.239</version> |
|
327 |
</dependency> |
|
328 |
<dependency> |
|
329 |
<groupId>org.gvsig</groupId> |
|
330 |
<artifactId>org.gvsig.vectorediting.lib.prov.reversedirection</artifactId> |
|
331 |
<version>1.0.239</version> |
|
332 |
</dependency> |
|
333 |
<dependency> |
|
334 |
<groupId>org.gvsig</groupId> |
|
335 |
<artifactId>org.gvsig.vectorediting.lib.prov.align</artifactId> |
|
336 |
<version>1.0.239</version> |
|
337 |
</dependency> |
|
338 |
<dependency> |
|
339 |
<groupId>org.gvsig</groupId> |
|
340 |
<artifactId>org.gvsig.vectorediting.lib.prov.chamfer</artifactId> |
|
341 |
<version>1.0.239</version> |
|
342 |
</dependency> |
|
343 |
<dependency> |
|
344 |
<groupId>org.gvsig</groupId> |
|
345 |
<artifactId>org.gvsig.vectorediting.lib.prov.parabolicfillet</artifactId> |
|
346 |
<version>1.0.185-SNAPSHOT</version> |
|
347 |
</dependency> |
|
348 |
</dependencies> |
|
349 |
</dependencyManagement> |
|
350 |
</project> |
org.gvsig.vectorediting/tags/org.gvsig.vectorediting-1.0.239/org.gvsig.vectorediting.main/src/main/resources/README.txt | ||
---|---|---|
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 |
|
|
25 |
Put into this folder the resources needed by your classes. |
|
26 |
|
|
27 |
This folder is added to the classpath, so you can load any resources |
|
28 |
through the ClassLoader. |
|
29 |
|
|
30 |
By default, in this folder you can find an example of log4j configuration, |
|
31 |
prepared to log messages through the console, so logging works when you |
|
32 |
run your classes. |
org.gvsig.vectorediting/tags/org.gvsig.vectorediting-1.0.239/org.gvsig.vectorediting.main/src/main/resources/log4j.xml | ||
---|---|---|
1 |
<?xml version="1.0" encoding="ISO-8859-1" ?> |
|
2 |
<!-- |
|
3 |
|
|
4 |
gvSIG. Desktop Geographic Information System. |
|
5 |
|
|
6 |
Copyright (C) 2007-2012 gvSIG Association. |
|
7 |
|
|
8 |
This program is free software; you can redistribute it and/or |
|
9 |
modify it under the terms of the GNU General Public License |
|
10 |
as published by the Free Software Foundation; either version 2 |
|
11 |
of the License, or (at your option) any later version. |
|
12 |
|
|
13 |
This program is distributed in the hope that it will be useful, |
|
14 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
15 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
16 |
GNU General Public License for more details. |
|
17 |
|
|
18 |
You should have received a copy of the GNU General Public License |
|
19 |
along with this program; if not, write to the Free Software |
|
20 |
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, |
|
21 |
MA 02110-1301, USA. |
|
22 |
|
|
23 |
For any additional information, do not hesitate to contact us |
|
24 |
at info AT gvsig.com, or visit our website www.gvsig.com. |
|
25 |
|
|
26 |
--> |
|
27 |
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd"> |
|
28 |
|
|
29 |
<!-- |
|
30 |
Log4J configuration file for unit tests execution. |
|
31 |
--> |
|
32 |
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/"> |
|
33 |
|
|
34 |
<!-- Appender configuration to show logging messages through the console --> |
|
35 |
<appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender"> |
|
36 |
<layout class="org.apache.log4j.PatternLayout"> |
|
37 |
<param name="ConversionPattern" value="%d{HH:mm:ss,SSS} %-5p [%c{2}.%M()]\n %m%n" /> |
|
38 |
</layout> |
|
39 |
</appender> |
|
40 |
|
|
41 |
<!-- |
|
42 |
Activate logging messages of DEBUG level of higher only for the |
|
43 |
org.gvsig.tools packages. |
|
44 |
You can put full classes names or packages instead, to configure |
|
45 |
logging for all the classes and subpackages of the package. |
|
46 |
--> |
|
47 |
<category name="org.gvsig.tools"> |
|
48 |
<priority value="DEBUG" /> |
|
49 |
</category> |
|
50 |
<category name="org.gvsig.vectorediting"> |
|
51 |
<priority value="DEBUG" /> |
|
52 |
</category> |
|
53 |
|
|
54 |
<!-- |
|
55 |
By default, show only logging messages of INFO level or higher, |
|
56 |
through the previously configured CONSOLE appender. |
|
57 |
--> |
|
58 |
<root> |
|
59 |
<priority value="INFO" /> |
|
60 |
<appender-ref ref="CONSOLE" /> |
|
61 |
</root> |
|
62 |
</log4j:configuration> |
org.gvsig.vectorediting/tags/org.gvsig.vectorediting-1.0.239/org.gvsig.vectorediting.main/src/main/java/org/gvsig/vectorediting/main/package.html | ||
---|---|---|
1 |
<?xml version="1.0" encoding="UTF-8" ?> |
|
2 |
<!-- |
|
3 |
|
|
4 |
gvSIG. Desktop Geographic Information System. |
|
5 |
|
|
6 |
Copyright (C) 2007-2012 gvSIG Association. |
|
7 |
|
|
8 |
This program is free software; you can redistribute it and/or |
|
9 |
modify it under the terms of the GNU General Public License |
|
10 |
as published by the Free Software Foundation; either version 2 |
|
11 |
of the License, or (at your option) any later version. |
|
12 |
|
|
13 |
This program is distributed in the hope that it will be useful, |
|
14 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
15 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
16 |
GNU General Public License for more details. |
|
17 |
|
|
18 |
You should have received a copy of the GNU General Public License |
|
19 |
along with this program; if not, write to the Free Software |
|
20 |
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, |
|
21 |
MA 02110-1301, USA. |
|
22 |
|
|
23 |
For any additional information, do not hesitate to contact us |
|
24 |
at info AT gvsig.com, or visit our website www.gvsig.com. |
|
25 |
|
|
26 |
--> |
|
27 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
|
28 |
<html xmlns="http://www.w3.org/1999/xhtml"> |
|
29 |
<head> |
|
30 |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> |
|
31 |
<title>org.gvsig.vectorediting package documentation</title> |
|
32 |
</head> |
|
33 |
<body> |
|
34 |
|
|
35 |
<p>Vectorediting library testing and demo application.</p> |
|
36 |
|
|
37 |
</body> |
|
38 |
</html> |
org.gvsig.vectorediting/tags/org.gvsig.vectorediting-1.0.239/org.gvsig.vectorediting.main/src/main/java/org/gvsig/vectorediting/main/DummieLayerOrderManager.java | ||
---|---|---|
1 |
/** |
|
2 |
* gvSIG. Desktop Geographic Information System. |
|
3 |
* |
|
4 |
* Copyright ? 2007-2014 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 |
|
|
25 |
package org.gvsig.vectorediting.main; |
|
26 |
|
|
27 |
import org.gvsig.fmap.mapcontext.layers.FLayer; |
|
28 |
import org.gvsig.fmap.mapcontext.layers.FLayers; |
|
29 |
import org.gvsig.fmap.mapcontext.layers.order.LayerOrderManager; |
|
30 |
import org.gvsig.tools.persistence.PersistentState; |
|
31 |
import org.gvsig.tools.persistence.exception.PersistenceException; |
|
32 |
|
|
33 |
public class DummieLayerOrderManager implements LayerOrderManager { |
|
34 |
|
|
35 |
@Override |
|
36 |
public void saveToState(PersistentState state) throws PersistenceException { |
|
37 |
} |
|
38 |
|
|
39 |
@Override |
|
40 |
public void loadFromState(PersistentState state) |
|
41 |
throws PersistenceException { |
|
42 |
} |
|
43 |
|
|
44 |
@Override |
|
45 |
public int getPosition(FLayers target, FLayer newLayer) { |
|
46 |
return 0; |
|
47 |
} |
|
48 |
|
|
49 |
@Override |
|
50 |
public String getName() { |
|
51 |
return null; |
|
52 |
} |
|
53 |
|
|
54 |
@Override |
|
55 |
public String getDescription() { |
|
56 |
return null; |
|
57 |
} |
|
58 |
|
|
59 |
@Override |
|
60 |
public String getCode() { |
|
61 |
return null; |
|
62 |
} |
|
63 |
|
|
64 |
@Override |
|
65 |
public Object clone() throws CloneNotSupportedException { |
|
66 |
return new DummieLayerOrderManager(); |
|
67 |
} |
|
68 |
|
|
69 |
} |
org.gvsig.vectorediting/tags/org.gvsig.vectorediting-1.0.239/org.gvsig.vectorediting.main/src/main/java/org/gvsig/vectorediting/main/Main.java | ||
---|---|---|
1 |
/** |
|
2 |
* gvSIG. Desktop Geographic Information System. |
|
3 |
* |
|
4 |
* Copyright ? 2007-2014 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 |
|
|
25 |
package org.gvsig.vectorediting.main; |
|
26 |
|
|
27 |
import java.awt.BorderLayout; |
|
28 |
import java.awt.Dimension; |
|
29 |
import java.awt.GridLayout; |
|
30 |
import java.awt.event.ActionEvent; |
|
31 |
import java.io.File; |
|
32 |
import java.util.ArrayList; |
|
33 |
import java.util.List; |
|
34 |
|
|
35 |
import javax.swing.AbstractAction; |
|
36 |
import javax.swing.JButton; |
|
37 |
import javax.swing.JFileChooser; |
|
38 |
import javax.swing.JFrame; |
|
39 |
import javax.swing.JMenu; |
|
40 |
import javax.swing.JMenuBar; |
|
41 |
import javax.swing.JMenuItem; |
|
42 |
import javax.swing.JToolBar; |
|
43 |
import javax.swing.SwingUtilities; |
|
44 |
import javax.swing.WindowConstants; |
|
45 |
|
|
46 |
import org.cresques.cts.IProjection; |
|
47 |
import org.slf4j.Logger; |
|
48 |
import org.slf4j.LoggerFactory; |
|
49 |
|
|
50 |
import org.gvsig.fmap.crs.CRSFactory; |
|
51 |
import org.gvsig.fmap.dal.DALLocator; |
|
52 |
import org.gvsig.fmap.dal.DataManager; |
|
53 |
import org.gvsig.fmap.dal.DataStoreParameters; |
|
54 |
import org.gvsig.fmap.dal.exception.InitializeException; |
|
55 |
import org.gvsig.fmap.dal.exception.ProviderNotRegisteredException; |
|
56 |
import org.gvsig.fmap.dal.exception.ValidateDataParametersException; |
|
57 |
import org.gvsig.fmap.dal.feature.FeatureStore; |
|
58 |
import org.gvsig.fmap.geom.primitive.Envelope; |
|
59 |
import org.gvsig.fmap.mapcontext.MapContext; |
|
60 |
import org.gvsig.fmap.mapcontext.MapContextLocator; |
|
61 |
import org.gvsig.fmap.mapcontext.MapContextManager; |
|
62 |
import org.gvsig.fmap.mapcontext.ViewPort; |
|
63 |
import org.gvsig.fmap.mapcontext.exceptions.LoadLayerException; |
|
64 |
import org.gvsig.fmap.mapcontext.layers.FLayer; |
|
65 |
import org.gvsig.fmap.mapcontext.layers.vectorial.FLyrVect; |
|
66 |
import org.gvsig.fmap.mapcontrol.MapControl; |
|
67 |
import org.gvsig.fmap.mapcontrol.MapControlCreationException; |
|
68 |
import org.gvsig.fmap.mapcontrol.MapControlLocator; |
|
69 |
import org.gvsig.fmap.mapcontrol.MapControlManager; |
|
70 |
import org.gvsig.fmap.mapcontrol.tools.PanListenerImpl; |
|
71 |
import org.gvsig.fmap.mapcontrol.tools.PointSelectionListener; |
|
72 |
import org.gvsig.fmap.mapcontrol.tools.ZoomInListenerImpl; |
|
73 |
import org.gvsig.fmap.mapcontrol.tools.ZoomOutListenerImpl; |
|
74 |
import org.gvsig.fmap.mapcontrol.tools.Behavior.Behavior; |
|
75 |
import org.gvsig.fmap.mapcontrol.tools.Behavior.MoveBehavior; |
|
76 |
import org.gvsig.fmap.mapcontrol.tools.Behavior.PointBehavior; |
|
77 |
import org.gvsig.fmap.mapcontrol.tools.Behavior.RectangleBehavior; |
|
78 |
import org.gvsig.tools.library.impl.DefaultLibrariesInitializer; |
|
79 |
import org.gvsig.tools.observer.Observable; |
|
80 |
import org.gvsig.tools.observer.Observer; |
|
81 |
import org.gvsig.tools.swing.api.ToolsSwingLocator; |
|
82 |
import org.gvsig.tools.swing.api.threadsafedialogs.ThreadSafeDialogsManager; |
|
83 |
import org.gvsig.utils.GenericFileFilter; |
|
84 |
import org.gvsig.vectorediting.lib.api.EditingLocator; |
|
85 |
import org.gvsig.vectorediting.lib.api.EditingManager; |
|
86 |
import org.gvsig.vectorediting.lib.prov.arc.ArcEditingProviderFactory; |
|
87 |
import org.gvsig.vectorediting.lib.prov.autopolygon.AutopolygonEditingProviderFactory; |
|
88 |
import org.gvsig.vectorediting.lib.prov.circle3p.Circle3PEditingProviderFactory; |
|
89 |
import org.gvsig.vectorediting.lib.prov.circle3p.Circumference3PEditingProviderFactory; |
|
90 |
import org.gvsig.vectorediting.lib.prov.circlecr.CircleCREditingProviderFactory; |
|
91 |
import org.gvsig.vectorediting.lib.prov.circlecr.CircumferenceCREditingProviderFactory; |
|
92 |
import org.gvsig.vectorediting.lib.prov.duplicate.DuplicateEditingProviderFactory; |
|
93 |
import org.gvsig.vectorediting.lib.prov.editvertex.EditVertexEditingProviderFactory; |
|
94 |
import org.gvsig.vectorediting.lib.prov.ellipse.EllipseEditingProviderFactory; |
|
95 |
import org.gvsig.vectorediting.lib.prov.ellipse.FilledEllipseEditingProviderFactory; |
|
96 |
import org.gvsig.vectorediting.lib.prov.explode.ExplodeEditingProviderFactory; |
|
97 |
import org.gvsig.vectorediting.lib.prov.extendline.ExtendLineEditingProviderFactory; |
|
98 |
import org.gvsig.vectorediting.lib.prov.internalpolygon.InternalPolygonEditingProviderFactory; |
|
99 |
import org.gvsig.vectorediting.lib.prov.join.JoinEditingProviderFactory; |
|
100 |
import org.gvsig.vectorediting.lib.prov.line.LineEditingProviderFactory; |
|
101 |
import org.gvsig.vectorediting.lib.prov.move.MoveEditingProviderFactory; |
|
102 |
import org.gvsig.vectorediting.lib.prov.multipoint.MultipointEditingProviderFactory; |
|
103 |
import org.gvsig.vectorediting.lib.prov.point.PointEditingProviderFactory; |
|
104 |
import org.gvsig.vectorediting.lib.prov.polarmatrix.PolarMatrixEditingProviderFactory; |
|
105 |
import org.gvsig.vectorediting.lib.prov.polyline.PolygonEditingProviderFactory; |
|
106 |
import org.gvsig.vectorediting.lib.prov.polyline.PolylineEditingProviderFactory; |
|
107 |
import org.gvsig.vectorediting.lib.prov.rectangle.FilledRectangleEditingProviderFactory; |
|
108 |
import org.gvsig.vectorediting.lib.prov.rectangle.RectangleEditingProviderFactory; |
|
109 |
import org.gvsig.vectorediting.lib.prov.rectangularmatrix.RectangularMatrixEditingProviderFactory; |
|
110 |
import org.gvsig.vectorediting.lib.prov.regularpolygon.FilledRegularPolygonEditingProviderFactory; |
|
111 |
import org.gvsig.vectorediting.lib.prov.regularpolygon.RegularPolygonEditingProviderFactory; |
|
112 |
import org.gvsig.vectorediting.lib.prov.rotate.RotateEditingProviderFactory; |
|
113 |
import org.gvsig.vectorediting.lib.prov.scale.ScaleEditingProviderFactory; |
|
114 |
import org.gvsig.vectorediting.lib.prov.simplify.SimplifyEditingProviderFactory; |
|
115 |
import org.gvsig.vectorediting.lib.prov.smoothline.SmoothLineEditingProviderFactory; |
|
116 |
import org.gvsig.vectorediting.lib.prov.spline.FilledSplineEditingProviderFactory; |
|
117 |
import org.gvsig.vectorediting.lib.prov.spline.SplineEditingProviderFactory; |
|
118 |
import org.gvsig.vectorediting.lib.prov.split.SplitEditingProviderFactory; |
|
119 |
import org.gvsig.vectorediting.lib.prov.splitline.SplitLineEditingProviderFactory; |
|
120 |
import org.gvsig.vectorediting.lib.prov.stretch.StretchEditingProviderFactory; |
|
121 |
import org.gvsig.vectorediting.lib.prov.trimline.TrimLineEditingProviderFactory; |
|
122 |
import org.gvsig.vectorediting.lib.spi.EditingProviderLocator; |
|
123 |
import org.gvsig.vectorediting.lib.spi.EditingProviderManager; |
|
124 |
import org.gvsig.vectorediting.swing.api.EditingContext; |
|
125 |
import org.gvsig.vectorediting.swing.api.EditingSwingLocator; |
|
126 |
import org.gvsig.vectorediting.swing.api.EditingSwingManager; |
|
127 |
import org.gvsig.vectorediting.swing.impl.DefaultEditingBehavior; |
|
128 |
|
|
129 |
/** |
|
130 |
* Main executable class for testing the VectorEditing library. |
|
131 |
* |
|
132 |
* @author gvSIG Team |
|
133 |
* @version $Id$ |
|
134 |
*/ |
|
135 |
public class Main implements Observer { |
|
136 |
|
|
137 |
public static void main(String args[]) { |
|
138 |
new DefaultLibrariesInitializer().fullInitialize(); |
|
139 |
Main main = new Main(); |
|
140 |
main.doMain(); |
|
141 |
} |
|
142 |
|
|
143 |
private static final Logger logger = LoggerFactory.getLogger(Main.class); |
|
144 |
|
|
145 |
final EditingManager manager; |
|
146 |
|
|
147 |
final EditingSwingManager swingManager; |
|
148 |
|
|
149 |
final EditingProviderManager providerManager; |
|
150 |
|
|
151 |
final MapControlManager mapControlManager; |
|
152 |
|
|
153 |
final DataManager dataManager; |
|
154 |
|
|
155 |
final MapContextManager mapContextManager; |
|
156 |
|
|
157 |
DefaultEditingBehavior editingBehavior; |
|
158 |
|
|
159 |
MapControl mapControl; |
|
160 |
|
|
161 |
EditingContext editingContext; |
|
162 |
|
|
163 |
FeatureStore store; |
|
164 |
|
|
165 |
FLyrVect currentLayer; |
|
166 |
|
|
167 |
final String DEFAULT_CRS_CODE = "EPSG:23030"; |
|
168 |
|
|
169 |
IProjection defaultProjection; |
|
170 |
|
|
171 |
JFrame mainFrame; |
|
172 |
|
|
173 |
JFrame paletteTools; |
|
174 |
|
|
175 |
JButton openPaletteToolsButtons; |
|
176 |
|
|
177 |
JButton editingExtensionButtons; |
|
178 |
|
|
179 |
JButton endEditingExtensionButtons; |
|
180 |
|
|
181 |
JButton cleanMapButton; |
|
182 |
|
|
183 |
List<JButton> buttons; |
|
184 |
|
|
185 |
public Main() { |
|
186 |
manager = EditingLocator.getManager(); |
|
187 |
swingManager = EditingSwingLocator.getSwingManager(); |
|
188 |
providerManager = EditingProviderLocator.getProviderManager(); |
|
189 |
mapControlManager = MapControlLocator.getMapControlManager(); |
|
190 |
dataManager = DALLocator.getDataManager(); |
|
191 |
mapContextManager = MapContextLocator.getMapContextManager(); |
|
192 |
defaultProjection = CRSFactory.getCRS(DEFAULT_CRS_CODE); |
|
193 |
|
|
194 |
MapContextLocator |
|
195 |
.registerDefaultOrderManager(DummieLayerOrderManager.class); |
|
196 |
} |
|
197 |
|
|
198 |
public void addLayer(String shpPath) throws InitializeException, |
|
199 |
ProviderNotRegisteredException, ValidateDataParametersException, |
|
200 |
LoadLayerException { |
|
201 |
DataStoreParameters params; |
|
202 |
params = dataManager.createStoreParameters("Shape"); |
|
203 |
|
|
204 |
String dbfPath = |
|
205 |
shpPath.substring(0, shpPath.length() - 3).concat("dbf"); |
|
206 |
String shxPath = |
|
207 |
shpPath.substring(0, shpPath.length() - 3).concat("shx"); |
|
208 |
|
|
209 |
File shpFile = new File(shpPath); |
|
210 |
File dbFile = new File(dbfPath); |
|
211 |
File shxFile = new File(shxPath); |
|
212 |
|
|
213 |
params.setDynValue("shpFile", shpFile.getPath()); |
|
214 |
params.setDynValue("dbfFile", dbFile.getPath()); |
|
215 |
params.setDynValue("shxFile", shxFile.getPath()); |
|
216 |
params.setDynValue("CRS", defaultProjection); |
|
217 |
|
|
218 |
store = (FeatureStore) dataManager.openStore("Shape", params); |
|
219 |
|
|
220 |
FLayer layer = mapContextManager.createLayer(store.getName(), store); |
|
221 |
mapControl.getMapContext().getLayers().addLayer(layer); |
|
222 |
layer.setActive(true); |
|
223 |
try { |
|
224 |
currentLayer = (FLyrVect) layer; |
|
225 |
} catch (Exception e) { |
|
226 |
logger.error("Can't load layer " + e.getMessage()); |
|
227 |
} |
|
228 |
refreshButtons(); |
|
229 |
} |
|
230 |
|
|
231 |
private void createActionButtons() { |
|
232 |
|
|
233 |
buttons = new ArrayList<JButton>(); |
|
234 |
|
|
235 |
buttons.add(new JButton(getPointAction())); |
|
236 |
buttons.add(new JButton(getMultiPointAction())); |
|
237 |
buttons.add(new JButton(getLineAction())); |
|
238 |
buttons.add(new JButton(getArcAction())); |
|
239 |
buttons.add(new JButton(getCircumferenceCrAction())); |
|
240 |
buttons.add(new JButton(getCircleCrAction())); |
|
241 |
buttons.add(new JButton(getCircumference3PAction())); |
|
242 |
buttons.add(new JButton(getCircle3PAction())); |
|
243 |
buttons.add(new JButton(getPolylineAction())); |
|
244 |
buttons.add(new JButton(getPolygonAction())); |
|
245 |
buttons.add(new JButton(getEclipseAction())); |
|
246 |
buttons.add(new JButton(getFilledEclipseAction())); |
|
247 |
buttons.add(new JButton(getRegularPolygonAction())); |
|
248 |
buttons.add(new JButton(getFilledRegularPolygonAction())); |
|
249 |
buttons.add(new JButton(getRectangleAction())); |
|
250 |
buttons.add(new JButton(getFilledRectangleAction())); |
|
251 |
buttons.add(new JButton(getSplineAction())); |
|
252 |
buttons.add(new JButton(getFilledSplineAction())); |
|
253 |
buttons.add(new JButton(getAutopolygonAction())); |
|
254 |
buttons.add(new JButton(getInternalPolygonAction())); |
|
255 |
buttons.add(new JButton(getExplodeGeometryAction())); |
|
256 |
buttons.add(new JButton(getMoveAction())); |
|
257 |
buttons.add(new JButton(getDuplicateAction())); |
|
258 |
buttons.add(new JButton(getStretchAction())); |
|
259 |
buttons.add(new JButton(getRotateAction())); |
|
260 |
buttons.add(new JButton(getSplitLineAction())); |
|
261 |
buttons.add(new JButton(getSplitAction())); |
|
262 |
buttons.add(new JButton(getExtendLineAction())); |
|
263 |
buttons.add(new JButton(getTrimLineAction())); |
|
264 |
buttons.add(new JButton(getSimplifyAction())); |
|
265 |
buttons.add(new JButton(getScaleAction())); |
|
266 |
buttons.add(new JButton(getJoinAction())); |
|
267 |
buttons.add(new JButton(getSmoothLineAction())); |
|
268 |
buttons.add(new JButton(getRectangularMatrixAction())); |
|
269 |
buttons.add(new JButton(getPolarMatrixAction())); |
|
270 |
buttons.add(new JButton(getEditVertexAction())); |
|
271 |
|
|
272 |
} |
|
273 |
|
|
274 |
private JButton getOpenPaletteToolsButton() { |
|
275 |
|
|
276 |
if (openPaletteToolsButtons == null) { |
|
277 |
openPaletteToolsButtons = new JButton(getOpenPaletteToolsAction()); |
|
278 |
openPaletteToolsButtons.setEnabled(false); |
|
279 |
} |
|
280 |
return openPaletteToolsButtons; |
|
281 |
} |
|
282 |
|
|
283 |
private JButton getEditingExtensionButton() { |
|
284 |
|
|
285 |
if (editingExtensionButtons == null) { |
|
286 |
editingExtensionButtons = new JButton(getEditingExtensionAction()); |
|
287 |
} |
|
288 |
return editingExtensionButtons; |
|
289 |
} |
|
290 |
|
|
291 |
private JButton getEndEditingExtensionButton() { |
|
292 |
|
|
293 |
if (endEditingExtensionButtons == null) { |
|
294 |
endEditingExtensionButtons = |
|
295 |
new JButton(getEndEditingExtensionAction()); |
|
296 |
endEditingExtensionButtons.setEnabled(false); |
|
297 |
} |
|
298 |
return endEditingExtensionButtons; |
|
299 |
} |
|
300 |
|
|
301 |
private JButton getCleanMapButton() { |
|
302 |
if (cleanMapButton == null) { |
|
303 |
cleanMapButton = new JButton(getCleanMapAction()); |
|
304 |
cleanMapButton.setEnabled(false); |
|
305 |
} |
|
306 |
return cleanMapButton; |
|
307 |
} |
|
308 |
|
|
309 |
private AbstractAction getInternalPolygonAction() { |
|
310 |
return new AbstractAction( |
|
311 |
InternalPolygonEditingProviderFactory.PROVIDER_NAME) { |
|
312 |
|
|
313 |
/** |
|
314 |
* |
|
315 |
*/ |
|
316 |
private static final long serialVersionUID = -5366590032240258186L; |
|
317 |
|
|
318 |
public void actionPerformed(ActionEvent e) { |
|
319 |
editingContext = swingManager.getEditingContext(mapControl); |
|
320 |
editingContext |
|
321 |
.activateService(InternalPolygonEditingProviderFactory.PROVIDER_NAME); |
|
322 |
} |
|
323 |
}; |
|
324 |
} |
|
325 |
|
|
326 |
private AbstractAction getExplodeGeometryAction() { |
|
327 |
return new AbstractAction(ExplodeEditingProviderFactory.PROVIDER_NAME) { |
|
328 |
|
|
329 |
/** |
|
330 |
* |
|
331 |
*/ |
|
332 |
private static final long serialVersionUID = -5366590032240258186L; |
|
333 |
|
|
334 |
public void actionPerformed(ActionEvent e) { |
|
335 |
editingContext = swingManager.getEditingContext(mapControl); |
|
336 |
editingContext |
|
337 |
.activateService(ExplodeEditingProviderFactory.PROVIDER_NAME); |
|
338 |
} |
|
339 |
}; |
|
340 |
} |
|
341 |
|
|
342 |
private AbstractAction getMoveAction() { |
|
343 |
return new AbstractAction(MoveEditingProviderFactory.PROVIDER_NAME) { |
|
344 |
|
|
345 |
/** |
|
346 |
* |
|
347 |
*/ |
|
348 |
private static final long serialVersionUID = -5366590032240258186L; |
|
349 |
|
|
350 |
public void actionPerformed(ActionEvent e) { |
|
351 |
editingContext = swingManager.getEditingContext(mapControl); |
|
352 |
editingContext |
|
353 |
.activateService(MoveEditingProviderFactory.PROVIDER_NAME); |
|
354 |
} |
|
355 |
}; |
|
356 |
} |
|
357 |
|
|
358 |
private AbstractAction getDuplicateAction() { |
|
359 |
return new AbstractAction(DuplicateEditingProviderFactory.PROVIDER_NAME) { |
|
360 |
|
|
361 |
/** |
|
362 |
* |
|
363 |
*/ |
|
364 |
private static final long serialVersionUID = -5366590032240258186L; |
|
365 |
|
|
366 |
public void actionPerformed(ActionEvent e) { |
|
367 |
editingContext = swingManager.getEditingContext(mapControl); |
|
368 |
editingContext |
|
369 |
.activateService(DuplicateEditingProviderFactory.PROVIDER_NAME); |
|
370 |
} |
|
371 |
}; |
|
372 |
} |
|
373 |
|
|
374 |
private AbstractAction getSimplifyAction() { |
|
375 |
return new AbstractAction(SimplifyEditingProviderFactory.PROVIDER_NAME) { |
|
376 |
|
|
377 |
/** |
|
378 |
* |
|
379 |
*/ |
|
380 |
private static final long serialVersionUID = -5366590032240258186L; |
|
381 |
|
|
382 |
public void actionPerformed(ActionEvent e) { |
|
383 |
editingContext = swingManager.getEditingContext(mapControl); |
|
384 |
editingContext |
|
385 |
.activateService(SimplifyEditingProviderFactory.PROVIDER_NAME); |
|
386 |
} |
|
387 |
}; |
|
388 |
} |
|
389 |
|
|
390 |
private AbstractAction getFilledSplineAction() { |
|
391 |
return new AbstractAction( |
|
392 |
FilledSplineEditingProviderFactory.PROVIDER_NAME) { |
|
393 |
|
|
394 |
/** |
|
395 |
* |
|
396 |
*/ |
|
397 |
private static final long serialVersionUID = 357716596419507221L; |
|
398 |
|
|
399 |
public void actionPerformed(ActionEvent e) { |
|
400 |
editingContext = swingManager.getEditingContext(mapControl); |
|
401 |
editingContext |
|
402 |
.activateService(FilledSplineEditingProviderFactory.PROVIDER_NAME); |
|
403 |
|
|
404 |
} |
|
405 |
}; |
|
406 |
} |
|
407 |
|
|
408 |
private AbstractAction getSplineAction() { |
|
409 |
return new AbstractAction(SplineEditingProviderFactory.PROVIDER_NAME) { |
|
410 |
|
|
411 |
/** |
|
412 |
* |
|
413 |
*/ |
|
414 |
private static final long serialVersionUID = -2308770572409304622L; |
|
415 |
|
|
416 |
public void actionPerformed(ActionEvent e) { |
|
417 |
editingContext = swingManager.getEditingContext(mapControl); |
|
418 |
editingContext |
|
419 |
.activateService(SplineEditingProviderFactory.PROVIDER_NAME); |
|
420 |
|
|
421 |
} |
|
422 |
}; |
|
423 |
} |
|
424 |
|
|
425 |
private AbstractAction getFilledRectangleAction() { |
|
426 |
return new AbstractAction( |
|
427 |
FilledRectangleEditingProviderFactory.PROVIDER_NAME) { |
|
428 |
|
|
429 |
/** |
|
430 |
* |
|
431 |
*/ |
|
432 |
private static final long serialVersionUID = 2293196006002423664L; |
|
433 |
|
|
434 |
public void actionPerformed(ActionEvent e) { |
|
435 |
editingContext = swingManager.getEditingContext(mapControl); |
|
436 |
editingContext |
|
437 |
.activateService(FilledRectangleEditingProviderFactory.PROVIDER_NAME); |
|
438 |
|
|
439 |
} |
|
440 |
}; |
|
441 |
} |
|
442 |
|
|
443 |
private AbstractAction getRectangleAction() { |
|
444 |
return new AbstractAction(RectangleEditingProviderFactory.PROVIDER_NAME) { |
|
445 |
|
|
446 |
/** |
|
447 |
* |
|
448 |
*/ |
|
449 |
private static final long serialVersionUID = -6429005619655148416L; |
|
450 |
|
|
451 |
public void actionPerformed(ActionEvent e) { |
|
452 |
editingContext = swingManager.getEditingContext(mapControl); |
|
453 |
editingContext |
|
454 |
.activateService(RectangleEditingProviderFactory.PROVIDER_NAME); |
|
455 |
|
|
456 |
} |
|
457 |
}; |
|
458 |
} |
|
459 |
|
|
460 |
private AbstractAction getFilledRegularPolygonAction() { |
|
461 |
return new AbstractAction( |
|
462 |
FilledRegularPolygonEditingProviderFactory.PROVIDER_NAME) { |
|
463 |
|
|
464 |
/** |
|
465 |
* |
|
466 |
*/ |
|
467 |
private static final long serialVersionUID = 7944728685657584703L; |
|
468 |
|
|
469 |
public void actionPerformed(ActionEvent e) { |
|
470 |
editingContext = swingManager.getEditingContext(mapControl); |
|
471 |
editingContext |
|
472 |
.activateService(FilledRegularPolygonEditingProviderFactory.PROVIDER_NAME); |
|
473 |
|
|
474 |
} |
|
475 |
}; |
|
476 |
} |
|
477 |
|
|
478 |
private AbstractAction getRegularPolygonAction() { |
|
479 |
return new AbstractAction( |
|
480 |
RegularPolygonEditingProviderFactory.PROVIDER_NAME) { |
|
481 |
|
|
482 |
/** |
|
483 |
* |
|
484 |
*/ |
|
485 |
private static final long serialVersionUID = 1465569443777907186L; |
|
486 |
|
|
487 |
public void actionPerformed(ActionEvent e) { |
|
488 |
editingContext = swingManager.getEditingContext(mapControl); |
|
489 |
editingContext |
|
490 |
.activateService(RegularPolygonEditingProviderFactory.PROVIDER_NAME); |
|
491 |
} |
|
492 |
}; |
|
493 |
} |
|
494 |
|
|
495 |
private AbstractAction getPolygonAction() { |
|
496 |
return new AbstractAction(PolygonEditingProviderFactory.PROVIDER_NAME) { |
|
497 |
|
|
498 |
/** |
|
499 |
* |
|
500 |
*/ |
|
501 |
private static final long serialVersionUID = 966582628310445218L; |
|
502 |
|
|
503 |
public void actionPerformed(ActionEvent e) { |
|
504 |
editingContext = swingManager.getEditingContext(mapControl); |
|
505 |
editingContext |
|
506 |
.activateService(PolygonEditingProviderFactory.PROVIDER_NAME); |
|
507 |
} |
|
508 |
}; |
|
509 |
} |
|
510 |
|
|
511 |
private AbstractAction getPolylineAction() { |
|
512 |
return new AbstractAction(PolylineEditingProviderFactory.PROVIDER_NAME) { |
|
513 |
|
|
514 |
/** |
|
515 |
* |
|
516 |
*/ |
|
517 |
private static final long serialVersionUID = 2859732316623830924L; |
|
518 |
|
|
519 |
public void actionPerformed(ActionEvent e) { |
|
520 |
editingContext = swingManager.getEditingContext(mapControl); |
|
521 |
editingContext |
|
522 |
.activateService(PolylineEditingProviderFactory.PROVIDER_NAME); |
|
523 |
} |
|
524 |
}; |
|
525 |
} |
|
526 |
|
|
527 |
private AbstractAction getEclipseAction() { |
|
528 |
return new AbstractAction(EllipseEditingProviderFactory.PROVIDER_NAME) { |
|
529 |
|
|
530 |
/** |
|
531 |
* |
|
532 |
*/ |
|
533 |
private static final long serialVersionUID = -4698275458250358502L; |
|
534 |
|
|
535 |
public void actionPerformed(ActionEvent e) { |
|
536 |
editingContext = swingManager.getEditingContext(mapControl); |
|
537 |
editingContext |
|
538 |
.activateService(EllipseEditingProviderFactory.PROVIDER_NAME); |
|
539 |
} |
|
540 |
}; |
|
541 |
} |
|
542 |
|
|
543 |
private AbstractAction getFilledEclipseAction() { |
|
544 |
return new AbstractAction( |
|
545 |
FilledEllipseEditingProviderFactory.PROVIDER_NAME) { |
|
546 |
|
|
547 |
/** |
|
548 |
* |
|
549 |
*/ |
|
550 |
private static final long serialVersionUID = -4698275458250358502L; |
|
551 |
|
|
552 |
public void actionPerformed(ActionEvent e) { |
|
553 |
editingContext = swingManager.getEditingContext(mapControl); |
|
554 |
editingContext |
|
555 |
.activateService(FilledEllipseEditingProviderFactory.PROVIDER_NAME); |
|
556 |
} |
|
557 |
}; |
|
558 |
} |
|
559 |
|
|
560 |
private AbstractAction getCircumferenceCrAction() { |
|
561 |
return new AbstractAction( |
|
562 |
CircumferenceCREditingProviderFactory.PROVIDER_NAME) { |
|
563 |
|
|
564 |
/** |
|
565 |
* |
|
566 |
*/ |
|
567 |
private static final long serialVersionUID = -4422429984929119239L; |
|
568 |
|
|
569 |
public void actionPerformed(ActionEvent e) { |
|
570 |
editingContext = swingManager.getEditingContext(mapControl); |
|
571 |
editingContext |
|
572 |
.activateService(CircumferenceCREditingProviderFactory.PROVIDER_NAME); |
|
573 |
} |
|
574 |
}; |
|
575 |
} |
|
576 |
|
|
577 |
private AbstractAction getCircleCrAction() { |
|
578 |
return new AbstractAction(CircleCREditingProviderFactory.PROVIDER_NAME) { |
|
579 |
|
|
580 |
/** |
|
581 |
* |
|
582 |
*/ |
|
583 |
private static final long serialVersionUID = 1564163738941995373L; |
|
584 |
|
|
585 |
public void actionPerformed(ActionEvent e) { |
|
586 |
editingContext = swingManager.getEditingContext(mapControl); |
|
587 |
editingContext |
|
588 |
.activateService(CircleCREditingProviderFactory.PROVIDER_NAME); |
|
589 |
} |
|
590 |
}; |
|
591 |
} |
|
592 |
|
|
593 |
private AbstractAction getCircumference3PAction() { |
|
594 |
return new AbstractAction( |
|
595 |
Circumference3PEditingProviderFactory.PROVIDER_NAME) { |
|
596 |
|
|
597 |
/** |
|
598 |
* |
|
599 |
*/ |
|
600 |
private static final long serialVersionUID = -4422429984929119239L; |
|
601 |
|
|
602 |
public void actionPerformed(ActionEvent e) { |
|
603 |
editingContext = swingManager.getEditingContext(mapControl); |
|
604 |
editingContext |
|
605 |
.activateService(Circumference3PEditingProviderFactory.PROVIDER_NAME); |
|
606 |
} |
|
607 |
}; |
|
608 |
} |
|
609 |
|
|
610 |
private AbstractAction getCircle3PAction() { |
|
611 |
return new AbstractAction(Circle3PEditingProviderFactory.PROVIDER_NAME) { |
|
612 |
|
|
613 |
/** |
|
614 |
* |
|
615 |
*/ |
|
616 |
private static final long serialVersionUID = 1564163738941995373L; |
|
617 |
|
|
618 |
public void actionPerformed(ActionEvent e) { |
|
619 |
editingContext = swingManager.getEditingContext(mapControl); |
|
620 |
editingContext |
|
621 |
.activateService(Circle3PEditingProviderFactory.PROVIDER_NAME); |
|
622 |
} |
|
623 |
}; |
|
624 |
} |
|
625 |
|
|
626 |
private AbstractAction getArcAction() { |
|
627 |
return new AbstractAction(ArcEditingProviderFactory.PROVIDER_NAME) { |
|
628 |
|
|
629 |
/** |
|
630 |
* |
|
631 |
*/ |
|
632 |
private static final long serialVersionUID = 5529987067864211418L; |
|
633 |
|
|
634 |
public void actionPerformed(ActionEvent e) { |
|
635 |
editingContext = swingManager.getEditingContext(mapControl); |
|
636 |
editingContext |
|
637 |
.activateService(ArcEditingProviderFactory.PROVIDER_NAME); |
|
638 |
} |
|
639 |
}; |
|
640 |
} |
|
641 |
|
|
642 |
private AbstractAction getLineAction() { |
|
643 |
return new AbstractAction(LineEditingProviderFactory.PROVIDER_NAME) { |
|
644 |
|
|
645 |
/** |
|
646 |
* |
|
647 |
*/ |
|
648 |
private static final long serialVersionUID = 7464822491323014704L; |
|
649 |
|
|
650 |
public void actionPerformed(ActionEvent e) { |
|
651 |
editingContext = swingManager.getEditingContext(mapControl); |
|
652 |
editingContext |
|
653 |
.activateService(LineEditingProviderFactory.PROVIDER_NAME); |
|
654 |
} |
|
655 |
}; |
|
656 |
} |
|
657 |
|
|
658 |
private AbstractAction getPointAction() { |
|
659 |
return new AbstractAction(PointEditingProviderFactory.PROVIDER_NAME) { |
|
660 |
|
|
661 |
/** |
|
662 |
* |
|
663 |
*/ |
|
664 |
private static final long serialVersionUID = -9147590153911397886L; |
|
665 |
|
|
666 |
public void actionPerformed(ActionEvent e) { |
|
667 |
editingContext = swingManager.getEditingContext(mapControl); |
|
668 |
editingContext |
|
669 |
.activateService(PointEditingProviderFactory.PROVIDER_NAME); |
|
670 |
} |
|
671 |
|
|
672 |
}; |
|
673 |
} |
|
674 |
|
|
675 |
private AbstractAction getMultiPointAction() { |
|
676 |
return new AbstractAction( |
|
677 |
MultipointEditingProviderFactory.PROVIDER_NAME) { |
|
678 |
|
|
679 |
/** |
|
680 |
* |
|
681 |
*/ |
|
682 |
private static final long serialVersionUID = -9147590153911397886L; |
|
683 |
|
|
684 |
public void actionPerformed(ActionEvent e) { |
|
685 |
editingContext = swingManager.getEditingContext(mapControl); |
|
686 |
editingContext |
|
687 |
.activateService(MultipointEditingProviderFactory.PROVIDER_NAME); |
|
688 |
} |
|
689 |
|
|
690 |
}; |
|
691 |
} |
|
692 |
|
|
693 |
private AbstractAction getSplitLineAction() { |
|
694 |
return new AbstractAction(SplitLineEditingProviderFactory.PROVIDER_NAME) { |
|
695 |
|
|
696 |
/** |
|
697 |
* |
|
698 |
*/ |
|
699 |
private static final long serialVersionUID = -5366590032240258186L; |
|
700 |
|
|
701 |
public void actionPerformed(ActionEvent e) { |
|
702 |
editingContext = swingManager.getEditingContext(mapControl); |
|
703 |
editingContext |
|
704 |
.activateService(SplitLineEditingProviderFactory.PROVIDER_NAME); |
|
705 |
} |
|
706 |
}; |
|
707 |
} |
|
708 |
|
|
709 |
private AbstractAction getSplitAction() { |
|
710 |
return new AbstractAction(SplitEditingProviderFactory.PROVIDER_NAME) { |
|
711 |
|
|
712 |
/** |
|
713 |
* |
|
714 |
*/ |
|
715 |
private static final long serialVersionUID = -5366590032240258186L; |
|
716 |
|
|
717 |
public void actionPerformed(ActionEvent e) { |
|
718 |
editingContext = swingManager.getEditingContext(mapControl); |
|
719 |
editingContext |
|
720 |
.activateService(SplitEditingProviderFactory.PROVIDER_NAME); |
|
721 |
} |
|
722 |
}; |
|
723 |
} |
|
724 |
|
|
725 |
private AbstractAction getExtendLineAction() { |
|
726 |
return new AbstractAction( |
|
727 |
ExtendLineEditingProviderFactory.PROVIDER_NAME) { |
|
728 |
|
|
729 |
/** |
|
730 |
* |
|
731 |
*/ |
|
732 |
private static final long serialVersionUID = -5366590032240258186L; |
|
733 |
|
|
734 |
public void actionPerformed(ActionEvent e) { |
|
735 |
editingContext = swingManager.getEditingContext(mapControl); |
|
736 |
editingContext |
|
737 |
.activateService(ExtendLineEditingProviderFactory.PROVIDER_NAME); |
|
738 |
} |
|
739 |
}; |
|
740 |
} |
|
741 |
|
|
742 |
private AbstractAction getTrimLineAction() { |
|
743 |
return new AbstractAction(TrimLineEditingProviderFactory.PROVIDER_NAME) { |
|
744 |
|
|
745 |
/** |
|
746 |
* |
|
747 |
*/ |
|
748 |
private static final long serialVersionUID = -5366590032240258186L; |
|
749 |
|
|
750 |
public void actionPerformed(ActionEvent e) { |
|
751 |
editingContext = swingManager.getEditingContext(mapControl); |
|
752 |
editingContext |
|
753 |
.activateService(TrimLineEditingProviderFactory.PROVIDER_NAME); |
|
754 |
} |
|
755 |
}; |
|
756 |
} |
|
757 |
|
|
758 |
private AbstractAction getEndEditingExtensionAction() { |
|
759 |
return new AbstractAction("end-editing") { |
|
760 |
|
|
761 |
/** |
|
762 |
* |
|
763 |
*/ |
|
764 |
private static final long serialVersionUID = -1026680183527522379L; |
|
765 |
|
|
766 |
public void actionPerformed(ActionEvent e) { |
|
767 |
editingContext = swingManager.getEditingContext(mapControl); |
|
768 |
editingContext.endEdition(currentLayer); |
|
769 |
|
|
770 |
if (currentLayer != null && !currentLayer.isEditing()) { |
|
771 |
getPaletteTools().setVisible(false); |
|
772 |
} |
|
773 |
|
|
774 |
refreshButtons(); |
|
775 |
} |
|
776 |
}; |
|
777 |
} |
|
778 |
|
|
779 |
private AbstractAction getRotateAction() { |
|
780 |
return new AbstractAction(RotateEditingProviderFactory.PROVIDER_NAME) { |
|
781 |
|
|
782 |
/** |
|
783 |
* |
|
784 |
*/ |
|
785 |
private static final long serialVersionUID = -1026680183527522379L; |
|
786 |
|
|
787 |
public void actionPerformed(ActionEvent e) { |
|
788 |
editingContext = swingManager.getEditingContext(mapControl); |
|
789 |
editingContext |
|
790 |
.activateService(RotateEditingProviderFactory.PROVIDER_NAME); |
|
791 |
} |
|
792 |
}; |
|
793 |
} |
|
794 |
|
|
795 |
private AbstractAction getEditingExtensionAction() { |
|
796 |
return new AbstractAction("start-editing") { |
|
797 |
|
|
798 |
/** |
|
799 |
* |
|
800 |
*/ |
|
801 |
private static final long serialVersionUID = 5524271695550380473L; |
|
802 |
|
|
803 |
public void actionPerformed(ActionEvent e) { |
|
804 |
editingContext = swingManager.getEditingContext(mapControl); |
|
805 |
registerObserver(editingContext); |
|
806 |
editingContext.beginEdition(currentLayer); |
|
807 |
refreshButtons(); |
|
808 |
|
|
809 |
// XXX Forces component repaint. |
|
810 |
SwingUtilities.updateComponentTreeUI(mainFrame); |
|
811 |
} |
|
812 |
}; |
|
813 |
} |
|
814 |
|
|
815 |
private AbstractAction getExitAction() { |
|
816 |
return new AbstractAction("Exit") { |
|
817 |
|
|
818 |
/** |
|
819 |
* |
|
820 |
*/ |
|
821 |
private static final long serialVersionUID = 7506436995278783992L; |
|
822 |
|
|
823 |
public void actionPerformed(ActionEvent e) { |
|
824 |
System.exit(0); |
|
825 |
} |
|
826 |
}; |
|
827 |
} |
|
828 |
|
|
829 |
private AbstractAction getOpenPaletteToolsAction() { |
|
830 |
return new AbstractAction("Show palette tools") { |
|
831 |
|
|
832 |
/** |
|
833 |
* |
|
834 |
*/ |
|
835 |
private static final long serialVersionUID = -2643193186380529723L; |
|
836 |
|
|
837 |
public void actionPerformed(ActionEvent e) { |
|
838 |
getPaletteTools().setVisible(true); |
|
839 |
} |
|
840 |
}; |
|
841 |
} |
|
842 |
|
|
843 |
private AbstractAction getAddLayerAction() { |
|
844 |
return new AbstractAction("Add layer") { |
|
845 |
|
|
846 |
/** |
|
847 |
* |
|
848 |
*/ |
|
849 |
private static final long serialVersionUID = -7527908235576117027L; |
|
850 |
|
|
851 |
public void actionPerformed(ActionEvent e) { |
|
852 |
ThreadSafeDialogsManager dlgManager = |
|
853 |
ToolsSwingLocator.getThreadSafeDialogsManager(); |
|
854 |
|
|
855 |
File[] file = |
|
856 |
dlgManager.showChooserDialog("Seleccione archivo SHP", |
|
857 |
JFileChooser.OPEN_DIALOG, JFileChooser.FILES_ONLY, |
|
858 |
false, new File(System.getProperty("user.home")), |
|
859 |
new GenericFileFilter(new String[] { ".shp" }, |
|
860 |
"(*.shp)"), true); |
|
861 |
|
|
862 |
if (file != null) { |
|
863 |
try { |
|
864 |
addLayer(file[0].getAbsolutePath()); |
|
865 |
} catch (Exception ex) { |
|
866 |
logger.warn("Problems adding layer", ex); |
|
867 |
} |
|
868 |
} |
|
869 |
} |
|
870 |
}; |
|
871 |
} |
|
872 |
|
|
873 |
private AbstractAction getCleanMapAction() { |
|
874 |
return new AbstractAction("Clean Map") { |
|
875 |
|
|
876 |
/** |
|
877 |
* |
|
878 |
*/ |
|
879 |
private static final long serialVersionUID = 5059847015866672405L; |
|
880 |
|
|
881 |
public void actionPerformed(ActionEvent e) { |
|
882 |
MapContext mapContext = mapControl.getMapContext(); |
|
883 |
mapContext.beginAtomicEvent(); |
|
884 |
while (mapContext.getLayers().getLayersCount() > 0) { |
|
885 |
mapContext.getLayers().removeLayer(0); |
|
886 |
} |
|
887 |
mapContext.endAtomicEvent(); |
|
888 |
currentLayer = null; |
|
889 |
refreshButtons(); |
|
890 |
} |
|
891 |
}; |
|
892 |
} |
|
893 |
|
|
894 |
private AbstractAction getZoomAllAction() { |
|
895 |
return new AbstractAction("Zoom all") { |
|
896 |
|
|
897 |
/** |
|
898 |
* |
|
899 |
*/ |
|
900 |
private static final long serialVersionUID = -1338436395515982258L; |
|
901 |
|
|
902 |
public void actionPerformed(ActionEvent e) { |
|
903 |
zoomAll(); |
|
904 |
} |
|
905 |
}; |
|
906 |
} |
|
907 |
|
|
908 |
private AbstractAction getZoomAction() { |
|
909 |
return new AbstractAction("Zoom") { |
|
910 |
|
|
911 |
/** |
|
912 |
* |
|
913 |
*/ |
|
914 |
private static final long serialVersionUID = -7231543178928614445L; |
|
915 |
|
|
916 |
public void actionPerformed(ActionEvent e) { |
|
917 |
mapControl.setTool("zoom"); |
Also available in: Unified diff