Revision 265
org.gvsig.derivedgeometries/tags/org.gvsig.derivedgeometries-1.0.43/org.gvsig.derivedgeometries.app/pom.xml | ||
---|---|---|
1 |
<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"> |
|
2 |
<modelVersion>4.0.0</modelVersion> |
|
3 |
<parent> |
|
4 |
<groupId>org.gvsig</groupId> |
|
5 |
<artifactId>org.gvsig.derivedgeometries</artifactId> |
|
6 |
<version>1.0.43</version> |
|
7 |
</parent> |
|
8 |
<artifactId>org.gvsig.derivedgeometries.app</artifactId> |
|
9 |
<packaging>pom</packaging> |
|
10 |
<modules> |
|
11 |
<module>org.gvsig.derivedgeometries.app.mainplugin</module> |
|
12 |
</modules> |
|
13 |
</project> |
org.gvsig.derivedgeometries/tags/org.gvsig.derivedgeometries-1.0.43/org.gvsig.derivedgeometries.app/org.gvsig.derivedgeometries.app.mainplugin/buildNumber.properties | ||
---|---|---|
1 |
#Tue Oct 25 21:23:21 CEST 2016 |
|
2 |
buildNumber=47 |
org.gvsig.derivedgeometries/tags/org.gvsig.derivedgeometries-1.0.43/org.gvsig.derivedgeometries.app/org.gvsig.derivedgeometries.app.mainplugin/src/main/resources-plugin/i18n/text.properties | ||
---|---|---|
1 |
_derived_geometries = Geometr\u00edas derivadas |
|
2 |
_shape_file= Archivo shape |
|
3 |
_cancel = Cancelar |
|
4 |
_next = Siguiente |
|
5 |
_features = Features |
|
6 |
_new_features = Nuevos elementos |
|
7 |
_add_all_button_tooltip = A\u00f1adir todas las features |
|
8 |
_add_selected_button_tooltip = A\u00f1adir features seleccionadas |
|
9 |
_remove_all_button_tooltip = Quitar todas las features |
|
10 |
_remove_selected_button_tooltip = Quitar features seleccionadas |
|
11 |
_move_up_button_tooltip = Subir features seleccionadas |
|
12 |
_move_down_button_tooltip = Bajar features seleccionadas |
|
13 |
_output_layer = Capa destino |
|
14 |
_source_layer = Capa fuente |
|
15 |
_layers = Capas |
|
16 |
_select_path = Seleccione ruta |
|
17 |
_name = Nombre |
|
18 |
_path = Ruta |
|
19 |
_layer = Capa |
|
20 |
_options = Opciones |
|
21 |
_path_where_create_the_new_layer_files = Ruta donde se crear\u00e1n los archivos de la nuevas capas |
|
22 |
_destination_layer_type = Tipo de capa destino |
|
23 |
_type = Tipo |
|
24 |
_process_type = Tipo de proceso |
|
25 |
_creation_derivative_geometry_layer_process = Proceso de creaci\u00f3n de geometr\u00edas derivadas |
|
26 |
_ongoing_process_please_wait = Proceso en ejecici\u00f3n, por favor espere. |
|
27 |
_output_layer_name = Nombre de la capa destino |
|
28 |
_warning_adding_features = \u00a1Advertencia! |
|
29 |
_warning_there_are_features_with_more_than_one_geometry_or_without_geometry = Hay features con m\u00e1s de una geometr\u00eda o sin geometr\u00eda. Dichas features no se a\u00f1adir\u00e1n. |
|
30 |
_cant_process_this_layer_type = Este tipo de capas no se pueden procesar |
|
31 |
_cant_process_layer = No se puede procesar esta capa |
|
32 |
_no_valid_data = Datos inv\u00e1lidos |
|
33 |
_no_valid_data_make_sure_data_are_valid = Por favor, aseg\u00farese de que los datos son v\u00e1lidos. |
|
34 |
_no_valid_source_layer = Capa fuente no v\u00e1lida |
|
35 |
_cant_process_this_type_of_layer = No es posible procesar este tipo de capa. |
|
36 |
_information = Informaci\u00f3n |
|
37 |
_process_finished_successfully = Proceso finalizado correctamente |
|
38 |
_file_already_exist = El archivo ya existe |
|
39 |
_file_already_exist_override_it = El archivo ya existe. \u00bfDesea sobreescribirlo? |
|
40 |
_process_error = Error en la ejecuci\u00f3n del proceso. Revise el log para m\u00e1s informaci\u00f3n. |
|
41 |
_error = Error |
|
42 |
_finish = Finalizar |
|
43 |
_generate = Generar |
|
44 |
_points_to_line=Puntos a l\u00ednea |
|
45 |
_points_to_polygon=Puntos a pol\u00edgono |
|
46 |
_lines_to_closed_polyline=L\u00edneas a polil\u00ednea cerrada |
org.gvsig.derivedgeometries/tags/org.gvsig.derivedgeometries-1.0.43/org.gvsig.derivedgeometries.app/org.gvsig.derivedgeometries.app.mainplugin/src/main/resources-plugin/i18n/text_en.properties | ||
---|---|---|
1 |
_derived_geometries = Derived geometries |
|
2 |
_shape_file = Shape file |
|
3 |
_cancel = Cancel |
|
4 |
_next = Next |
|
5 |
_features = Features |
|
6 |
_new_features = New features |
|
7 |
_add_all_button_tooltip = Add all features |
|
8 |
_add_selected_button_tooltip = Add selected features |
|
9 |
_remove_all_button_tooltip = Remove all features |
|
10 |
_remove_selected_button_tooltip = Remove selected features |
|
11 |
_move_up_button_tooltip = Move up selected features |
|
12 |
_move_down_button_tooltip = Move down selected features |
|
13 |
_output_layer = Output layer |
|
14 |
_source_layer = Source layer |
|
15 |
_layers = Layers |
|
16 |
_select_path = Select path |
|
17 |
_name = Name |
|
18 |
_path = Path |
|
19 |
_layer = Layer |
|
20 |
_options = Options |
|
21 |
_path_where_create_the_new_layer_files = Path where create the new layer files |
|
22 |
_destination_layer_type = Output layer type |
|
23 |
_type = Type |
|
24 |
_process_type = Process type |
|
25 |
_creation_derived_geometry_layer_process = Creation derived geometry layer process |
|
26 |
_ongoing_process_please_wait = Ongoing process, please wait. |
|
27 |
_output_layer_name = Output layer name |
|
28 |
_warning_adding_features = Error adding selected features |
|
29 |
_warning_there_are_features_with_more_than_one_geometry_or_without_geometry= There are features with more than one geometry or without geometry. These features will no be added. |
|
30 |
_cant_process_this_layer_type = Can not process this layer type |
|
31 |
_cant_process_layer = Can not process layer |
|
32 |
_no_valid_data = Invalid data |
|
33 |
_no_valid_data_make_sure_data_are_valid = Please, make sure data are valid. |
|
34 |
_no_valid_source_layer = Source layer is not valid |
|
35 |
_cant_process_this_type_of_layer = It is not possible to process source layer. |
|
36 |
_information = Information |
|
37 |
_process_finished_successfully = Process finished successfully |
|
38 |
_file_already_exist = File already exists |
|
39 |
_file_already_exist_override_it = File already exists. Overwrite it? |
|
40 |
_process_error = Error in execution of process. See log to more information. |
|
41 |
_error = Error |
|
42 |
_finish = Finish |
|
43 |
_generate = Generate |
|
44 |
_points_to_line=Points to line |
|
45 |
_points_to_polygon=Points to polygon |
|
46 |
_lines_to_closed_polyline=Lines to closed polyline |
org.gvsig.derivedgeometries/tags/org.gvsig.derivedgeometries-1.0.43/org.gvsig.derivedgeometries.app/org.gvsig.derivedgeometries.app.mainplugin/src/main/resources-plugin/config.xml | ||
---|---|---|
1 |
<?xml version="1.0" encoding="ISO-8859-1"?> |
|
2 |
<!-- gvSIG. Desktop Geographic Information System. Copyright (C) 2007-2013 |
|
3 |
gvSIG Association. This program is free software; you can redistribute it |
|
4 |
and/or modify it under the terms of the GNU General Public License as published |
|
5 |
by the Free Software Foundation; either version 3 of the License, or (at |
|
6 |
your option) any later version. This program is distributed in the hope that |
|
7 |
it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty |
|
8 |
of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
|
9 |
Public License for more details. You should have received a copy of the GNU |
|
10 |
General Public License along with this program; if not, write to the Free |
|
11 |
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, |
|
12 |
USA. For any additional information, do not hesitate to contact us at info |
|
13 |
AT gvsig.com, or visit our website www.gvsig.com. --> |
|
14 |
<plugin-config> |
|
15 |
<depends plugin-name="org.gvsig.app.mainplugin" /> |
|
16 |
<resourceBundle name="text" /> |
|
17 |
<libraries library-dir="lib" /> |
|
18 |
<extensions> |
|
19 |
<extension |
|
20 |
class-name="org.gvsig.derivedgeometries.app.mainplugin.DerivedGeometriesExtension" |
|
21 |
description="" active="true" priority="1"> |
|
22 |
|
|
23 |
<action name="derived-geometries" label="_derived_geometries" |
|
24 |
tooltip="_derived_geometries" position="601300000" action-command="derived-geometries" |
|
25 |
icon="create-derivative-geometry-icon" accelerator="" /> |
|
26 |
|
|
27 |
<menu text="Layer/_derived_geometries" name="derived-geometries" /> |
|
28 |
|
|
29 |
<tool-bar name="derived-geometries" position="601300000"> |
|
30 |
<action-tool name="derived-geometries" /> |
|
31 |
</tool-bar> |
|
32 |
|
|
33 |
</extension> |
|
34 |
</extensions> |
|
35 |
</plugin-config> |
org.gvsig.derivedgeometries/tags/org.gvsig.derivedgeometries-1.0.43/org.gvsig.derivedgeometries.app/org.gvsig.derivedgeometries.app.mainplugin/src/main/assembly/gvsig-plugin-package.xml | ||
---|---|---|
1 |
<!-- gvSIG. Desktop Geographic Information System. Copyright (C) 2007-2013 |
|
2 |
gvSIG Association. This program is free software; you can redistribute it |
|
3 |
and/or modify it under the terms of the GNU General Public License as published |
|
4 |
by the Free Software Foundation; either version 3 of the License, or (at |
|
5 |
your option) any later version. This program is distributed in the hope that |
|
6 |
it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty |
|
7 |
of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
|
8 |
Public License for more details. You should have received a copy of the GNU |
|
9 |
General Public License along with this program; if not, write to the Free |
|
10 |
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, |
|
11 |
USA. For any additional information, do not hesitate to contact us at info |
|
12 |
AT gvsig.com, or visit our website www.gvsig.com. --> |
|
13 |
<assembly> |
|
14 |
<id>gvsig-plugin-package</id> |
|
15 |
<formats> |
|
16 |
<format>zip</format> |
|
17 |
</formats> |
|
18 |
<baseDirectory>${project.artifactId}</baseDirectory> |
|
19 |
<includeBaseDirectory>true</includeBaseDirectory> |
|
20 |
<files> |
|
21 |
<file> |
|
22 |
<source>target/${project.artifactId}-${project.version}.jar</source> |
|
23 |
<outputDirectory>lib</outputDirectory> |
|
24 |
</file> |
|
25 |
<file> |
|
26 |
<source>target/package.info</source> |
|
27 |
</file> |
|
28 |
</files> |
|
29 |
|
|
30 |
<fileSets> |
|
31 |
<fileSet> |
|
32 |
<directory>src/main/resources-plugin</directory> |
|
33 |
<outputDirectory>.</outputDirectory> |
|
34 |
</fileSet> |
|
35 |
</fileSets> |
|
36 |
|
|
37 |
|
|
38 |
<dependencySets> |
|
39 |
<dependencySet> |
|
40 |
<useProjectArtifact>false</useProjectArtifact> |
|
41 |
<useTransitiveDependencies>false</useTransitiveDependencies> |
|
42 |
<outputDirectory>lib</outputDirectory> |
|
43 |
<includes> |
|
44 |
<include>org.gvsig:org.gvsig.derivedgeometries.swing.api</include> |
|
45 |
<include>org.gvsig:org.gvsig.derivedgeometries.swing.impl</include> |
|
46 |
</includes> |
|
47 |
</dependencySet> |
|
48 |
</dependencySets> |
|
49 |
|
|
50 |
</assembly> |
|
51 |
|
org.gvsig.derivedgeometries/tags/org.gvsig.derivedgeometries-1.0.43/org.gvsig.derivedgeometries.app/org.gvsig.derivedgeometries.app.mainplugin/src/main/java/org/gvsig/derivedgeometries/app/mainplugin/DerivedGeometriesExtension.java | ||
---|---|---|
1 |
/* gvSIG. Desktop Geographic Information System. |
|
2 |
* |
|
3 |
* Copyright ? 2007-2014 gvSIG Association |
|
4 |
* |
|
5 |
* This program is free software; you can redistribute it and/or |
|
6 |
* modify it under the terms of the GNU General Public License |
|
7 |
* as published by the Free Software Foundation; either version 2 |
|
8 |
* of the License, or (at your option) any later version. |
|
9 |
* |
|
10 |
* This program is distributed in the hope that it will be useful, |
|
11 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 |
* GNU General Public License for more details. |
|
14 |
* |
|
15 |
* You should have received a copy of the GNU General Public License |
|
16 |
* along with this program; if not, write to the Free Software |
|
17 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, |
|
18 |
* MA 02110-1301, USA. |
|
19 |
* |
|
20 |
* For any additional information, do not hesitate to contact us |
|
21 |
* at info AT gvsig.com, or visit our website www.gvsig.com. |
|
22 |
*/ |
|
23 |
package org.gvsig.derivedgeometries.app.mainplugin; |
|
24 |
|
|
25 |
import java.awt.event.ComponentEvent; |
|
26 |
import java.awt.event.ComponentListener; |
|
27 |
import javax.swing.JComponent; |
|
28 |
|
|
29 |
import org.gvsig.andami.IconThemeHelper; |
|
30 |
import org.gvsig.andami.PluginServices; |
|
31 |
import org.gvsig.andami.plugins.Extension; |
|
32 |
import org.gvsig.app.project.documents.view.gui.DefaultViewPanel; |
|
33 |
import org.gvsig.derivedgeometries.swing.api.DerivedGeometriesLocator; |
|
34 |
import org.gvsig.derivedgeometries.swing.api.DerivedGeometriesManager; |
|
35 |
import org.gvsig.fmap.mapcontext.MapContext; |
|
36 |
import org.gvsig.tools.ToolsLocator; |
|
37 |
import org.gvsig.tools.i18n.I18nManager; |
|
38 |
import org.gvsig.tools.swing.api.ToolsSwingLocator; |
|
39 |
import org.gvsig.tools.swing.api.windowmanager.WindowManager; |
|
40 |
import org.gvsig.tools.swing.api.windowmanager.WindowManager.MODE; |
|
41 |
|
|
42 |
/** |
|
43 |
* Andami extension to show DerivedGeometries in the application. |
|
44 |
* |
|
45 |
* @author gvSIG team |
|
46 |
* |
|
47 |
*/ |
|
48 |
public class DerivedGeometriesExtension extends Extension implements |
|
49 |
ComponentListener { |
|
50 |
|
|
51 |
private JComponent panel = null; |
|
52 |
|
|
53 |
/** |
|
54 |
* Execute the actions associated to this extension. |
|
55 |
*/ |
|
56 |
public void execute(String actionCommand) { |
|
57 |
|
|
58 |
if (actionCommand.equals("derived-geometries")) { |
|
59 |
DefaultViewPanel view = getActiveView(); |
|
60 |
DerivedGeometriesManager manager = |
|
61 |
DerivedGeometriesLocator.getManager(); |
|
62 |
WindowManager windowManager = ToolsSwingLocator.getWindowManager(); |
|
63 |
panel = |
|
64 |
manager.getDerivedGeometriesPanel(view.getMapControl()) |
|
65 |
.asJComponent(); |
|
66 |
panel.addComponentListener(this); |
|
67 |
|
|
68 |
I18nManager i18nManager = ToolsLocator.getI18nManager(); |
|
69 |
windowManager.showWindow(panel, |
|
70 |
i18nManager.getTranslation("_derived_geometries"), MODE.WINDOW); |
|
71 |
} |
|
72 |
} |
|
73 |
|
|
74 |
public void initialize() { |
|
75 |
registerIcons(); |
|
76 |
} |
|
77 |
|
|
78 |
private void registerIcons() { |
|
79 |
IconThemeHelper.registerIcon("", "create-derivative-geometry-icon", |
|
80 |
this); |
|
81 |
|
|
82 |
IconThemeHelper.registerIcon("control-panel", "add-all-icon", this); |
|
83 |
IconThemeHelper |
|
84 |
.registerIcon("control-panel", "add-selected-icon", this); |
|
85 |
IconThemeHelper.registerIcon("control-panel", "remove-all-icon", this); |
|
86 |
IconThemeHelper.registerIcon("control-panel", "remove-selected-icon", |
|
87 |
this); |
|
88 |
IconThemeHelper.registerIcon("control-panel", "down-arrow-icon", this); |
|
89 |
IconThemeHelper.registerIcon("control-panel", "up-arrow-icon", this); |
|
90 |
} |
|
91 |
|
|
92 |
public boolean isEnabled() { |
|
93 |
return panel == null; |
|
94 |
} |
|
95 |
|
|
96 |
public boolean isVisible() { |
|
97 |
DefaultViewPanel view = getActiveView(); |
|
98 |
if (view != null) { |
|
99 |
MapContext mapContex = view.getMapControl().getMapContext(); |
|
100 |
int numLayers = mapContex.getLayers().getLayersCount(); |
|
101 |
if (view != null && numLayers > 0) { |
|
102 |
return true; |
|
103 |
} |
|
104 |
} |
|
105 |
return false; |
|
106 |
} |
|
107 |
|
|
108 |
private DefaultViewPanel getActiveView() { |
|
109 |
org.gvsig.andami.ui.mdiManager.IWindow activeWindow = |
|
110 |
PluginServices.getMDIManager().getActiveWindow(); |
|
111 |
|
|
112 |
if (activeWindow instanceof DefaultViewPanel) { |
|
113 |
return (DefaultViewPanel) activeWindow; |
|
114 |
} |
|
115 |
|
|
116 |
return null; |
|
117 |
} |
|
118 |
|
|
119 |
public void componentResized(ComponentEvent ce) { |
|
120 |
} |
|
121 |
|
|
122 |
public void componentMoved(ComponentEvent ce) { |
|
123 |
} |
|
124 |
|
|
125 |
public void componentShown(ComponentEvent ce) { |
|
126 |
} |
|
127 |
|
|
128 |
public void componentHidden(ComponentEvent ce) { |
|
129 |
panel = null; |
|
130 |
} |
|
131 |
|
|
132 |
|
|
133 |
} |
org.gvsig.derivedgeometries/tags/org.gvsig.derivedgeometries-1.0.43/org.gvsig.derivedgeometries.app/org.gvsig.derivedgeometries.app.mainplugin/pom.xml | ||
---|---|---|
1 |
<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"> |
|
2 |
<modelVersion>4.0.0</modelVersion> |
|
3 |
<parent> |
|
4 |
<groupId>org.gvsig</groupId> |
|
5 |
<artifactId>org.gvsig.derivedgeometries.app</artifactId> |
|
6 |
<version>1.0.43</version> |
|
7 |
</parent> |
|
8 |
<artifactId>org.gvsig.derivedgeometries.app.mainplugin</artifactId> |
|
9 |
<name>${project.artifactId}</name> |
|
10 |
|
|
11 |
<properties> |
|
12 |
<!-- Package info property values --> |
|
13 |
<!-- Default values in org.gvsig.desktop --> |
|
14 |
<gvsig.package.info.state>testing</gvsig.package.info.state> |
|
15 |
<gvsig.package.info.official>true</gvsig.package.info.official> |
|
16 |
<gvsig.package.info.name>Derived geometries</gvsig.package.info.name> |
|
17 |
<gvsig.package.info.categories>Geoprocess, Vector</gvsig.package.info.categories> |
|
18 |
<gvsig.package.info.description>Derived geometries: provides processes to create derived geometries from others.</gvsig.package.info.description> |
|
19 |
<gvsig.package.info.dependencies>required: org.gvsig.app.mainplugin -ge 2.1.0</gvsig.package.info.dependencies> |
|
20 |
<gvsig.package.info.poolURL>https://devel.gvsig.org/download/projects/gvsig-derived-geometries/pool/</gvsig.package.info.poolURL> |
|
21 |
</properties> |
|
22 |
|
|
23 |
<dependencies> |
|
24 |
<dependency> |
|
25 |
<groupId>org.gvsig</groupId> |
|
26 |
<artifactId>org.gvsig.app.mainplugin</artifactId> |
|
27 |
</dependency> |
|
28 |
|
|
29 |
<dependency> |
|
30 |
<groupId>org.gvsig</groupId> |
|
31 |
<artifactId> |
|
32 |
org.gvsig.derivedgeometries.swing.api |
|
33 |
</artifactId> |
|
34 |
</dependency> |
|
35 |
<dependency> |
|
36 |
<groupId>org.gvsig</groupId> |
|
37 |
<artifactId> |
|
38 |
org.gvsig.derivedgeometries.swing.impl |
|
39 |
</artifactId> |
|
40 |
<scope>runtime</scope> |
|
41 |
</dependency> |
|
42 |
</dependencies> |
|
43 |
</project> |
org.gvsig.derivedgeometries/tags/org.gvsig.derivedgeometries-1.0.43/pom.xml | ||
---|---|---|
1 |
<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"> |
|
2 |
<modelVersion>4.0.0</modelVersion> |
|
3 |
<groupId>org.gvsig</groupId> |
|
4 |
<artifactId>org.gvsig.derivedgeometries</artifactId> |
|
5 |
<version>1.0.43</version> |
|
6 |
<packaging>pom</packaging> |
|
7 |
<name>org.gvsig.derivedgeometries</name> |
|
8 |
<parent> |
|
9 |
<groupId>org.gvsig</groupId> |
|
10 |
<artifactId>org.gvsig.desktop</artifactId> |
|
11 |
<version>2.0.164</version> |
|
12 |
</parent> |
|
13 |
<url>http://devel.gvsig.org/sites/org.gvsig.derivedgeometries/${project.version}</url> |
|
14 |
<scm> |
|
15 |
<connection>scm:svn:https://devel.gvsig.org/svn/gvsig-derived-geometries/org.gvsig.derivedgeometries/tags/org.gvsig.derivedgeometries-1.0.43</connection> |
|
16 |
<developerConnection>scm:svn:https://devel.gvsig.org/svn/gvsig-derived-geometries/org.gvsig.derivedgeometries/tags/org.gvsig.derivedgeometries-1.0.43</developerConnection> |
|
17 |
<url>https://devel.gvsig.org/redmine/projects/gvsig-derived-geometries/repository/show/org.gvsig.derivedgeometries/tags/org.gvsig.derivedgeometries-1.0.43</url> |
|
18 |
</scm> |
|
19 |
<repositories> |
|
20 |
<repository> |
|
21 |
<id>gvsig-public-http-repository</id> |
|
22 |
<name>gvSIG maven public HTTP repository</name> |
|
23 |
<url>http://devel.gvsig.org/m2repo/j2se</url> |
|
24 |
<releases> |
|
25 |
<enabled>true</enabled> |
|
26 |
<updatePolicy>daily</updatePolicy> |
|
27 |
<checksumPolicy>warn</checksumPolicy> |
|
28 |
</releases> |
|
29 |
<snapshots> |
|
30 |
<enabled>true</enabled> |
|
31 |
<updatePolicy>daily</updatePolicy> |
|
32 |
<checksumPolicy>warn</checksumPolicy> |
|
33 |
</snapshots> |
|
34 |
</repository> |
|
35 |
</repositories> |
|
36 |
<distributionManagement> |
|
37 |
<site> |
|
38 |
<id>gvsig-repository</id> |
|
39 |
<url>dav:https://devel.gvsig.org/download/projects/gvsig-derived-geometries/pool/${project.artifactId}/${project.version}</url> |
|
40 |
</site> |
|
41 |
</distributionManagement> |
|
42 |
<build> |
|
43 |
<plugins> |
|
44 |
<plugin> |
|
45 |
<groupId>org.apache.maven.plugins</groupId> |
|
46 |
<artifactId>maven-release-plugin</artifactId> |
|
47 |
<configuration> |
|
48 |
<tagBase>https://devel.gvsig.org/svn/gvsig-derived-geometries/${project.artifactId}/tags</tagBase> |
|
49 |
<goal>deploy</goal> |
|
50 |
</configuration> |
|
51 |
</plugin> |
|
52 |
</plugins> |
|
53 |
</build> |
|
54 |
|
|
55 |
<modules> |
|
56 |
<module>org.gvsig.derivedgeometries.app</module> |
|
57 |
<module>org.gvsig.derivedgeometries.swing</module> |
|
58 |
<module>org.gvsig.derivedgeometries.main</module> |
|
59 |
</modules> |
|
60 |
<dependencyManagement> |
|
61 |
<dependencies> |
|
62 |
<dependency> |
|
63 |
<groupId>org.gvsig</groupId> |
|
64 |
<artifactId> |
|
65 |
org.gvsig.derivedgeometries.swing.api |
|
66 |
</artifactId> |
|
67 |
<version>1.0.43</version> |
|
68 |
</dependency> |
|
69 |
<dependency> |
|
70 |
<groupId>org.gvsig</groupId> |
|
71 |
<artifactId> |
|
72 |
org.gvsig.derivedgeometries.swing.impl |
|
73 |
</artifactId> |
|
74 |
<version>1.0.43</version> |
|
75 |
</dependency> |
|
76 |
</dependencies> |
|
77 |
</dependencyManagement> |
|
78 |
</project> |
org.gvsig.derivedgeometries/tags/org.gvsig.derivedgeometries-1.0.43/org.gvsig.derivedgeometries.main/src/main/java/org/gvsig/derivedgeometries/main/DummyLayerOrderManager.java | ||
---|---|---|
1 |
/* gvSIG. Desktop Geographic Information System. |
|
2 |
* |
|
3 |
* Copyright ? 2007-2014 gvSIG Association |
|
4 |
* |
|
5 |
* This program is free software; you can redistribute it and/or |
|
6 |
* modify it under the terms of the GNU General Public License |
|
7 |
* as published by the Free Software Foundation; either version 2 |
|
8 |
* of the License, or (at your option) any later version. |
|
9 |
* |
|
10 |
* This program is distributed in the hope that it will be useful, |
|
11 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 |
* GNU General Public License for more details. |
|
14 |
* |
|
15 |
* You should have received a copy of the GNU General Public License |
|
16 |
* along with this program; if not, write to the Free Software |
|
17 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, |
|
18 |
* MA 02110-1301, USA. |
|
19 |
* |
|
20 |
* For any additional information, do not hesitate to contact us |
|
21 |
* at info AT gvsig.com, or visit our website www.gvsig.com. |
|
22 |
*/ |
|
23 |
package org.gvsig.derivedgeometries.main; |
|
24 |
|
|
25 |
import org.gvsig.fmap.mapcontext.layers.FLayer; |
|
26 |
import org.gvsig.fmap.mapcontext.layers.FLayers; |
|
27 |
import org.gvsig.fmap.mapcontext.layers.order.LayerOrderManager; |
|
28 |
import org.gvsig.tools.persistence.PersistentState; |
|
29 |
import org.gvsig.tools.persistence.exception.PersistenceException; |
|
30 |
|
|
31 |
|
|
32 |
public class DummyLayerOrderManager implements LayerOrderManager{ |
|
33 |
|
|
34 |
public void saveToState(PersistentState state) throws PersistenceException { |
|
35 |
// TODO Auto-generated method stub |
|
36 |
|
|
37 |
} |
|
38 |
|
|
39 |
public void loadFromState(PersistentState state) |
|
40 |
throws PersistenceException { |
|
41 |
// TODO Auto-generated method stub |
|
42 |
|
|
43 |
} |
|
44 |
|
|
45 |
public int getPosition(FLayers target, FLayer newLayer) { |
|
46 |
// TODO Auto-generated method stub |
|
47 |
return 0; |
|
48 |
} |
|
49 |
|
|
50 |
public String getName() { |
|
51 |
// TODO Auto-generated method stub |
|
52 |
return null; |
|
53 |
} |
|
54 |
|
|
55 |
public String getDescription() { |
|
56 |
// TODO Auto-generated method stub |
|
57 |
return null; |
|
58 |
} |
|
59 |
|
|
60 |
public String getCode() { |
|
61 |
// TODO Auto-generated method stub |
|
62 |
return null; |
|
63 |
} |
|
64 |
|
|
65 |
public Object clone() throws CloneNotSupportedException{ |
|
66 |
return new DummyLayerOrderManager(); |
|
67 |
} |
|
68 |
|
|
69 |
} |
org.gvsig.derivedgeometries/tags/org.gvsig.derivedgeometries-1.0.43/org.gvsig.derivedgeometries.main/src/main/java/org/gvsig/derivedgeometries/main/Main.java | ||
---|---|---|
1 |
/* gvSIG. Desktop Geographic Information System. |
|
2 |
* |
|
3 |
* Copyright ? 2007-2014 gvSIG Association |
|
4 |
* |
|
5 |
* This program is free software; you can redistribute it and/or |
|
6 |
* modify it under the terms of the GNU General Public License |
|
7 |
* as published by the Free Software Foundation; either version 2 |
|
8 |
* of the License, or (at your option) any later version. |
|
9 |
* |
|
10 |
* This program is distributed in the hope that it will be useful, |
|
11 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 |
* GNU General Public License for more details. |
|
14 |
* |
|
15 |
* You should have received a copy of the GNU General Public License |
|
16 |
* along with this program; if not, write to the Free Software |
|
17 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, |
|
18 |
* MA 02110-1301, USA. |
|
19 |
* |
|
20 |
* For any additional information, do not hesitate to contact us |
|
21 |
* at info AT gvsig.com, or visit our website www.gvsig.com. |
|
22 |
*/ |
|
23 |
package org.gvsig.derivedgeometries.main; |
|
24 |
|
|
25 |
import java.awt.BorderLayout; |
|
26 |
import java.awt.Dimension; |
|
27 |
import java.awt.event.ActionEvent; |
|
28 |
import java.io.File; |
|
29 |
|
|
30 |
import javax.swing.AbstractAction; |
|
31 |
import javax.swing.JButton; |
|
32 |
import javax.swing.JComponent; |
|
33 |
import javax.swing.JFrame; |
|
34 |
import javax.swing.JMenu; |
|
35 |
import javax.swing.JMenuBar; |
|
36 |
import javax.swing.JMenuItem; |
|
37 |
import javax.swing.JOptionPane; |
|
38 |
import javax.swing.JToolBar; |
|
39 |
import javax.swing.WindowConstants; |
|
40 |
|
|
41 |
import org.cresques.cts.IProjection; |
|
42 |
|
|
43 |
import org.gvsig.derivedgeometries.swing.api.DerivedGeometriesLocator; |
|
44 |
import org.gvsig.derivedgeometries.swing.api.DerivedGeometriesManager; |
|
45 |
import org.gvsig.fmap.crs.CRSFactory; |
|
46 |
import org.gvsig.fmap.dal.DALLocator; |
|
47 |
import org.gvsig.fmap.dal.DataManager; |
|
48 |
import org.gvsig.fmap.dal.DataStoreParameters; |
|
49 |
import org.gvsig.fmap.dal.exception.InitializeException; |
|
50 |
import org.gvsig.fmap.dal.exception.ProviderNotRegisteredException; |
|
51 |
import org.gvsig.fmap.dal.exception.ValidateDataParametersException; |
|
52 |
import org.gvsig.fmap.dal.feature.FeatureStore; |
|
53 |
import org.gvsig.fmap.mapcontext.MapContextLocator; |
|
54 |
import org.gvsig.fmap.mapcontext.MapContextManager; |
|
55 |
import org.gvsig.fmap.mapcontext.exceptions.LoadLayerException; |
|
56 |
import org.gvsig.fmap.mapcontext.layers.FLayer; |
|
57 |
import org.gvsig.fmap.mapcontrol.MapControl; |
|
58 |
import org.gvsig.fmap.mapcontrol.MapControlCreationException; |
|
59 |
import org.gvsig.fmap.mapcontrol.MapControlLocator; |
|
60 |
import org.gvsig.fmap.mapcontrol.MapControlManager; |
|
61 |
import org.gvsig.fmap.mapcontrol.tools.PanListenerImpl; |
|
62 |
import org.gvsig.fmap.mapcontrol.tools.Behavior.MoveBehavior; |
|
63 |
import org.gvsig.tools.library.impl.DefaultLibrariesInitializer; |
|
64 |
import org.gvsig.tools.swing.api.ToolsSwingLocator; |
|
65 |
import org.gvsig.tools.swing.api.threadsafedialogs.ThreadSafeDialogsManager; |
|
66 |
import org.gvsig.tools.swing.api.windowmanager.WindowManager; |
|
67 |
import org.gvsig.tools.swing.api.windowmanager.WindowManager.MODE; |
|
68 |
|
|
69 |
public class Main { |
|
70 |
|
|
71 |
final String DEFAULT_CRS_CODE = "EPSG:23030"; |
|
72 |
|
|
73 |
private DerivedGeometriesManager derivedGeometriesManager; |
|
74 |
private MapControlManager mapControlManager; |
|
75 |
private DataManager dataManager; |
|
76 |
private MapContextManager mapContextManager; |
|
77 |
private WindowManager windowManager; |
|
78 |
|
|
79 |
private MapControl mapControl; |
|
80 |
|
|
81 |
private JFrame mainFrame; |
|
82 |
|
|
83 |
// Actions |
|
84 |
private AbstractAction derivedGeometries; |
|
85 |
|
|
86 |
private AbstractAction openAddLayerDialog; |
|
87 |
|
|
88 |
private AbstractAction exit; |
|
89 |
|
|
90 |
public static void main(String[] args) { |
|
91 |
new DefaultLibrariesInitializer().fullInitialize(); |
|
92 |
Main main = new Main(); |
|
93 |
main.doMain(); |
|
94 |
|
|
95 |
} |
|
96 |
|
|
97 |
public Main() { |
|
98 |
mapControlManager = MapControlLocator.getMapControlManager(); |
|
99 |
derivedGeometriesManager = DerivedGeometriesLocator.getManager(); |
|
100 |
dataManager = DALLocator.getDataManager(); |
|
101 |
mapContextManager = MapContextLocator.getMapContextManager(); |
|
102 |
windowManager = ToolsSwingLocator.getWindowManager(); |
|
103 |
mapContextManager.getSymbolManager().getSymbolPreferences() |
|
104 |
.setDefaultSymbolFillColorAleatory(true); |
|
105 |
|
|
106 |
// Register our DummyLayerOrderManger needed to add sample layer |
|
107 |
MapContextLocator |
|
108 |
.registerDefaultOrderManager(DummyLayerOrderManager.class); |
|
109 |
} |
|
110 |
|
|
111 |
private void doMain() { |
|
112 |
try { |
|
113 |
mapControl = mapControlManager.createJMapControlPanel(mapContextManager.createMapContext()); |
|
114 |
} catch (MapControlCreationException e) { |
|
115 |
// TODO Auto-generated catch block |
|
116 |
} |
|
117 |
|
|
118 |
mapControl.addBehavior("pan", new MoveBehavior(new PanListenerImpl( |
|
119 |
mapControl))); |
|
120 |
|
|
121 |
mapControl.setTool("pan"); |
|
122 |
|
|
123 |
IProjection defaultProjection = CRSFactory.getCRS(DEFAULT_CRS_CODE); |
|
124 |
mapControl.getViewPort().setProjection(defaultProjection); |
|
125 |
|
|
126 |
// Create JFrame to show data |
|
127 |
mainFrame = new JFrame("Editing test app"); |
|
128 |
mainFrame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE); |
|
129 |
mainFrame.setPreferredSize(new Dimension(800, 680)); |
|
130 |
mainFrame.add(mapControl, BorderLayout.CENTER); |
|
131 |
|
|
132 |
// Create actions |
|
133 |
createActions(); |
|
134 |
|
|
135 |
// Create menu bar |
|
136 |
createMenu(); |
|
137 |
|
|
138 |
// Create tools bar |
|
139 |
createToolBar(); |
|
140 |
|
|
141 |
// Display the window. |
|
142 |
mainFrame.pack(); |
|
143 |
mainFrame.setLocation(500, 0); |
|
144 |
mainFrame.setVisible(true); |
|
145 |
} |
|
146 |
|
|
147 |
private void createToolBar() { |
|
148 |
JToolBar toolBar = new JToolBar(); |
|
149 |
|
|
150 |
toolBar.add(new JButton(openAddLayerDialog)); |
|
151 |
toolBar.add(new JButton(derivedGeometries)); |
|
152 |
|
|
153 |
mainFrame.add(toolBar, BorderLayout.PAGE_START); |
|
154 |
|
|
155 |
} |
|
156 |
|
|
157 |
private void createMenu() { |
|
158 |
// Create the menu bar. |
|
159 |
JMenuBar menuBar = new JMenuBar(); |
|
160 |
|
|
161 |
// Build the menu. |
|
162 |
JMenu menuFile = new JMenu("File"); |
|
163 |
menuFile.add(openAddLayerDialog); |
|
164 |
menuFile.add(new JMenuItem(exit)); |
|
165 |
|
|
166 |
mainFrame.setJMenuBar(menuBar); |
|
167 |
|
|
168 |
} |
|
169 |
|
|
170 |
@SuppressWarnings("serial") |
|
171 |
private void createActions() { |
|
172 |
|
|
173 |
derivedGeometries = new AbstractAction("DerivedGeometries") { |
|
174 |
|
|
175 |
public void actionPerformed(ActionEvent e) { |
|
176 |
JComponent panel = |
|
177 |
derivedGeometriesManager.getDerivedGeometriesPanel( |
|
178 |
mapControl).asJComponent(); |
|
179 |
|
|
180 |
windowManager.showWindow(panel, "derived_geometries", |
|
181 |
MODE.WINDOW); |
|
182 |
} |
|
183 |
}; |
|
184 |
|
|
185 |
openAddLayerDialog = new AbstractAction("Add sample layers") { |
|
186 |
|
|
187 |
public void actionPerformed(ActionEvent e) { |
|
188 |
try { |
|
189 |
addLayer("src/main/resources/sample-cartography/puertos_andalucia.shp"); |
|
190 |
addLayer("src/main/resources/sample-cartography/hidro_andalucia.shp"); |
|
191 |
addLayer("src/main/resources/sample-cartography/Provincias andalucia.shp"); |
|
192 |
|
|
193 |
ThreadSafeDialogsManager dlgManager = |
|
194 |
ToolsSwingLocator.getThreadSafeDialogsManager(); |
|
195 |
|
|
196 |
StringBuilder stb = new StringBuilder(); |
|
197 |
stb.append("Layer: Provincias_andalucia Type: multisurface\n"); |
|
198 |
stb.append("Layer: hidro_andalucia Type: multicurve\n"); |
|
199 |
stb.append("Layer: puertos_andalucia Type: point\n"); |
|
200 |
|
|
201 |
dlgManager.messageDialog(stb.toString(), |
|
202 |
"Sample layers added succesfully", |
|
203 |
JOptionPane.INFORMATION_MESSAGE); |
|
204 |
} catch (Exception e1) { |
|
205 |
// TODO Auto-generated catch block |
|
206 |
e1.printStackTrace(); |
|
207 |
} |
|
208 |
} |
|
209 |
}; |
|
210 |
|
|
211 |
exit = new AbstractAction("Exit") { |
|
212 |
|
|
213 |
public void actionPerformed(ActionEvent e) { |
|
214 |
System.exit(0); |
|
215 |
} |
|
216 |
}; |
|
217 |
|
|
218 |
} |
|
219 |
|
|
220 |
public void addLayer(String shpPath) throws InitializeException, |
|
221 |
ProviderNotRegisteredException, ValidateDataParametersException, |
|
222 |
LoadLayerException { |
|
223 |
DataStoreParameters params; |
|
224 |
params = dataManager.createStoreParameters("Shape"); |
|
225 |
|
|
226 |
File shpFile = new File(shpPath); |
|
227 |
|
|
228 |
params.setDynValue("shpFile", shpFile.getPath()); |
|
229 |
params.setDynValue("CRS", CRSFactory.getCRS(DEFAULT_CRS_CODE)); |
|
230 |
params.validate(); |
|
231 |
|
|
232 |
FeatureStore store = |
|
233 |
(FeatureStore) dataManager.openStore("Shape", params); |
|
234 |
|
|
235 |
FLayer layer = mapContextManager.createLayer(store.getName(), store); |
|
236 |
|
|
237 |
mapControl.getMapContext().getLayers().addLayer(layer); |
|
238 |
mapControl.getMapContext().getLayers().setActive(true); |
|
239 |
layer.dispose(); |
|
240 |
|
|
241 |
} |
|
242 |
|
|
243 |
} |
org.gvsig.derivedgeometries/tags/org.gvsig.derivedgeometries-1.0.43/org.gvsig.derivedgeometries.main/pom.xml | ||
---|---|---|
1 |
<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"> |
|
2 |
<modelVersion>4.0.0</modelVersion> |
|
3 |
<parent> |
|
4 |
<groupId>org.gvsig</groupId> |
|
5 |
<artifactId>org.gvsig.derivedgeometries</artifactId> |
|
6 |
<version>1.0.43</version> |
|
7 |
</parent> |
|
8 |
<artifactId>org.gvsig.derivedgeometries.main</artifactId> |
|
9 |
<name>org.gvsig.derivedgeometries.main</name> |
|
10 |
|
|
11 |
<dependencies> |
|
12 |
<dependency> |
|
13 |
<groupId>org.gvsig</groupId> |
|
14 |
<artifactId>org.gvsig.metadata.lib.basic.api</artifactId> |
|
15 |
<scope>compile</scope> |
|
16 |
</dependency> |
|
17 |
<dependency> |
|
18 |
<groupId>org.gvsig</groupId> |
|
19 |
<artifactId>org.gvsig.fmap.control</artifactId> |
|
20 |
<scope>compile</scope> |
|
21 |
</dependency> |
|
22 |
<dependency> |
|
23 |
<groupId>org.gvsig</groupId> |
|
24 |
<artifactId>org.gvsig.fmap.dal.api</artifactId> |
|
25 |
<scope>compile</scope> |
|
26 |
</dependency> |
|
27 |
<dependency> |
|
28 |
<groupId>org.gvsig</groupId> |
|
29 |
<artifactId>org.gvsig.fmap.geometry.api</artifactId> |
|
30 |
<scope>compile</scope> |
|
31 |
</dependency> |
|
32 |
<dependency> |
|
33 |
<groupId>org.gvsig</groupId> |
|
34 |
<artifactId>org.gvsig.fmap.mapcontext.api</artifactId> |
|
35 |
<scope>compile</scope> |
|
36 |
</dependency> |
|
37 |
<dependency> |
|
38 |
<groupId>org.gvsig</groupId> |
|
39 |
<artifactId>org.gvsig.tools.swing.api</artifactId> |
|
40 |
<scope>compile</scope> |
|
41 |
</dependency> |
|
42 |
|
|
43 |
<!-- runtime dependencies --> |
|
44 |
<dependency> |
|
45 |
<groupId>org.gvsig</groupId> |
|
46 |
<artifactId>org.gvsig.metadata.lib.basic.impl</artifactId> |
|
47 |
<scope>runtime</scope> |
|
48 |
</dependency> |
|
49 |
<!-- |
|
50 |
<dependency> |
|
51 |
<groupId>org.gvsig</groupId> |
|
52 |
<artifactId>org.gvsig.fmap.geometry.generalpath</artifactId> |
|
53 |
<scope>runtime</scope> |
|
54 |
</dependency> |
|
55 |
<dependency> |
|
56 |
<groupId>org.gvsig</groupId> |
|
57 |
<artifactId>org.gvsig.fmap.geometry.operation</artifactId> |
|
58 |
<scope>runtime</scope> |
|
59 |
</dependency> |
|
60 |
--> |
|
61 |
<dependency> |
|
62 |
<groupId>org.gvsig</groupId> |
|
63 |
<artifactId>org.gvsig.fmap.mapcontext.impl</artifactId> |
|
64 |
<scope>runtime</scope> |
|
65 |
</dependency> |
|
66 |
<dependency> |
|
67 |
<groupId>org.gvsig</groupId> |
|
68 |
<artifactId>org.gvsig.symbology.lib.impl</artifactId> |
|
69 |
<scope>runtime</scope> |
|
70 |
</dependency> |
|
71 |
<dependency> |
|
72 |
<groupId>org.gvsig</groupId> |
|
73 |
<artifactId>org.gvsig.fmap.dal.impl</artifactId> |
|
74 |
<scope>runtime</scope> |
|
75 |
</dependency> |
|
76 |
<dependency> |
|
77 |
<groupId>org.gvsig</groupId> |
|
78 |
<artifactId>org.gvsig.fmap.dal.spi</artifactId> |
|
79 |
<scope>runtime</scope> |
|
80 |
</dependency> |
|
81 |
<dependency> |
|
82 |
<groupId>org.gvsig</groupId> |
|
83 |
<artifactId>org.gvsig.fmap.dal.file.shp</artifactId> |
|
84 |
<scope>runtime</scope> |
|
85 |
</dependency> |
|
86 |
<dependency> |
|
87 |
<groupId>org.gvsig</groupId> |
|
88 |
<artifactId>org.gvsig.fmap.dal.file.dbf</artifactId> |
|
89 |
<scope>runtime</scope> |
|
90 |
</dependency> |
|
91 |
<dependency> |
|
92 |
<groupId>org.gvsig</groupId> |
|
93 |
<artifactId>org.gvsig.fmap.dal.file.lib</artifactId> |
|
94 |
<scope>runtime</scope> |
|
95 |
</dependency> |
|
96 |
<dependency> |
|
97 |
<groupId>org.gvsig</groupId> |
|
98 |
<artifactId>org.gvsig.timesupport.lib.api</artifactId> |
|
99 |
<scope>runtime</scope> |
|
100 |
</dependency> |
|
101 |
<dependency> |
|
102 |
<groupId>org.gvsig</groupId> |
|
103 |
<artifactId>org.gvsig.timesupport.lib.impl</artifactId> |
|
104 |
<scope>runtime</scope> |
|
105 |
</dependency> |
|
106 |
<dependency> |
|
107 |
<groupId>org.gvsig</groupId> |
|
108 |
<artifactId>org.gvsig.tools.evaluator.sqljep</artifactId> |
|
109 |
<scope>runtime</scope> |
|
110 |
</dependency> |
|
111 |
<dependency> |
|
112 |
<groupId>org.gvsig</groupId> |
|
113 |
<artifactId>org.gvsig.proj.lib.proj4j</artifactId> |
|
114 |
<scope>runtime</scope> |
|
115 |
</dependency> |
|
116 |
<dependency> |
|
117 |
<groupId>org.gvsig</groupId> |
|
118 |
<artifactId> |
|
119 |
org.gvsig.derivedgeometries.swing.api |
|
120 |
</artifactId> |
|
121 |
</dependency> |
|
122 |
<dependency> |
|
123 |
<groupId>org.gvsig</groupId> |
|
124 |
<artifactId> |
|
125 |
org.gvsig.derivedgeometries.swing.impl |
|
126 |
</artifactId> |
|
127 |
</dependency> |
|
128 |
<dependency> |
|
129 |
<groupId>org.gvsig</groupId> |
|
130 |
<artifactId>org.gvsig.tools.swing.impl</artifactId> |
|
131 |
<scope>runtime</scope> |
|
132 |
</dependency> |
|
133 |
</dependencies> |
|
134 |
</project> |
org.gvsig.derivedgeometries/tags/org.gvsig.derivedgeometries-1.0.43/org.gvsig.derivedgeometries.swing/org.gvsig.derivedgeometries.swing.api/src/main/resources/META-INF/services/org.gvsig.tools.library.Library | ||
---|---|---|
1 |
org.gvsig.derivedgeometries.swing.api.DerivedGeometriesLibrary |
org.gvsig.derivedgeometries/tags/org.gvsig.derivedgeometries-1.0.43/org.gvsig.derivedgeometries.swing/org.gvsig.derivedgeometries.swing.api/src/main/java/org/gvsig/derivedgeometries/swing/api/DerivedGeometriesManager.java | ||
---|---|---|
1 |
/* gvSIG. Desktop Geographic Information System. |
|
2 |
* |
|
3 |
* Copyright ? 2007-2014 gvSIG Association |
|
4 |
* |
|
5 |
* This program is free software; you can redistribute it and/or |
|
6 |
* modify it under the terms of the GNU General Public License |
|
7 |
* as published by the Free Software Foundation; either version 2 |
|
8 |
* of the License, or (at your option) any later version. |
|
9 |
* |
|
10 |
* This program is distributed in the hope that it will be useful, |
|
11 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 |
* GNU General Public License for more details. |
|
14 |
* |
|
15 |
* You should have received a copy of the GNU General Public License |
|
16 |
* along with this program; if not, write to the Free Software |
|
17 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, |
|
18 |
* MA 02110-1301, USA. |
|
19 |
* |
|
20 |
* For any additional information, do not hesitate to contact us |
|
21 |
* at info AT gvsig.com, or visit our website www.gvsig.com. |
|
22 |
*/ |
|
23 |
package org.gvsig.derivedgeometries.swing.api; |
|
24 |
|
|
25 |
import org.gvsig.derivedgeometries.swing.api.DerivedGeometriesProcess.TYPE; |
|
26 |
import org.gvsig.derivedgeometries.swing.api.panels.DerivedGeometriesPanel; |
|
27 |
import org.gvsig.derivedgeometries.swing.api.panels.FeaturesControlPanel; |
|
28 |
import org.gvsig.derivedgeometries.swing.api.panels.LayerAndProcessSelectionPanel; |
|
29 |
import org.gvsig.fmap.geom.Geometry; |
|
30 |
import org.gvsig.fmap.mapcontext.layers.vectorial.FLyrVect; |
|
31 |
import org.gvsig.fmap.mapcontrol.MapControl; |
|
32 |
|
|
33 |
/** |
|
34 |
* Main class to manage DerivedGeometries functionalities |
|
35 |
* |
|
36 |
* @author gvSIG team |
|
37 |
* @version $Id$ |
|
38 |
*/ |
|
39 |
public interface DerivedGeometriesManager { |
|
40 |
|
|
41 |
/** |
|
42 |
* Creates an empty {@link DerivedGeometriesParameters} |
|
43 |
* |
|
44 |
* @return |
|
45 |
*/ |
|
46 |
public DerivedGeometriesParameters createDerivedGeometriesParameters(); |
|
47 |
|
|
48 |
/** |
|
49 |
* Creates a {@link DerivedGeometriesParameters}. |
|
50 |
* |
|
51 |
* @param mapControl |
|
52 |
* @param sourceLayer |
|
53 |
* @param outputLayerName |
|
54 |
* Name of output layer. |
|
55 |
* @param outputLayerPath |
|
56 |
* Path of output layer. |
|
57 |
* @param outputLayerType |
|
58 |
* Type of output layer. See {@link Geometry.TYPES} |
|
59 |
* @param processType |
|
60 |
* Type of process. See {@link DerivedGeometriesProcess.TYPE} |
|
61 |
* @return |
|
62 |
*/ |
|
63 |
public DerivedGeometriesParameters createDerivedGeometriesParameters( |
|
64 |
MapControl mapControl, FLyrVect sourceLayer, String outputLayerName, |
|
65 |
String outputLayerPath, int outputLayerType, TYPE processType); |
|
66 |
|
|
67 |
/** |
|
68 |
* @return a new {@link FeaturesControlPanel}. |
|
69 |
*/ |
|
70 |
public FeaturesControlPanel getFeaturesControlPanel(); |
|
71 |
|
|
72 |
/** |
|
73 |
* @param mapControl |
|
74 |
* to get vectorial layers, adds listeners... |
|
75 |
* @return a new {@link DerivedGeometriesPanel}. |
|
76 |
*/ |
|
77 |
public DerivedGeometriesPanel getDerivedGeometriesPanel( |
|
78 |
MapControl mapControl); |
|
79 |
|
|
80 |
/** |
|
81 |
* @param mapControl |
|
82 |
* mapControl to get vectorial layers, adds listeners... |
|
83 |
* @return a new {@link LayerAndProcessSelectionPanel} |
|
84 |
*/ |
|
85 |
public LayerAndProcessSelectionPanel getLayerAndProcessSelectionPanel( |
|
86 |
MapControl mapControl); |
|
87 |
|
|
88 |
/** |
|
89 |
* Given {@link DerivedGeometriesParameters}, starts a new |
|
90 |
* {@link DerivedGeometriesProcess}. |
|
91 |
* |
|
92 |
* @param parameters |
|
93 |
*/ |
|
94 |
public void startDerivedGeometriesProcess( |
|
95 |
DerivedGeometriesParameters parameters); |
|
96 |
|
|
97 |
} |
org.gvsig.derivedgeometries/tags/org.gvsig.derivedgeometries-1.0.43/org.gvsig.derivedgeometries.swing/org.gvsig.derivedgeometries.swing.api/src/main/java/org/gvsig/derivedgeometries/swing/api/exceptions/FetaureTableModelException.java | ||
---|---|---|
1 |
/* gvSIG. Desktop Geographic Information System. |
|
2 |
* |
|
3 |
* Copyright ? 2007-2014 gvSIG Association |
|
4 |
* |
|
5 |
* This program is free software; you can redistribute it and/or |
|
6 |
* modify it under the terms of the GNU General Public License |
|
7 |
* as published by the Free Software Foundation; either version 2 |
|
8 |
* of the License, or (at your option) any later version. |
|
9 |
* |
|
10 |
* This program is distributed in the hope that it will be useful, |
|
11 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 |
* GNU General Public License for more details. |
|
14 |
* |
|
15 |
* You should have received a copy of the GNU General Public License |
|
16 |
* along with this program; if not, write to the Free Software |
|
17 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, |
|
18 |
* MA 02110-1301, USA. |
|
19 |
* |
|
20 |
* For any additional information, do not hesitate to contact us |
|
21 |
* at info AT gvsig.com, or visit our website www.gvsig.com. |
|
22 |
*/ |
|
23 |
package org.gvsig.derivedgeometries.swing.api.exceptions; |
|
24 |
|
|
25 |
public class FetaureTableModelException extends DerivedGeometriesException { |
|
26 |
|
|
27 |
/** |
|
28 |
* |
|
29 |
*/ |
|
30 |
private static final long serialVersionUID = -5003333029683139078L; |
|
31 |
|
|
32 |
private static final String MESSAGE = |
|
33 |
"An error has been produced creating feature table model."; |
|
34 |
|
|
35 |
private static final String KEY = "_FeatureTableModelException"; |
|
36 |
|
|
37 |
public FetaureTableModelException(Throwable ex) { |
|
38 |
super(MESSAGE, ex, KEY, serialVersionUID); |
|
39 |
} |
|
40 |
|
|
41 |
public FetaureTableModelException(String message, Throwable ex) { |
|
42 |
super(message, ex, KEY, serialVersionUID); |
|
43 |
} |
|
44 |
|
|
45 |
} |
org.gvsig.derivedgeometries/tags/org.gvsig.derivedgeometries-1.0.43/org.gvsig.derivedgeometries.swing/org.gvsig.derivedgeometries.swing.api/src/main/java/org/gvsig/derivedgeometries/swing/api/exceptions/DerivedGeometriesException.java | ||
---|---|---|
1 |
/* gvSIG. Desktop Geographic Information System. |
|
2 |
* |
|
3 |
* Copyright ? 2007-2014 gvSIG Association |
|
4 |
* |
|
5 |
* This program is free software; you can redistribute it and/or |
|
6 |
* modify it under the terms of the GNU General Public License |
|
7 |
* as published by the Free Software Foundation; either version 2 |
|
8 |
* of the License, or (at your option) any later version. |
|
9 |
* |
|
10 |
* This program is distributed in the hope that it will be useful, |
|
11 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 |
* GNU General Public License for more details. |
|
14 |
* |
|
15 |
* You should have received a copy of the GNU General Public License |
|
16 |
* along with this program; if not, write to the Free Software |
|
17 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, |
|
18 |
* MA 02110-1301, USA. |
|
19 |
* |
|
20 |
* For any additional information, do not hesitate to contact us |
|
21 |
* at info AT gvsig.com, or visit our website www.gvsig.com. |
|
22 |
*/ |
|
23 |
package org.gvsig.derivedgeometries.swing.api.exceptions; |
|
24 |
|
|
25 |
import org.gvsig.tools.exception.BaseException; |
|
26 |
|
|
27 |
public class DerivedGeometriesException extends BaseException { |
|
28 |
|
|
29 |
/** |
|
30 |
* |
|
31 |
*/ |
|
32 |
private static final long serialVersionUID = -5881366280361882646L; |
|
33 |
|
|
34 |
private static final String MESSAGE = |
|
35 |
"An error has been produced in the Derived Geometries library"; |
|
36 |
|
|
37 |
private static final String KEY = "_DerivedGeometriesException"; |
|
38 |
|
|
39 |
/** |
|
40 |
* Constructor to be used in rare cases, usually you must create a new child |
|
41 |
* exception class for each case. |
|
42 |
* <strong>Don't use this constructor in child classes.</strong> |
|
43 |
*/ |
|
44 |
public DerivedGeometriesException() { |
|
45 |
super(MESSAGE, KEY, serialVersionUID); |
|
46 |
} |
|
47 |
|
|
48 |
/** |
|
49 |
* Constructor to be used in rare cases, usually you must create a new child |
|
50 |
* exception class for each case. |
|
51 |
* <p> |
|
52 |
* <strong>Don't use this constructor in child classes.</strong> |
|
53 |
* </p> |
|
54 |
* |
|
55 |
* @param cause |
|
56 |
* the original cause of the exception |
|
57 |
*/ |
|
58 |
public DerivedGeometriesException(Exception cause) { |
|
59 |
super(MESSAGE, cause, KEY, serialVersionUID); |
|
60 |
} |
|
61 |
|
|
62 |
/** |
|
63 |
* @see BaseException#BaseException(String, String, long). |
|
64 |
* @param message |
|
65 |
* the default messageFormat to describe the exception |
|
66 |
* @param key |
|
67 |
* the key to use to search a localized messageFormnata |
|
68 |
* @param code |
|
69 |
* the unique code to identify the exception |
|
70 |
*/ |
|
71 |
protected DerivedGeometriesException(String message, String key, long code) { |
|
72 |
super(message, key, code); |
|
73 |
} |
|
74 |
|
|
75 |
/** |
|
76 |
* @see BaseException#BaseException(String, Throwable, String, long). |
|
77 |
* @param message |
|
78 |
* the default messageFormat to describe the exception |
|
79 |
* @param cause |
|
80 |
* the original cause of the exception |
|
81 |
* @param key |
|
82 |
* the key to use to search a localized messageFormnata |
|
83 |
* @param code |
|
84 |
* the unique code to identify the exception |
|
85 |
*/ |
|
86 |
protected DerivedGeometriesException(String message, Throwable cause, |
|
87 |
String key, long code) { |
|
88 |
super(message, cause, key, code); |
|
89 |
} |
|
90 |
|
|
91 |
} |
org.gvsig.derivedgeometries/tags/org.gvsig.derivedgeometries-1.0.43/org.gvsig.derivedgeometries.swing/org.gvsig.derivedgeometries.swing.api/src/main/java/org/gvsig/derivedgeometries/swing/api/exceptions/ValidateSourceLayerException.java | ||
---|---|---|
1 |
/* gvSIG. Desktop Geographic Information System. |
|
2 |
* |
|
3 |
* Copyright ? 2007-2014 gvSIG Association |
|
4 |
* |
|
5 |
* This program is free software; you can redistribute it and/or |
|
6 |
* modify it under the terms of the GNU General Public License |
|
7 |
* as published by the Free Software Foundation; either version 2 |
|
8 |
* of the License, or (at your option) any later version. |
|
9 |
* |
|
10 |
* This program is distributed in the hope that it will be useful, |
|
11 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 |
* GNU General Public License for more details. |
|
14 |
* |
|
15 |
* You should have received a copy of the GNU General Public License |
|
16 |
* along with this program; if not, write to the Free Software |
|
17 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, |
|
18 |
* MA 02110-1301, USA. |
|
19 |
* |
|
20 |
* For any additional information, do not hesitate to contact us |
|
21 |
* at info AT gvsig.com, or visit our website www.gvsig.com. |
|
22 |
*/ |
|
23 |
package org.gvsig.derivedgeometries.swing.api.exceptions; |
|
24 |
|
|
25 |
public class ValidateSourceLayerException extends DerivedGeometriesException { |
|
26 |
|
|
27 |
/** |
|
28 |
* |
|
29 |
*/ |
|
30 |
private static final long serialVersionUID = 6671117008934615055L; |
|
31 |
|
|
32 |
private static final String MESSAGE = |
|
33 |
"An error has been produced validating source layer."; |
|
34 |
|
|
35 |
private static final String KEY = "_ValidateSourceLayerException"; |
|
36 |
|
|
37 |
public ValidateSourceLayerException(Throwable ex) { |
|
38 |
super(MESSAGE, ex, KEY, serialVersionUID); |
|
39 |
} |
|
40 |
|
|
41 |
public ValidateSourceLayerException(String message, Throwable ex) { |
|
42 |
super(message, ex, KEY, serialVersionUID); |
|
43 |
} |
|
44 |
|
|
45 |
} |
org.gvsig.derivedgeometries/tags/org.gvsig.derivedgeometries-1.0.43/org.gvsig.derivedgeometries.swing/org.gvsig.derivedgeometries.swing.api/src/main/java/org/gvsig/derivedgeometries/swing/api/exceptions/LoadSelectedFeatureDataException.java | ||
---|---|---|
1 |
/* gvSIG. Desktop Geographic Information System. |
|
2 |
* |
|
3 |
* Copyright ? 2007-2014 gvSIG Association |
|
4 |
* |
|
5 |
* This program is free software; you can redistribute it and/or |
|
6 |
* modify it under the terms of the GNU General Public License |
|
7 |
* as published by the Free Software Foundation; either version 2 |
|
8 |
* of the License, or (at your option) any later version. |
|
9 |
* |
|
10 |
* This program is distributed in the hope that it will be useful, |
|
11 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 |
* GNU General Public License for more details. |
|
14 |
* |
|
15 |
* You should have received a copy of the GNU General Public License |
|
16 |
* along with this program; if not, write to the Free Software |
|
17 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, |
|
18 |
* MA 02110-1301, USA. |
|
19 |
* |
|
20 |
* For any additional information, do not hesitate to contact us |
|
21 |
* at info AT gvsig.com, or visit our website www.gvsig.com. |
|
22 |
*/ |
|
23 |
package org.gvsig.derivedgeometries.swing.api.exceptions; |
|
24 |
|
|
25 |
public class LoadSelectedFeatureDataException extends |
|
26 |
DerivedGeometriesException { |
|
27 |
|
|
28 |
/** |
|
29 |
* |
|
30 |
*/ |
|
31 |
private static final long serialVersionUID = -1477432246895858868L; |
|
32 |
|
|
33 |
private static final String MESSAGE = |
|
34 |
"An error has been produced loading selected features."; |
|
35 |
|
|
36 |
private static final String KEY = "_LoadSelectedFeatureDataException"; |
|
37 |
|
|
38 |
public LoadSelectedFeatureDataException(Throwable ex) { |
|
39 |
super(MESSAGE, ex, KEY, serialVersionUID); |
|
40 |
} |
|
41 |
|
|
42 |
public LoadSelectedFeatureDataException(String message, Throwable ex) { |
|
43 |
super(message, ex, KEY, serialVersionUID); |
|
44 |
} |
|
45 |
|
|
46 |
} |
org.gvsig.derivedgeometries/tags/org.gvsig.derivedgeometries-1.0.43/org.gvsig.derivedgeometries.swing/org.gvsig.derivedgeometries.swing.api/src/main/java/org/gvsig/derivedgeometries/swing/api/exceptions/FormatRowException.java | ||
---|---|---|
1 |
/* gvSIG. Desktop Geographic Information System. |
|
2 |
* |
|
3 |
* Copyright ? 2007-2014 gvSIG Association |
|
4 |
* |
|
5 |
* This program is free software; you can redistribute it and/or |
|
6 |
* modify it under the terms of the GNU General Public License |
|
7 |
* as published by the Free Software Foundation; either version 2 |
|
8 |
* of the License, or (at your option) any later version. |
|
9 |
* |
|
10 |
* This program is distributed in the hope that it will be useful, |
|
11 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 |
* GNU General Public License for more details. |
|
14 |
* |
|
15 |
* You should have received a copy of the GNU General Public License |
|
16 |
* along with this program; if not, write to the Free Software |
|
17 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, |
|
18 |
* MA 02110-1301, USA. |
|
19 |
* |
|
20 |
* For any additional information, do not hesitate to contact us |
|
21 |
* at info AT gvsig.com, or visit our website www.gvsig.com. |
|
22 |
*/ |
Also available in: Unified diff