Revision 34350
tags/v2_0_0_Build_2023/extensions/extRasterTools-SE/pom.xml | ||
---|---|---|
1 |
<?xml version="1.0" encoding="UTF-8"?> |
|
2 |
|
|
3 |
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
|
4 |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 |
|
5 |
http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
|
6 |
|
|
7 |
<modelVersion>4.0.0</modelVersion> |
|
8 |
<groupId>org.gvsig</groupId> |
|
9 |
<artifactId>org.gvsig.rastertools</artifactId> |
|
10 |
<packaging>jar</packaging> |
|
11 |
<version>2.0-SNAPSHOT</version> |
|
12 |
<name>extRasterTools-SE</name> |
|
13 |
<url>http://gvsig.org</url> |
|
14 |
<description>Raster layer support and tools: |
|
15 |
- Basic statistics |
|
16 |
- Histogram |
|
17 |
- Filters |
|
18 |
- Raster properties (scale range, linear enhance, nodata value, opacity, transparency) |
|
19 |
- Define area of interest (ROIs) |
|
20 |
- Set the colour table (raster symbology) |
|
21 |
- Create overviews |
|
22 |
- Open analysis view |
|
23 |
- Radiometric enhance |
|
24 |
- Vectorization |
|
25 |
- Geolocalization |
|
26 |
- Reproject raster layers. |
|
27 |
- Export raster file (clipping, save as ...) |
|
28 |
- Export view as raster file |
|
29 |
- Create .rmf (raster meta file) |
|
30 |
- Select raster layer |
|
31 |
- Pixel zoom / increase |
|
32 |
|
|
33 |
</description> |
|
34 |
<parent> |
|
35 |
<groupId>org.gvsig</groupId> |
|
36 |
<artifactId>gvsig-base-extension-pom</artifactId> |
|
37 |
<version>2.0-SNAPSHOT</version> |
|
38 |
</parent> |
|
39 |
<distributionManagement> |
|
40 |
<site> |
|
41 |
<id>gvsig-repository</id> |
|
42 |
<url>${site-repository}/</url> |
|
43 |
</site> |
|
44 |
</distributionManagement> |
|
45 |
|
|
46 |
<dependencies> |
|
47 |
<dependency> |
|
48 |
<groupId>org.gvsig</groupId> |
|
49 |
<artifactId>org.gvsig.projection</artifactId> |
|
50 |
<version>2.0-SNAPSHOT</version> |
|
51 |
</dependency> |
|
52 |
<dependency> |
|
53 |
<groupId>org.gvsig</groupId> |
|
54 |
<artifactId>org.gvsig.raster</artifactId> |
|
55 |
<version>2.0-SNAPSHOT</version> |
|
56 |
</dependency> |
|
57 |
<dependency> |
|
58 |
<groupId>org.gvsig</groupId> |
|
59 |
<artifactId>org.gvsig.raster.io</artifactId> |
|
60 |
<version>2.0-SNAPSHOT</version> |
|
61 |
</dependency> |
|
62 |
<dependency> |
|
63 |
<groupId>org.gvsig</groupId> |
|
64 |
<artifactId>org.gvsig.fmap.dal.store.raster</artifactId> |
|
65 |
<version>2.0-SNAPSHOT</version> |
|
66 |
</dependency> |
|
67 |
<dependency> |
|
68 |
<groupId>org.gvsig</groupId> |
|
69 |
<artifactId>org.gvsig.fmap.mapcontext</artifactId> |
|
70 |
<version>2.0-SNAPSHOT</version> |
|
71 |
</dependency> |
|
72 |
<dependency> |
|
73 |
<groupId>org.gvsig</groupId> |
|
74 |
<artifactId>org.gvsig.symbology.lib.api</artifactId> |
|
75 |
<version>2.0.0-SNAPSHOT</version> |
|
76 |
</dependency> |
|
77 |
<dependency> |
|
78 |
<groupId>org.gvsig</groupId> |
|
79 |
<artifactId>org.gvsig.fmap.control</artifactId> |
|
80 |
<version>2.0-SNAPSHOT</version> |
|
81 |
</dependency> |
|
82 |
<dependency> |
|
83 |
<groupId>org.gvsig</groupId> |
|
84 |
<artifactId>org.gvsig.ui</artifactId> |
|
85 |
<version>2.0-SNAPSHOT</version> |
|
86 |
</dependency> |
|
87 |
<dependency> |
|
88 |
<groupId>org.gvsig</groupId> |
|
89 |
<artifactId>org.gvsig.andami</artifactId> |
|
90 |
<version>2.0-SNAPSHOT</version> |
|
91 |
</dependency> |
|
92 |
<dependency> |
|
93 |
<groupId>org.gvsig</groupId> |
|
94 |
<artifactId>org.gvsig.app</artifactId> |
|
95 |
<version>2.0-SNAPSHOT</version> |
|
96 |
</dependency> |
|
97 |
<!-- |
|
98 |
<dependency> |
|
99 |
<groupId>org.gvsig</groupId> |
|
100 |
<artifactId>libIverUtiles</artifactId> |
|
101 |
<version>2.0-SNAPSHOT</version> |
|
102 |
</dependency> --> |
|
103 |
<!--TESTS--> |
|
104 |
<dependency> |
|
105 |
<groupId>org.gvsig</groupId> |
|
106 |
<artifactId>org.gvsig.tools.lib</artifactId> |
|
107 |
<type>test-jar</type> |
|
108 |
<scope>test</scope> |
|
109 |
</dependency> |
|
110 |
</dependencies> |
|
111 |
<properties> |
|
112 |
<build-dir>${basedir}/../build</build-dir> |
|
113 |
</properties> |
|
114 |
<build> |
|
115 |
<sourceDirectory>src</sourceDirectory> |
|
116 |
<testSourceDirectory>src-test</testSourceDirectory> |
|
117 |
<resources> |
|
118 |
<resource> |
|
119 |
<directory>src</directory> |
|
120 |
<includes> |
|
121 |
<include>**/*.gif</include> |
|
122 |
<include>**/*.png</include> |
|
123 |
<include>**/*.PNG</include> |
|
124 |
<include> **/*.bmp</include> |
|
125 |
<include> **/*.jpg</include> |
|
126 |
<include> **/*.jpeg</include> |
|
127 |
<include> **/*.xml</include> |
|
128 |
</includes> |
|
129 |
</resource> |
|
130 |
</resources> |
|
131 |
<plugins> |
|
132 |
<!-- /TODO --> |
|
133 |
<plugin> |
|
134 |
<groupId>org.apache.maven.plugins</groupId> |
|
135 |
<artifactId>maven-jar-plugin</artifactId> |
|
136 |
<configuration> |
|
137 |
<includes> |
|
138 |
<include>**/rastertools/**</include> |
|
139 |
<include>**/gui/wizards/**</include> |
|
140 |
</includes> |
|
141 |
<excludes> |
|
142 |
<exclude>**/rastertools/properties/dialog/** |
|
143 |
</exclude> |
|
144 |
</excludes> |
|
145 |
</configuration> |
|
146 |
<executions> |
|
147 |
<execution> |
|
148 |
<id>gvsig</id> |
|
149 |
<phase>package</phase> |
|
150 |
<goals> |
|
151 |
<goal>jar</goal> |
|
152 |
</goals> |
|
153 |
<configuration> |
|
154 |
<classifier>gvsig</classifier> |
|
155 |
<includes> |
|
156 |
<include>**/org/gvsig/raster/** |
|
157 |
</include> |
|
158 |
</includes> |
|
159 |
<excludes> |
|
160 |
<exclude>**/org/gvsig/raster/gui/wizards/** |
|
161 |
</exclude> |
|
162 |
</excludes> |
|
163 |
</configuration> |
|
164 |
</execution> |
|
165 |
<execution> |
|
166 |
<id>fmap</id> |
|
167 |
<phase>package</phase> |
|
168 |
<goals> |
|
169 |
<goal>jar</goal> |
|
170 |
</goals> |
|
171 |
<configuration> |
|
172 |
<classifier>fmap</classifier> |
|
173 |
<includes> |
|
174 |
<include>**/org/gvsig/fmap/raster/** |
|
175 |
</include> |
|
176 |
</includes> |
|
177 |
<excludes> |
|
178 |
<exclude>NONE</exclude> |
|
179 |
</excludes> |
|
180 |
</configuration> |
|
181 |
</execution> |
|
182 |
<execution> |
|
183 |
<goals> |
|
184 |
<goal>test-jar</goal> |
|
185 |
</goals> |
|
186 |
<configuration> |
|
187 |
<includes> |
|
188 |
<include>**/**</include> |
|
189 |
</includes> |
|
190 |
<excludes> |
|
191 |
<exclude>NONE</exclude> |
|
192 |
</excludes> |
|
193 |
</configuration> |
|
194 |
</execution> |
|
195 |
</executions> |
|
196 |
</plugin> |
|
197 |
<plugin> |
|
198 |
<artifactId>maven-antrun-plugin</artifactId> |
|
199 |
<executions> |
|
200 |
<execution> |
|
201 |
<id>services</id> |
|
202 |
<phase>package</phase> |
|
203 |
<goals> |
|
204 |
<goal>run</goal> |
|
205 |
</goals> |
|
206 |
<configuration> |
|
207 |
<tasks> |
|
208 |
<jar destfile="${project.build.directory}/${project.build.finalName}-fmap.jar" update="true"> |
|
209 |
<fileset dir="${basedir}/resources/fmap" /> |
|
210 |
</jar> |
|
211 |
</tasks> |
|
212 |
</configuration> |
|
213 |
</execution> |
|
214 |
</executions> |
|
215 |
</plugin> |
|
216 |
<plugin> |
|
217 |
<groupId>org.apache.maven.plugins</groupId> |
|
218 |
<artifactId>maven-surefire-plugin</artifactId> |
|
219 |
<configuration> |
|
220 |
<additionalClasspathElements> |
|
221 |
<additionalClasspathElement>${basedir}/resources/fmap</additionalClasspathElement> |
|
222 |
</additionalClasspathElements> |
|
223 |
<skipTests>true</skipTests> |
|
224 |
</configuration> |
|
225 |
</plugin> |
|
226 |
</plugins> |
|
227 |
</build> |
|
228 |
</project> |
tags/v2_0_0_Build_2023/extensions/extRasterTools-SE/resources/fmap/META-INF/services/org.gvsig.tools.library.Library | ||
---|---|---|
1 |
org.gvsig.fmap.raster.FmapRasterLibrary |
tags/v2_0_0_Build_2023/extensions/extRasterTools-SE/.cvsignore | ||
---|---|---|
1 |
bin |
|
2 |
dist |
|
3 |
bin-test |
|
0 | 4 |
tags/v2_0_0_Build_2023/extensions/extRasterTools-SE/distribution/distribution.xml | ||
---|---|---|
1 |
<assembly> |
|
2 |
<id>distribution</id> |
|
3 |
|
|
4 |
<formats> |
|
5 |
<format>dir</format> |
|
6 |
</formats> |
|
7 |
<fileSets> |
|
8 |
<!-- Extructure for the extension --> |
|
9 |
<fileSet> |
|
10 |
<directory>config</directory> |
|
11 |
<outputDirectory>${extension.install.dir.name}</outputDirectory> |
|
12 |
</fileSet> |
|
13 |
<fileSet> |
|
14 |
<directory>images</directory> |
|
15 |
<outputDirectory>${extension.install.dir.name}/images</outputDirectory> |
|
16 |
</fileSet> |
|
17 |
<!-- Extructure for the native libraries --> |
|
18 |
<!-- <fileSet>--> |
|
19 |
<!-- <directory>${basedir}/../binaries/linux/3D/</directory>--> |
|
20 |
<!-- <outputDirectory>/linux/lib</outputDirectory>--> |
|
21 |
<!-- </fileSet>--> |
|
22 |
</fileSets> |
|
23 |
<files> |
|
24 |
<file> |
|
25 |
<source>package.info</source> |
|
26 |
<outputDirectory>${extension.install.dir.name}</outputDirectory> |
|
27 |
</file> |
|
28 |
</files> |
|
29 |
<!-- *********************************************************************** --> |
|
30 |
<!-- * *--> |
|
31 |
<!-- ***********************************************************************--> |
|
32 |
<dependencySets> |
|
33 |
<dependencySet> |
|
34 |
<outputDirectory>${extension.install.dir.name}/${library-dir} |
|
35 |
</outputDirectory> |
|
36 |
<includes> |
|
37 |
<include>org.gvsig:org.gvsig.rastertools</include> |
|
38 |
</includes> |
|
39 |
</dependencySet> |
|
40 |
|
|
41 |
<dependencySet> |
|
42 |
<useProjectAttachments>true</useProjectAttachments> |
|
43 |
<outputDirectory>${gvsig.extension.install.dir.name}/lib |
|
44 |
</outputDirectory> |
|
45 |
<includes> |
|
46 |
<include>org.gvsig:org.gvsig.rastertools:jar:gvsig</include> |
|
47 |
<include>org.gvsig:org.gvsig.rastertools:jar:fmap</include> |
|
48 |
<!--<include>org.gvsig:org.gvsig.raster.io</include> |
|
49 |
<include>org.gvsig:org.gvsig.raster</include> |
|
50 |
<include>org.gvsig:org.gvsig.fmap.dal.store.raster</include> |
|
51 |
<include>org.gvsig:org.gvsig.jgdal:jar</include> |
|
52 |
<include>org.gvsig:org.gvsig.jecw:jar</include> |
|
53 |
<include>org.gvsig:org.gvsig.jmrsid:jar</include> |
|
54 |
<include>org.gvsig:org.gvsig.jpotrace:jar</include>--> |
|
55 |
</includes> |
|
56 |
</dependencySet> |
|
57 |
|
|
58 |
</dependencySets> |
|
59 |
</assembly> |
tags/v2_0_0_Build_2023/extensions/extRasterTools-SE/src-test-ui/org/gvsig/raster/gui/wizards/projection/TestRasterReprojActionsPanel.java | ||
---|---|---|
1 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana |
|
2 |
* |
|
3 |
* Copyright (C) 2007 IVER T.I. and Generalitat Valenciana. |
|
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., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA. |
|
18 |
*/ |
|
19 |
package org.gvsig.raster.gui.wizards.projection; |
|
20 |
|
|
21 |
import javax.swing.JFrame; |
|
22 |
import javax.swing.UIManager; |
|
23 |
/** |
|
24 |
* Test para la visualizaci?n del dialogo de opciones sobre proyecci?n |
|
25 |
* |
|
26 |
* 07/04/2008 |
|
27 |
* @author Nacho Brodin nachobrodin@gmail.com |
|
28 |
*/ |
|
29 |
public class TestRasterReprojActionsPanel { |
|
30 |
private JFrame frame = new JFrame(); |
|
31 |
private RasterProjectionActionsDialog panel = null; |
|
32 |
|
|
33 |
public TestRasterReprojActionsPanel() { |
|
34 |
super(); |
|
35 |
initialize(); |
|
36 |
} |
|
37 |
|
|
38 |
public static void main(String[] args){ |
|
39 |
try { |
|
40 |
UIManager.setLookAndFeel("com.jgoodies.looks.plastic.PlasticXPLookAndFeel"); |
|
41 |
} catch( Exception e ) { |
|
42 |
System.err.println( "No se puede cambiar al LookAndFeel"); |
|
43 |
} |
|
44 |
new TestRasterReprojActionsPanel(); |
|
45 |
} |
|
46 |
|
|
47 |
private void initialize() { |
|
48 |
frame.setSize(new java.awt.Dimension(390, 230)); |
|
49 |
panel = new RasterProjectionActionsDialog(null); |
|
50 |
|
|
51 |
frame.setContentPane(panel); |
|
52 |
frame.setResizable(true); |
|
53 |
frame.setTitle("Opciones sobre proyecci?n"); |
|
54 |
frame.setVisible(true); |
|
55 |
frame.addWindowListener(new java.awt.event.WindowAdapter() { |
|
56 |
public void windowClosing(java.awt.event.WindowEvent e) { |
|
57 |
System.exit(0); |
|
58 |
} |
|
59 |
}); |
|
60 |
} |
|
61 |
} |
tags/v2_0_0_Build_2023/extensions/extRasterTools-SE/src-test-ui/org/gvsig/raster/beans/canvas/GCanvasTest.java | ||
---|---|---|
1 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana |
|
2 |
* |
|
3 |
* Copyright (C) 2005 IVER T.I. and Generalitat Valenciana. |
|
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., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA. |
|
18 |
*/ |
|
19 |
package org.gvsig.raster.beans.canvas; |
|
20 |
|
|
21 |
import java.awt.Color; |
|
22 |
import java.awt.Dimension; |
|
23 |
|
|
24 |
import org.gvsig.raster.beans.canvas.layers.Border; |
|
25 |
import org.gvsig.raster.beans.canvas.layers.GraphicHistogram; |
|
26 |
import org.gvsig.raster.beans.canvas.layers.InfoLayer; |
|
27 |
import org.gvsig.raster.beans.canvas.layers.MinMaxLines; |
|
28 |
import org.gvsig.raster.beans.canvas.layers.functions.SquareRootPowLine; |
|
29 |
import org.gvsig.rastertools.TestUI; |
|
30 |
/** |
|
31 |
* Test para comprobar el funcionamiento basico de un GCanvas |
|
32 |
* |
|
33 |
* 14-oct-2007 |
|
34 |
* @author Nacho Brodin (nachobrodin@gmail.com) |
|
35 |
*/ |
|
36 |
public class GCanvasTest implements IGCanvasListener { |
|
37 |
private TestUI jFrame = null; |
|
38 |
private GCanvas component = null; |
|
39 |
private SquareRootPowLine line = null; |
|
40 |
private MinMaxLines minMaxLines = null; |
|
41 |
private InfoLayer infoLayer = null; |
|
42 |
|
|
43 |
public GCanvasTest() { |
|
44 |
initialize(); |
|
45 |
} |
|
46 |
|
|
47 |
private void initialize() { |
|
48 |
jFrame = new TestUI("GCanvasTest"); |
|
49 |
double[] histR = new double[]{0, 0, 3, 4, 5, 8, 7, 18, 45, 36, 21, 36, 12, 23, 23, 40, 17, 10, 5, 1, 0, 0, 0}; |
|
50 |
GraphicHistogram gHistR = new GraphicHistogram(histR, Color.RED); |
|
51 |
gHistR.setType(GraphicHistogram.TYPE_FILL); |
|
52 |
|
|
53 |
line = new SquareRootPowLine(Color.YELLOW, 1.0); |
|
54 |
//line = new ExponentialLine(Color.YELLOW); |
|
55 |
//line = new LogaritmicLine(Color.YELLOW); |
|
56 |
DrawableElement border = new Border(Color.WHITE); |
|
57 |
minMaxLines = new MinMaxLines(Color.white); |
|
58 |
infoLayer = new InfoLayer(Color.white); |
|
59 |
|
|
60 |
component = new GCanvas(Color.BLACK); |
|
61 |
component.addDrawableElement(border); |
|
62 |
component.addDrawableElement(gHistR); |
|
63 |
component.addDrawableElement(minMaxLines); |
|
64 |
component.addDrawableElement(line); |
|
65 |
component.addDrawableElement(infoLayer); |
|
66 |
|
|
67 |
component.addValueChangedListener(this); |
|
68 |
|
|
69 |
jFrame.setSize(new Dimension(222, 248)); |
|
70 |
jFrame.setContentPane(component); |
|
71 |
|
|
72 |
jFrame.setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); |
|
73 |
jFrame.setVisible(true); |
|
74 |
} |
|
75 |
|
|
76 |
public static void main(String[] args) { |
|
77 |
new GCanvasTest(); |
|
78 |
} |
|
79 |
|
|
80 |
public void actionDataDragged(GCanvasEvent e) {} |
|
81 |
public void actionDataChanged(GCanvasEvent e) {} |
|
82 |
} |
tags/v2_0_0_Build_2023/extensions/extRasterTools-SE/src-test-ui/org/gvsig/raster/beans/previewbase/PreviewBaseDialogTest.java | ||
---|---|---|
1 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana |
|
2 |
* |
|
3 |
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana. |
|
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., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA. |
|
18 |
*/ |
|
19 |
package org.gvsig.raster.beans.previewbase; |
|
20 |
|
|
21 |
import java.awt.BorderLayout; |
|
22 |
import java.awt.Dimension; |
|
23 |
import java.util.ArrayList; |
|
24 |
|
|
25 |
import javax.swing.JFrame; |
|
26 |
import javax.swing.JLabel; |
|
27 |
import javax.swing.JPanel; |
|
28 |
import javax.swing.UIManager; |
|
29 |
|
|
30 |
import org.gvsig.fmap.mapcontext.exceptions.LoadLayerException; |
|
31 |
import org.gvsig.fmap.raster.layers.FLyrRasterSE; |
|
32 |
import org.gvsig.raster.grid.filter.FilterTypeException; |
|
33 |
import org.gvsig.raster.hierarchy.IRasterRendering; |
|
34 |
|
|
35 |
import com.iver.andami.PluginServices; |
|
36 |
import com.iver.andami.ui.mdiManager.IWindow; |
|
37 |
import com.iver.andami.ui.mdiManager.IWindowListener; |
|
38 |
import com.iver.andami.ui.mdiManager.WindowInfo; |
|
39 |
/** |
|
40 |
* Dialogo para el test del PreviewBasePanel |
|
41 |
* |
|
42 |
* 19/02/2008 |
|
43 |
* @author Nacho Brodin nachobrodin@gmail.com |
|
44 |
*/ |
|
45 |
public class PreviewBaseDialogTest extends JPanel implements IWindow, IWindowListener { |
|
46 |
private static final long serialVersionUID = -5374834293534046986L; |
|
47 |
private String baseDir = "./test-images/"; |
|
48 |
private String path = baseDir + "03AUG23153350-M2AS-000000122423_01_P001-BROWSE.jpg"; |
|
49 |
|
|
50 |
private PreviewBasePanel panel = null; |
|
51 |
|
|
52 |
public static void main(String[] args){ |
|
53 |
JFrame frame = new JFrame(); |
|
54 |
try { |
|
55 |
UIManager.setLookAndFeel("com.jgoodies.looks.plastic.PlasticXPLookAndFeel"); |
|
56 |
} catch( Exception e ) { |
|
57 |
System.err.println( "No se puede cambiar al LookAndFeel"); |
|
58 |
} |
|
59 |
PreviewBaseDialogTest preview = new PreviewBaseDialogTest(590, 410); |
|
60 |
frame.setSize(new java.awt.Dimension(590, 410)); |
|
61 |
frame.setContentPane(preview); |
|
62 |
frame.setResizable(true); |
|
63 |
frame.setTitle("Panel de recorte"); |
|
64 |
frame.setVisible(true); |
|
65 |
} |
|
66 |
|
|
67 |
class NoProcessClass implements IPreviewRenderProcess { |
|
68 |
public void process(IRasterRendering rendering) throws FilterTypeException { |
|
69 |
//No se procesa |
|
70 |
} |
|
71 |
|
|
72 |
public boolean isShowPreview() { |
|
73 |
return false; |
|
74 |
} |
|
75 |
|
|
76 |
public void setShowPreview(boolean showPreview) { |
|
77 |
} |
|
78 |
} |
|
79 |
|
|
80 |
class EmptyPanel extends JPanel implements IUserPanelInterface { |
|
81 |
private static final long serialVersionUID = 1L; |
|
82 |
private int i; |
|
83 |
public EmptyPanel(int i) { |
|
84 |
this.i = i; |
|
85 |
add(new JLabel("Texto")); |
|
86 |
} |
|
87 |
public JPanel getPanel() { |
|
88 |
return this; |
|
89 |
} |
|
90 |
public String getTitle() { |
|
91 |
return "Panel " + i; |
|
92 |
} |
|
93 |
} |
|
94 |
|
|
95 |
/** |
|
96 |
* Constructor |
|
97 |
* @param width Ancho |
|
98 |
* @param height Alto |
|
99 |
*/ |
|
100 |
public PreviewBaseDialogTest(int width, int height) { |
|
101 |
this.setPreferredSize(new Dimension(width, height)); |
|
102 |
this.setSize(width, height); |
|
103 |
this.setLayout(new BorderLayout(5, 5)); |
|
104 |
this.add(getPreviewPanel(), java.awt.BorderLayout.CENTER); |
|
105 |
} |
|
106 |
|
|
107 |
/** |
|
108 |
* Obtiene el panel con el histograma |
|
109 |
* @return HistogramPanel |
|
110 |
*/ |
|
111 |
public PreviewBasePanel getPreviewPanel() { |
|
112 |
if (panel == null) { |
|
113 |
ArrayList list = new ArrayList(); |
|
114 |
list.add(new EmptyPanel(0)); |
|
115 |
list.add(new EmptyPanel(1)); |
|
116 |
FLyrRasterSE lyr; |
|
117 |
try { |
|
118 |
lyr = FLyrRasterSE.createLayer("mylyr", path, null); |
|
119 |
panel = new PreviewBasePanel(list, new EmptyPanel(1), new EmptyPanel(1), new NoProcessClass(), lyr); |
|
120 |
} catch (LoadLayerException e) { |
|
121 |
e.printStackTrace(); |
|
122 |
} |
|
123 |
} |
|
124 |
return panel; |
|
125 |
} |
|
126 |
|
|
127 |
/* |
|
128 |
* (non-Javadoc) |
|
129 |
* @see com.iver.andami.ui.mdiManager.IWindow#getWindowInfo() |
|
130 |
*/ |
|
131 |
public WindowInfo getWindowInfo() { |
|
132 |
WindowInfo m_viewinfo = new WindowInfo(WindowInfo.MODELESSDIALOG | WindowInfo.RESIZABLE | WindowInfo.MAXIMIZABLE); |
|
133 |
if(getPreviewPanel().getLayer() != null) |
|
134 |
m_viewinfo.setAdditionalInfo(getPreviewPanel().getLayer().getName()); |
|
135 |
m_viewinfo.setTitle(PluginServices.getText(this, "tablas_color")); |
|
136 |
m_viewinfo.setHeight(this.getHeight()); |
|
137 |
m_viewinfo.setWidth(this.getWidth()); |
|
138 |
return m_viewinfo; |
|
139 |
} |
|
140 |
|
|
141 |
/* |
|
142 |
* (non-Javadoc) |
|
143 |
* @see com.iver.andami.ui.mdiManager.IWindowListener#windowClosed() |
|
144 |
*/ |
|
145 |
public void windowClosed() { |
|
146 |
|
|
147 |
} |
|
148 |
|
|
149 |
public void windowActivated() {} |
|
150 |
|
|
151 |
public Object getWindowProfile() { |
|
152 |
return null; |
|
153 |
} |
|
154 |
} |
tags/v2_0_0_Build_2023/extensions/extRasterTools-SE/src-test-ui/org/gvsig/raster/beans/previewbase/DemoVectorial.java | ||
---|---|---|
1 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana |
|
2 |
* |
|
3 |
* Copyright (C) 2005 IVER T.I. and Generalitat Valenciana. |
|
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., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA. |
|
18 |
*/ |
|
19 |
package org.gvsig.raster.beans.previewbase; |
|
20 |
|
|
21 |
import java.awt.Dimension; |
|
22 |
import java.awt.Graphics2D; |
|
23 |
import java.awt.image.BufferedImage; |
|
24 |
import java.io.File; |
|
25 |
|
|
26 |
import org.cresques.cts.IProjection; |
|
27 |
import org.gvsig.fmap.crs.CRSFactory; |
|
28 |
import org.gvsig.fmap.dal.DALLocator; |
|
29 |
import org.gvsig.fmap.dal.DataManager; |
|
30 |
import org.gvsig.fmap.dal.exception.InitializeException; |
|
31 |
import org.gvsig.fmap.dal.exception.ProviderNotRegisteredException; |
|
32 |
import org.gvsig.fmap.dal.exception.ReadException; |
|
33 |
import org.gvsig.fmap.dal.store.shp.SHPStoreParameters; |
|
34 |
import org.gvsig.fmap.geom.GeometryLocator; |
|
35 |
import org.gvsig.fmap.geom.GeometryManager; |
|
36 |
import org.gvsig.fmap.geom.Geometry.SUBTYPES; |
|
37 |
import org.gvsig.fmap.geom.exception.CreateEnvelopeException; |
|
38 |
import org.gvsig.fmap.geom.primitive.Envelope; |
|
39 |
import org.gvsig.fmap.geom.util.UtilFunctions; |
|
40 |
import org.gvsig.fmap.mapcontext.ViewPort; |
|
41 |
import org.gvsig.fmap.mapcontext.exceptions.LoadLayerException; |
|
42 |
import org.gvsig.fmap.mapcontext.layers.FLayer; |
|
43 |
import org.gvsig.fmap.mapcontext.layers.LayerFactory; |
|
44 |
import org.gvsig.gui.beans.imagenavigator.IClientImageNavigator; |
|
45 |
import org.gvsig.gui.beans.imagenavigator.ImageNavigator; |
|
46 |
import org.gvsig.rastertools.TestUI; |
|
47 |
import org.gvsig.rastertools.rasterresolution.ZoomPixelCursorListener; |
|
48 |
import org.gvsig.tools.task.Cancellable; |
|
49 |
import org.slf4j.Logger; |
|
50 |
import org.slf4j.LoggerFactory; |
|
51 |
|
|
52 |
public class DemoVectorial implements IClientImageNavigator { |
|
53 |
private static final GeometryManager geomManager = GeometryLocator.getGeometryManager(); |
|
54 |
private static final Logger logger = LoggerFactory.getLogger(DemoVectorial.class); |
|
55 |
private FLayer layer = null; |
|
56 |
static final String fwAndamiDriverPath = "../_fwAndami/gvSIG/extensiones/com.iver.cit.gvsig/drivers"; |
|
57 |
|
|
58 |
public DemoVectorial() { |
|
59 |
try { |
|
60 |
IProjection PROJ = CRSFactory.getCRS("EPSG:23030"); |
|
61 |
|
|
62 |
File file=new File("C:\\Documents and Settings\\borja\\Escritorio\\images_gvsig\\vectorial\\t_areas.shp"); |
|
63 |
DataManager datamanager=DALLocator.getDataManager(); |
|
64 |
SHPStoreParameters params=null; |
|
65 |
try { |
|
66 |
params = (SHPStoreParameters)datamanager.createStoreParameters(SHPStoreParameters.DYNCLASS_NAME); |
|
67 |
params.setSRS(PROJ); |
|
68 |
} catch (InitializeException e) { |
|
69 |
throw new LoadLayerException(file.getName(),e); |
|
70 |
} catch (ProviderNotRegisteredException e) { |
|
71 |
throw new LoadLayerException(file.getName(),e); |
|
72 |
} |
|
73 |
params.setFile(file); |
|
74 |
layer = LayerFactory.getInstance().createLayer("line", params); |
|
75 |
TestUI jFrame = new TestUI("DemoVectorial"); |
|
76 |
jFrame.setSize(new Dimension(598, 167)); |
|
77 |
ImageNavigator imNav = new ImageNavigator(this); |
|
78 |
jFrame.setContentPane(imNav); |
|
79 |
Envelope b = layer.getFullEnvelope(); |
|
80 |
imNav.setViewDimensions(b.getMinimum(0), b.getMaximum(1), b.getMaximum(0), b.getMinimum(1)); |
|
81 |
imNav.updateBuffer(); |
|
82 |
imNav.setEnabled(true); |
|
83 |
jFrame.setVisible(true); |
|
84 |
} catch (Exception e) { |
|
85 |
} |
|
86 |
} |
|
87 |
|
|
88 |
public static void main(String[] args) { |
|
89 |
new DemoVectorial(); |
|
90 |
} |
|
91 |
|
|
92 |
public void drawImage(Graphics2D g, double x1, double y1, double x2, double y2, double zoom, int width, int height) { |
|
93 |
ViewPort vp = new ViewPort(null); |
|
94 |
try { |
|
95 |
vp.setEnvelope(geomManager.createEnvelope(x1, y2, x2, y1, SUBTYPES.GEOM2D)); |
|
96 |
} catch (CreateEnvelopeException e1) { |
|
97 |
logger.error("Error creating the envelope", e1); |
|
98 |
} |
|
99 |
vp.setImageSize(new Dimension(width, height)); |
|
100 |
BufferedImage bi = new BufferedImage(width, height, BufferedImage.TYPE_4BYTE_ABGR); |
|
101 |
try { |
|
102 |
layer.draw(bi, g, vp, new Cancellable(){ |
|
103 |
|
|
104 |
public boolean isCanceled() { |
|
105 |
// TODO Auto-generated method stub |
|
106 |
return false; |
|
107 |
} |
|
108 |
|
|
109 |
public void setCanceled(boolean canceled) { |
|
110 |
// TODO Auto-generated method stub |
|
111 |
|
|
112 |
} |
|
113 |
|
|
114 |
}, 0); |
|
115 |
} catch (ReadException e) { |
|
116 |
} |
|
117 |
} |
|
118 |
} |
tags/v2_0_0_Build_2023/extensions/extRasterTools-SE/src-test-ui/org/gvsig/rastertools/generictoolbar/TestGenericToolBarPanel.java | ||
---|---|---|
1 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana |
|
2 |
* |
|
3 |
* Copyright (C) 2007 IVER T.I. and Generalitat Valenciana. |
|
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., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA. |
|
18 |
*/ |
|
19 |
package org.gvsig.rastertools.generictoolbar; |
|
20 |
|
|
21 |
import org.gvsig.rastertools.GenericToolBarModule; |
|
22 |
import org.gvsig.rastertools.RasterModule; |
|
23 |
import org.gvsig.rastertools.TestUI; |
|
24 |
/** |
|
25 |
* Clase para poder ver la ventana de Filtros |
|
26 |
* |
|
27 |
* @version 17/04/2007 |
|
28 |
* @author BorSanZa - Borja S?nchez Zamorano (borja.sanchez@iver.es) |
|
29 |
*/ |
|
30 |
public class TestGenericToolBarPanel { |
|
31 |
private TestUI jFrame = new TestUI("TestRasterFilterPanel"); |
|
32 |
private GenericToolBarPanel genericToolBarPanel = null; |
|
33 |
|
|
34 |
public TestGenericToolBarPanel() { |
|
35 |
super(); |
|
36 |
RasterModule rasterModule = new RasterModule(); |
|
37 |
rasterModule.initialize(); |
|
38 |
GenericToolBarModule toolBarModule = new GenericToolBarModule(); |
|
39 |
toolBarModule.initialize(); |
|
40 |
initialize(); |
|
41 |
} |
|
42 |
|
|
43 |
public static void main(String[] args){ |
|
44 |
new TestGenericToolBarPanel(); |
|
45 |
} |
|
46 |
|
|
47 |
private void initialize() { |
|
48 |
jFrame.setSize(new java.awt.Dimension(645, 480)); |
|
49 |
genericToolBarPanel = new GenericToolBarPanel(); |
|
50 |
jFrame.setContentPane(genericToolBarPanel); |
|
51 |
jFrame.setResizable(true); |
|
52 |
jFrame.setTitle("TestRasterFilterPanel"); |
|
53 |
jFrame.setVisible(true); |
|
54 |
} |
|
55 |
} |
tags/v2_0_0_Build_2023/extensions/extRasterTools-SE/src-test-ui/org/gvsig/rastertools/saveraster/SaveRasterFrameTest.java | ||
---|---|---|
1 |
package org.gvsig.rastertools.saveraster; |
|
2 |
|
|
3 |
import javax.swing.JFrame; |
|
4 |
|
|
5 |
import org.gvsig.rastertools.saveraster.ui.SaveRasterPanel; |
|
6 |
|
|
7 |
/** |
|
8 |
* Test para el panel de salvar a raster. |
|
9 |
* @version 09/05/2007 |
|
10 |
* @author Nacho Brodin (nachobrodin@gmail.com) |
|
11 |
* |
|
12 |
*/ |
|
13 |
public class SaveRasterFrameTest extends JFrame { |
|
14 |
private static final long serialVersionUID = -6500043998556521467L; |
|
15 |
public SaveRasterFrameTest(){ |
|
16 |
this.setSize(380, 320); |
|
17 |
SaveRasterPanel panel = new SaveRasterPanel(); |
|
18 |
|
|
19 |
this.getContentPane().add(panel); |
|
20 |
this.setVisible(true); |
|
21 |
} |
|
22 |
/** |
|
23 |
* @param args |
|
24 |
*/ |
|
25 |
public static void main(String[] args) { |
|
26 |
new SaveRasterFrameTest(); |
|
27 |
} |
|
28 |
|
|
29 |
} |
|
0 | 30 |
tags/v2_0_0_Build_2023/extensions/extRasterTools-SE/src-test-ui/org/gvsig/rastertools/saveraster/SelectFileFrameTest.java | ||
---|---|---|
1 |
package org.gvsig.rastertools.saveraster; |
|
2 |
|
|
3 |
import javax.swing.JFrame; |
|
4 |
|
|
5 |
import org.gvsig.rastertools.saveraster.ui.panels.SelectFilePanel; |
|
6 |
|
|
7 |
/** |
|
8 |
* Test para el panel de selecci?n de fichero de salvar a raster. |
|
9 |
* @version 09/05/2007 |
|
10 |
* @author Nacho Brodin (nachobrodin@gmail.com) |
|
11 |
* |
|
12 |
*/ |
|
13 |
public class SelectFileFrameTest extends JFrame { |
|
14 |
private static final long serialVersionUID = -6500043998556521467L; |
|
15 |
public SelectFileFrameTest(){ |
|
16 |
this.setSize(300, 120); |
|
17 |
SelectFilePanel panel = new SelectFilePanel(); |
|
18 |
|
|
19 |
this.getContentPane().add(panel); |
|
20 |
this.setVisible(true); |
|
21 |
} |
|
22 |
/** |
|
23 |
* @param args |
|
24 |
*/ |
|
25 |
public static void main(String[] args) { |
|
26 |
new SelectFileFrameTest(); |
|
27 |
} |
|
28 |
|
|
29 |
} |
tags/v2_0_0_Build_2023/extensions/extRasterTools-SE/src-test-ui/org/gvsig/rastertools/saveraster/WCCoordInputFrameTest.java | ||
---|---|---|
1 |
package org.gvsig.rastertools.saveraster; |
|
2 |
|
|
3 |
import javax.swing.JFrame; |
|
4 |
|
|
5 |
import org.gvsig.rastertools.saveraster.ui.panels.WCCoordsInputPanel; |
|
6 |
|
|
7 |
/** |
|
8 |
* Test para el panel de salvar a raster. |
|
9 |
* @version 09/05/2007 |
|
10 |
* @author Nacho Brodin (nachobrodin@gmail.com) |
|
11 |
* |
|
12 |
*/ |
|
13 |
public class WCCoordInputFrameTest extends JFrame { |
|
14 |
private static final long serialVersionUID = -6500043998556521467L; |
|
15 |
public WCCoordInputFrameTest(){ |
|
16 |
this.setSize(300,100); |
|
17 |
WCCoordsInputPanel panel = new WCCoordsInputPanel(); |
|
18 |
|
|
19 |
this.getContentPane().add(panel); |
|
20 |
this.setVisible(true); |
|
21 |
} |
|
22 |
/** |
|
23 |
* @param args |
|
24 |
*/ |
|
25 |
public static void main(String[] args) { |
|
26 |
new WCCoordInputFrameTest(); |
|
27 |
} |
|
28 |
|
|
29 |
} |
tags/v2_0_0_Build_2023/extensions/extRasterTools-SE/src-test-ui/org/gvsig/rastertools/saveraster/InputScaleDataFrameTest.java | ||
---|---|---|
1 |
package org.gvsig.rastertools.saveraster; |
|
2 |
|
|
3 |
import javax.swing.JFrame; |
|
4 |
|
|
5 |
import org.gvsig.rastertools.saveraster.ui.panels.InputScaleDataPanel; |
|
6 |
|
|
7 |
/** |
|
8 |
* Test para el panel de salvar a raster. |
|
9 |
* @version 09/05/2007 |
|
10 |
* @author Nacho Brodin (nachobrodin@gmail.com) |
|
11 |
* |
|
12 |
*/ |
|
13 |
public class InputScaleDataFrameTest extends JFrame { |
|
14 |
private static final long serialVersionUID = -6500043998556521467L; |
|
15 |
public InputScaleDataFrameTest(){ |
|
16 |
this.setSize(190,130); |
|
17 |
InputScaleDataPanel panel = new InputScaleDataPanel(); |
|
18 |
|
|
19 |
this.getContentPane().add(panel); |
|
20 |
this.setVisible(true); |
|
21 |
} |
|
22 |
/** |
|
23 |
* @param args |
|
24 |
*/ |
|
25 |
public static void main(String[] args) { |
|
26 |
new InputScaleDataFrameTest(); |
|
27 |
} |
|
28 |
|
|
29 |
} |
tags/v2_0_0_Build_2023/extensions/extRasterTools-SE/src-test-ui/org/gvsig/rastertools/saveraster/MethodSelectorFrameTest.java | ||
---|---|---|
1 |
package org.gvsig.rastertools.saveraster; |
|
2 |
|
|
3 |
import javax.swing.JFrame; |
|
4 |
|
|
5 |
import org.gvsig.rastertools.saveraster.ui.panels.MethodSelectorPanel; |
|
6 |
|
|
7 |
/** |
|
8 |
* Test para el panel de salvar a raster. |
|
9 |
* @version 09/05/2007 |
|
10 |
* @author Nacho Brodin (nachobrodin@gmail.com) |
|
11 |
* |
|
12 |
*/ |
|
13 |
public class MethodSelectorFrameTest extends JFrame { |
|
14 |
private static final long serialVersionUID = -6500043998556521467L; |
|
15 |
public MethodSelectorFrameTest(){ |
|
16 |
this.setSize(100,100); |
|
17 |
MethodSelectorPanel panel = new MethodSelectorPanel(); |
|
18 |
|
|
19 |
this.getContentPane().add(panel); |
|
20 |
this.setVisible(true); |
|
21 |
} |
|
22 |
/** |
|
23 |
* @param args |
|
24 |
*/ |
|
25 |
public static void main(String[] args) { |
|
26 |
new MethodSelectorFrameTest(); |
|
27 |
} |
|
28 |
|
|
29 |
} |
tags/v2_0_0_Build_2023/extensions/extRasterTools-SE/src-test-ui/org/gvsig/rastertools/saveraster/EndInfoDialogTest.java | ||
---|---|---|
1 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana |
|
2 |
* |
|
3 |
* Copyright (C) 2005 IVER T.I. and Generalitat Valenciana. |
|
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., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA. |
|
18 |
*/ |
|
19 |
package org.gvsig.rastertools.saveraster; |
|
20 |
|
|
21 |
import org.gvsig.rastertools.TestUI; |
|
22 |
import org.gvsig.rastertools.saveraster.ui.info.EndInfoDialog; |
|
23 |
/** |
|
24 |
* @version 05/11/2007 |
|
25 |
* @author BorSanZa - Borja S?nchez Zamorano (borja.sanchez@iver.es) |
|
26 |
*/ |
|
27 |
public class EndInfoDialogTest { |
|
28 |
public EndInfoDialogTest(){ |
|
29 |
TestUI.defaultInit(); |
|
30 |
for (int i = 0; i <= 24; i++) { |
|
31 |
EndInfoDialog.show("C:\\Documents and Settings\\borja\\Escritorio\\a\\sagsadfhsdghssagsadfhsdghssagsadfhsdghssagsadfhsdghssagsadfhsdghssagsadfhsdghssagsadfhsdghssagsadfhsdghs\\" + i + ".png", 500); |
|
32 |
try { |
|
33 |
Thread.sleep(1000); |
|
34 |
} catch (InterruptedException e) { |
|
35 |
e.printStackTrace(); |
|
36 |
} |
|
37 |
} |
|
38 |
} |
|
39 |
|
|
40 |
/** |
|
41 |
* @param args |
|
42 |
*/ |
|
43 |
public static void main(String[] args) { |
|
44 |
new EndInfoDialogTest(); |
|
45 |
} |
|
46 |
} |
tags/v2_0_0_Build_2023/extensions/extRasterTools-SE/src-test-ui/org/gvsig/rastertools/saveraster/SelectionParamsFrameTest.java | ||
---|---|---|
1 |
package org.gvsig.rastertools.saveraster; |
|
2 |
|
|
3 |
import javax.swing.JFrame; |
|
4 |
|
|
5 |
import org.gvsig.rastertools.saveraster.ui.panels.SelectionParamsPanel; |
|
6 |
|
|
7 |
/** |
|
8 |
* Test para el panel de salvar a raster. |
|
9 |
* @version 09/05/2007 |
|
10 |
* @author Nacho Brodin (nachobrodin@gmail.com) |
|
11 |
* |
|
12 |
*/ |
|
13 |
public class SelectionParamsFrameTest extends JFrame { |
|
14 |
private static final long serialVersionUID = -6500043998556521467L; |
|
15 |
public SelectionParamsFrameTest(){ |
|
16 |
this.setSize(400,150); |
|
17 |
SelectionParamsPanel panel = new SelectionParamsPanel(); |
|
18 |
|
|
19 |
this.getContentPane().add(panel); |
|
20 |
this.setVisible(true); |
|
21 |
} |
|
22 |
/** |
|
23 |
* @param args |
|
24 |
*/ |
|
25 |
public static void main(String[] args) { |
|
26 |
new SelectionParamsFrameTest(); |
|
27 |
} |
|
28 |
|
|
29 |
} |
tags/v2_0_0_Build_2023/extensions/extRasterTools-SE/src-test-ui/org/gvsig/rastertools/saveraster/InputSizeFrameTest.java | ||
---|---|---|
1 |
package org.gvsig.rastertools.saveraster; |
|
2 |
|
|
3 |
import javax.swing.JFrame; |
|
4 |
|
|
5 |
import org.gvsig.rastertools.saveraster.ui.panels.InputSizePanel; |
|
6 |
|
|
7 |
/** |
|
8 |
* Test para el panel de salvar a raster. |
|
9 |
* @version 09/05/2007 |
|
10 |
* @author Nacho Brodin (nachobrodin@gmail.com) |
|
11 |
* |
|
12 |
*/ |
|
13 |
public class InputSizeFrameTest extends JFrame { |
|
14 |
private static final long serialVersionUID = -6500043998556521467L; |
|
15 |
public InputSizeFrameTest(){ |
|
16 |
this.setSize(300,120); |
|
17 |
InputSizePanel panel = new InputSizePanel(); |
|
18 |
|
|
19 |
this.getContentPane().add(panel); |
|
20 |
this.setVisible(true); |
|
21 |
} |
|
22 |
/** |
|
23 |
* @param args |
|
24 |
*/ |
|
25 |
public static void main(String[] args) { |
|
26 |
new InputSizeFrameTest(); |
|
27 |
} |
|
28 |
|
|
29 |
} |
tags/v2_0_0_Build_2023/extensions/extRasterTools-SE/src-test-ui/org/gvsig/rastertools/utils/TestRasterToolsUtil.java | ||
---|---|---|
1 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana |
|
2 |
* |
|
3 |
* Copyright (C) 2005 IVER T.I. and Generalitat Valenciana. |
|
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., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA. |
|
18 |
*/ |
|
19 |
package org.gvsig.rastertools.utils; |
|
20 |
|
|
21 |
import java.awt.Toolkit; |
|
22 |
|
|
23 |
import javax.swing.UIManager; |
|
24 |
|
|
25 |
import org.gvsig.raster.util.RasterToolsUtil; |
|
26 |
|
|
27 |
public class TestRasterToolsUtil { |
|
28 |
|
|
29 |
public static void main(String[] args) { |
|
30 |
Toolkit.getDefaultToolkit().setDynamicLayout(true); |
|
31 |
try { |
|
32 |
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); |
|
33 |
} catch (Exception e) { |
|
34 |
} |
|
35 |
boolean result = RasterToolsUtil.messageBoxYesOrNot("?Eres la Persona mas negativa del mundo?\n\nPulsa en algun boton de estos.", null); |
|
36 |
RasterToolsUtil.messageBoxError("Has pulsado un valor: \n\n " + result, null); |
|
37 |
RasterToolsUtil.messageBoxInfo("Has pulsado un valor: \n\n " + result, null); |
|
38 |
} |
|
39 |
} |
tags/v2_0_0_Build_2023/extensions/extRasterTools-SE/src-test-ui/org/gvsig/rastertools/vectorization/TestStretchPanel.java | ||
---|---|---|
1 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana |
|
2 |
* |
|
3 |
* Copyright (C) 2005 IVER T.I. and Generalitat Valenciana. |
|
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., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA. |
|
18 |
*/ |
|
19 |
package org.gvsig.rastertools.vectorization; |
|
20 |
|
|
21 |
import java.awt.Toolkit; |
|
22 |
|
|
23 |
import javax.swing.JFrame; |
|
24 |
import javax.swing.UIManager; |
|
25 |
|
|
26 |
import org.gvsig.fmap.raster.layers.FLyrRasterSE; |
|
27 |
import org.gvsig.rastertools.vectorizacion.stretch.StretchData; |
|
28 |
import org.gvsig.rastertools.vectorizacion.stretch.StretchListener; |
|
29 |
import org.gvsig.rastertools.vectorizacion.stretch.ui.StretchPanel; |
|
30 |
|
|
31 |
/** |
|
32 |
* Test para el panel de selecci?n de tramos en la vectorizaci?n |
|
33 |
* 08/08/2008 |
|
34 |
* @author Nacho Brodin nachobrodin@gmail.com |
|
35 |
*/ |
|
36 |
public class TestStretchPanel { |
|
37 |
private int w = 550, h = 500; |
|
38 |
private JFrame frame = new JFrame(); |
|
39 |
private FLyrRasterSE lyr = null; |
|
40 |
|
|
41 |
public TestStretchPanel() { |
|
42 |
StretchData data = new StretchData(); |
|
43 |
StretchPanel panel = new StretchPanel(); |
|
44 |
new StretchListener(lyr, panel, data); |
|
45 |
|
|
46 |
frame.getContentPane().add(panel); |
|
47 |
frame.setSize(w, h); |
|
48 |
frame.setVisible(true); |
|
49 |
} |
|
50 |
|
|
51 |
public static void main(String[] args) { |
|
52 |
Toolkit.getDefaultToolkit().setDynamicLayout(true); |
|
53 |
try { |
|
54 |
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); |
|
55 |
} catch (Exception e) { |
|
56 |
} |
|
57 |
new TestStretchPanel(); |
|
58 |
} |
|
59 |
} |
tags/v2_0_0_Build_2023/extensions/extRasterTools-SE/src-test-ui/org/gvsig/rastertools/geolocation/TestGeoLocationDialog.java | ||
---|---|---|
1 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana |
|
2 |
* |
|
3 |
* Copyright (C) 2007 IVER T.I. and Generalitat Valenciana. |
|
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., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA. |
|
18 |
*/ |
|
19 |
package org.gvsig.rastertools.geolocation; |
|
20 |
|
|
21 |
import javax.swing.JFrame; |
|
22 |
import javax.swing.UIManager; |
|
23 |
|
|
24 |
import org.gvsig.rastertools.geolocation.ui.GeoLocationPanel; |
|
25 |
/** |
|
26 |
* Test para el panel de geolocalizaci?n |
|
27 |
* |
|
28 |
* @version 30/07/2007 |
|
29 |
* @author Nacho Brodin (nachobrodin@gmail.com) |
|
30 |
*/ |
|
31 |
public class TestGeoLocationDialog { |
|
32 |
private JFrame frame = new JFrame(); |
|
33 |
|
|
34 |
public TestGeoLocationDialog() { |
|
35 |
super(); |
|
36 |
initialize(); |
|
37 |
} |
|
38 |
|
|
39 |
public static void main(String[] args) { |
|
40 |
try { |
|
41 |
UIManager.setLookAndFeel("com.jgoodies.looks.plastic.PlasticXPLookAndFeel"); |
|
42 |
} catch( Exception e ) { |
|
43 |
System.err.println( "No se puede cambiar al LookAndFeel"); |
|
44 |
} |
|
45 |
new TestGeoLocationDialog(); |
|
46 |
} |
|
47 |
|
|
48 |
private void initialize() { |
|
49 |
GeoLocationPanel glp = new GeoLocationPanel(null); |
|
50 |
frame.setContentPane(glp); |
|
51 |
|
|
52 |
frame.setSize(new java.awt.Dimension(220, 230)); |
|
53 |
frame.setResizable(true); |
|
54 |
frame.setTitle("Geolocalizaci?n"); |
|
55 |
frame.setVisible(true); |
|
56 |
frame.setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); |
|
57 |
} |
|
58 |
} |
|
0 | 59 |
tags/v2_0_0_Build_2023/extensions/extRasterTools-SE/src-test-ui/org/gvsig/rastertools/geolocation/TestGeoLocationOpenRasterDialog.java | ||
---|---|---|
1 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana |
|
2 |
* |
|
3 |
* Copyright (C) 2007 IVER T.I. and Generalitat Valenciana. |
|
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., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA. |
|
18 |
*/ |
|
19 |
package org.gvsig.rastertools.geolocation; |
|
20 |
|
|
21 |
import javax.swing.JFrame; |
|
22 |
import javax.swing.UIManager; |
|
23 |
|
|
24 |
import org.gvsig.rastertools.geolocation.ui.GeoLocationOpeningRasterPanel; |
|
25 |
/** |
|
26 |
* Test para el panel de geolocalizaci?n |
|
27 |
* |
|
28 |
* @version 30/07/2007 |
|
29 |
* @author Nacho Brodin (nachobrodin@gmail.com) |
|
30 |
*/ |
|
31 |
public class TestGeoLocationOpenRasterDialog { |
|
32 |
private JFrame frame = new JFrame(); |
|
33 |
|
|
34 |
public TestGeoLocationOpenRasterDialog() { |
|
35 |
super(); |
|
36 |
initialize(); |
|
37 |
} |
|
38 |
|
|
39 |
public static void main(String[] args) { |
|
40 |
try { |
|
41 |
UIManager.setLookAndFeel("com.jgoodies.looks.plastic.PlasticXPLookAndFeel"); |
|
42 |
} catch( Exception e ) { |
|
43 |
System.err.println( "No se puede cambiar al LookAndFeel"); |
|
44 |
} |
|
45 |
new TestGeoLocationOpenRasterDialog(); |
|
46 |
} |
|
47 |
|
|
48 |
private void initialize() { |
|
49 |
GeoLocationOpeningRasterPanel glp = new GeoLocationOpeningRasterPanel(null); |
|
50 |
frame.setContentPane(glp); |
|
51 |
|
|
52 |
frame.setSize(new java.awt.Dimension(220, 230)); |
|
53 |
frame.setResizable(true); |
|
54 |
frame.setTitle("Geolocalizaci?n"); |
|
55 |
frame.setVisible(true); |
|
56 |
frame.setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); |
|
57 |
} |
|
58 |
} |
tags/v2_0_0_Build_2023/extensions/extRasterTools-SE/src-test-ui/org/gvsig/rastertools/clipping/TestClippingPanel.java | ||
---|---|---|
1 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana |
|
2 |
* |
|
3 |
* Copyright (C) 2007 IVER T.I. and Generalitat Valenciana. |
|
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., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA. |
|
18 |
*/ |
|
19 |
package org.gvsig.rastertools.clipping; |
|
20 |
|
|
21 |
import javax.swing.JFrame; |
|
22 |
import javax.swing.UIManager; |
|
23 |
|
|
24 |
import org.gvsig.rastertools.clipping.ui.ClippingPanel; |
|
25 |
/** |
|
26 |
* Clase para poder ver la ventana de HistrogramPanel |
|
27 |
* |
|
28 |
* @version 17/04/2007 |
|
29 |
* @author BorSanZa - Borja S?nchez Zamorano (borja.sanchez@iver.es) |
|
30 |
*/ |
|
31 |
public class TestClippingPanel { |
|
32 |
private JFrame frame = new JFrame(); |
|
33 |
private ClippingPanel hp = null; |
|
34 |
|
|
35 |
public TestClippingPanel() { |
|
36 |
super(); |
|
37 |
initialize(); |
|
38 |
} |
|
39 |
|
|
40 |
public static void main(String[] args){ |
|
41 |
try { |
|
42 |
UIManager.setLookAndFeel("com.jgoodies.looks.plastic.PlasticXPLookAndFeel"); |
|
43 |
} catch( Exception e ) { |
|
44 |
System.err.println( "No se puede cambiar al LookAndFeel"); |
|
45 |
} |
|
46 |
new TestClippingPanel(); |
|
47 |
} |
|
48 |
|
|
49 |
private void initialize() { |
|
50 |
frame.setSize(new java.awt.Dimension(370, 310)); |
|
51 |
hp = new ClippingPanel(null); |
|
52 |
|
|
53 |
//Par?metros de inicializaci?n del histograma |
|
54 |
frame.setContentPane(hp); |
|
55 |
frame.setResizable(true); |
|
56 |
frame.setTitle("Panel de recorte"); |
|
57 |
frame.setVisible(true); |
|
58 |
frame.addWindowListener(new java.awt.event.WindowAdapter() { |
|
59 |
public void windowClosing(java.awt.event.WindowEvent e) { |
|
60 |
System.exit(0); |
|
61 |
} |
|
62 |
}); |
|
63 |
} |
|
64 |
} |
|
0 | 65 |
tags/v2_0_0_Build_2023/extensions/extRasterTools-SE/src-test-ui/org/gvsig/rastertools/enhanced/graphics/panels/EnhancedGraphic.java | ||
---|---|---|
1 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana |
|
2 |
* |
|
3 |
* Copyright (C) 2007 IVER T.I. and Generalitat Valenciana. |
|
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., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA. |
|
18 |
*/ |
|
19 |
package org.gvsig.rastertools.enhanced.graphics.panels; |
|
20 |
|
|
21 |
import java.awt.BorderLayout; |
|
22 |
import java.awt.Color; |
|
23 |
import java.awt.Dimension; |
|
24 |
import java.awt.GridBagConstraints; |
|
25 |
import java.awt.GridBagLayout; |
|
26 |
|
|
27 |
import javax.swing.JComboBox; |
|
28 |
import javax.swing.JPanel; |
|
29 |
import javax.swing.JSlider; |
|
30 |
import javax.swing.JTextField; |
|
31 |
|
|
32 |
import org.gvsig.raster.beans.canvas.DrawableElement; |
|
33 |
import org.gvsig.raster.beans.canvas.GCanvas; |
|
34 |
import org.gvsig.raster.beans.canvas.layers.Border; |
|
35 |
import org.gvsig.raster.beans.canvas.layers.GraphicHistogram; |
|
36 |
import org.gvsig.raster.beans.canvas.layers.functions.BaseFunction; |
|
37 |
import org.gvsig.raster.beans.canvas.layers.functions.StraightLine; |
|
38 |
|
|
39 |
/** |
|
40 |
* Gr?fico con los elementos para la modificaci?n de un histograma. |
|
41 |
* |
|
42 |
* 14-oct-2007 |
|
43 |
* @author Nacho Brodin (nachobrodin@gmail.com) |
|
44 |
*/ |
|
45 |
public class EnhancedGraphic extends JPanel { |
|
46 |
private static final long serialVersionUID = 5431466034535083594L; |
|
47 |
private JComboBox lineType = null; |
|
48 |
private JComboBox graphicType = null; |
|
49 |
private JComboBox histogramBand = null; |
|
50 |
private JSlider slider = null; |
|
51 |
private JTextField minValue = null; |
|
52 |
private JTextField maxValue = null; |
|
53 |
private GCanvas canvas = null; |
|
54 |
private JPanel north = null; |
Also available in: Unified diff