Revision 1944

View differences:

org.gvsig.raster.wmts/trunk/org.gvsig.raster.wmts/pom.xml
3 3
	<modelVersion>4.0.0</modelVersion>
4 4
	<artifactId>org.gvsig.raster.wmts</artifactId>
5 5
	<packaging>pom</packaging>
6
	<version>2.0.1-SNAPSHOT</version>
6
	<version>2.1.0-SNAPSHOT</version>
7 7
	<name>org.gvsig.raster.wmts</name>
8 8
	<description>WMTS client</description>
9 9
	<inceptionYear>2011</inceptionYear>
10
	
10 11
	<parent>
11 12
        <groupId>org.gvsig</groupId>
12
        <artifactId>org.gvsig.maven.base.pom</artifactId>
13
        <version>1.0.9</version>
13
        <artifactId>org.gvsig.desktop</artifactId>
14
        <version>2.0.12-SNAPSHOT</version>
14 15
    </parent>
16
    
15 17
     <scm>
16 18
        <connection>scm:svn:https://devel.gvsig.org/svn/gvsig-raster/org.gvsig.raster.wmts/trunk/org.gvsig.raster.wmts</connection>
17 19
        <developerConnection>scm:svn:https://devel.gvsig.org/svn/gvsig-raster/org.gvsig.raster.wmts/trunk/org.gvsig.raster.wmts</developerConnection>
18 20
        <url>https://devel.gvsig.org/redmine/projects/gvsig-raster/repository/show/org.gvsig.raster.wmts/trunk/org.gvsig.raster.wmts</url>
19 21
    </scm>
22
    
20 23
     <dependencyManagement>
21 24
		<dependencies>
22 25
			<dependency>
23 26
				<groupId>org.gvsig</groupId>
24 27
				<artifactId>org.gvsig.raster.wmts.swing.api</artifactId>
25
				<version>2.0.0-SNAPSHOT</version>
28
				<version>2.1.0-SNAPSHOT</version>
26 29
			</dependency>
27 30
			<dependency>
28 31
				<groupId>org.gvsig</groupId>
29 32
				<artifactId>org.gvsig.raster.wmts.ogc.api</artifactId>
30
				<version>2.0.0-SNAPSHOT</version>
33
				<version>2.1.0-SNAPSHOT</version>
31 34
			</dependency>
32 35
			<dependency>
33 36
				<groupId>org.gvsig</groupId>
34 37
				<artifactId>org.gvsig.raster.wmts.ogc.impl</artifactId>
35
				<version>2.0.0-SNAPSHOT</version>
38
				<version>2.1.0-SNAPSHOT</version>
36 39
			</dependency>
37 40
			<dependency>
38 41
				<groupId>org.gvsig</groupId>
39 42
				<artifactId>org.gvsig.raster.cache.lib.api</artifactId>
40
				<version>2.0.1-SNAPSHOT</version>
43
				<version>2.1.0-SNAPSHOT</version>
41 44
			</dependency>
42 45
			<dependency>
43 46
				<groupId>org.gvsig</groupId>
44 47
				<artifactId>org.gvsig.raster.lib.api</artifactId>
45
				<version>2.0.1-SNAPSHOT</version>
48
				<version>2.1.0-SNAPSHOT</version>
46 49
			</dependency>
47 50
	        <dependency>
48 51
	            <groupId>org.gvsig</groupId>
49 52
	            <artifactId>org.gvsig.raster.lib.impl</artifactId>
50
	            <version>2.0.1-SNAPSHOT</version>
53
	            <version>2.1.0-SNAPSHOT</version>
51 54
	        </dependency>
52
			<!--<dependency>
53
				<groupId>org.gvsig</groupId>
54
				<artifactId>org.gvsig.jproj</artifactId>
55
				<version>2.0.1-SNAPSHOT</version>
56
				<classifier>${native-classifier}</classifier>
57
				<type>tar.gz</type>
58
			</dependency>-->
59 55
			<dependency>
60 56
				<groupId>org.gvsig</groupId>
61 57
				<artifactId>org.gvsig.raster.tools.app.basic</artifactId>
62
				<version>2.0.1-SNAPSHOT</version>
58
				<version>2.1.0-SNAPSHOT</version>
63 59
			</dependency>
64 60
			<dependency>
65 61
	            <groupId>org.gvsig</groupId>
66 62
	            <artifactId>org.gvsig.raster.wmts.io</artifactId>
67
	            <version>2.0.1-SNAPSHOT</version>
63
	            <version>2.1.0-SNAPSHOT</version>
68 64
	        </dependency>
69
		    <dependency>
70
				<groupId>org.gvsig</groupId>
71
				<artifactId>org.gvsig.app</artifactId>
72
				<version>2.0</version>
73
			</dependency>
74 65
			<dependency>
75 66
				<groupId>org.gvsig</groupId>
76 67
				<artifactId>org.gvsig.raster.fmap</artifactId>
77
				<version>2.0.1-SNAPSHOT</version>
68
				<version>2.1.0-SNAPSHOT</version>
78 69
			</dependency>
79
			
80
			<!-- DAL & gvSIG -->
81
			
82
        	<dependency>
83
				<groupId>org.gvsig</groupId>
84
				<artifactId>org.gvsig.core.maven.dependencies</artifactId>
85
				<version>2.0.1</version>
86
				<type>pom</type>
87
				<scope>import</scope>
88
			</dependency>
89
			
90
			<dependency>
91
                <groupId>org.gvsig</groupId>
92
                <artifactId>org.gvsig.remoteclient</artifactId>
93
                <version>2.0.1-SNAPSHOT</version>
94
            </dependency>
95 70
		</dependencies>
96 71
	</dependencyManagement>
72
	
97 73
    <developers>
98 74
		<developer>
99 75
			<id>nbrodin</id>
......
105 81
			</roles>
106 82
		</developer>
107 83
	</developers>
84
	
108 85
	<build>
109 86
        <plugins>
110 87
            <plugin>
......
117 94
            </plugin>
118 95
        </plugins>
119 96
    </build>
120
	<properties>
121
		<build-dir>${basedir}/../..</build-dir>
122
	</properties>
97
    
123 98
	<modules>
124 99
		<!--<module>org.gvsig.raster.wmts.swing</module>-->
125 100
		<module>org.gvsig.raster.wmts.io</module>
126
		<module>org.gvsig.raster.wmts.app</module>
101
		<module>org.gvsig.raster.wmts.app.wmtsclient</module>
127 102
		<module>org.gvsig.raster.wmts.ogc</module>
128 103
	</modules>
129 104
</project>
org.gvsig.raster.wmts/trunk/org.gvsig.raster.wmts/org.gvsig.raster.wmts.io/pom.xml
4 4
	<artifactId>org.gvsig.raster.wmts.io</artifactId>
5 5
	<packaging>jar</packaging>
6 6
	<name>org.gvsig.raster.wmts.io</name>
7
	
7 8
	<parent>
8 9
		<groupId>org.gvsig</groupId>
9 10
		<artifactId>org.gvsig.raster.wmts</artifactId>
10
		<version>2.0.1-SNAPSHOT</version>
11
		<version>2.1.0-SNAPSHOT</version>
11 12
	</parent>
12
    <properties>
13
        <build-dir>${basedir}/../../../build</build-dir>
14
    </properties>
13
	
15 14
	<dependencies>
16 15
		<dependency>
17 16
			<groupId>org.gvsig</groupId>
......
30 29
        </dependency>
31 30
        <dependency>
32 31
            <groupId>org.gvsig</groupId>
33
            <artifactId>org.gvsig.fmap.dal</artifactId>
32
            <artifactId>org.gvsig.metadata.lib.basic.api</artifactId>
34 33
            <scope>compile</scope>
35 34
        </dependency>
36 35
        <dependency>
37 36
            <groupId>org.gvsig</groupId>
38
            <artifactId>org.gvsig.fmap.dal</artifactId>
39
            <classifier>spi</classifier>
37
            <artifactId>org.gvsig.raster.wmts.ogc.api</artifactId>
40 38
            <scope>compile</scope>
41 39
        </dependency>
42 40
        <dependency>
43 41
            <groupId>org.gvsig</groupId>
44
            <artifactId>org.gvsig.fmap.dal.file</artifactId>
42
            <artifactId>org.gvsig.raster.wmts.ogc.impl</artifactId>
43
            <scope>runtime</scope>
44
        </dependency>
45
		<dependency>
46
            <groupId>org.gvsig</groupId>
47
            <artifactId>org.gvsig.tools.lib</artifactId>
45 48
            <scope>compile</scope>
46 49
        </dependency>
50
        
51
        
47 52
        <dependency>
48 53
            <groupId>org.gvsig</groupId>
49
            <artifactId>org.gvsig.metadata.lib.basic.api</artifactId>
54
            <artifactId>org.gvsig.fmap.dal.api</artifactId>
50 55
            <scope>compile</scope>
51 56
        </dependency>
52 57
        <dependency>
53 58
            <groupId>org.gvsig</groupId>
54
            <artifactId>org.gvsig.projection</artifactId>
59
            <artifactId>org.gvsig.fmap.dal.impl</artifactId>
55 60
            <scope>compile</scope>
56 61
        </dependency>
57 62
        <dependency>
58 63
            <groupId>org.gvsig</groupId>
59
            <artifactId>org.gvsig.compat</artifactId>
64
            <artifactId>org.gvsig.fmap.dal.file.lib</artifactId>
60 65
            <scope>compile</scope>
61 66
        </dependency>
62 67
        <dependency>
63 68
            <groupId>org.gvsig</groupId>
64
            <artifactId>org.gvsig.fmap.geometry</artifactId>
69
            <artifactId>org.gvsig.fmap.dal.spi</artifactId>
65 70
            <scope>compile</scope>
66 71
        </dependency>
67 72
        <dependency>
68 73
            <groupId>org.gvsig</groupId>
69
            <artifactId>org.gvsig.raster.wmts.ogc.api</artifactId>
74
            <artifactId>org.gvsig.projection.api</artifactId>
70 75
            <scope>compile</scope>
71 76
        </dependency>
72 77
        <dependency>
73 78
            <groupId>org.gvsig</groupId>
74
            <artifactId>org.gvsig.raster.wmts.ogc.impl</artifactId>
79
            <artifactId>org.gvsig.projection.cresques.impl</artifactId>
75 80
            <scope>runtime</scope>
76 81
        </dependency>
77
		<!--<dependency>
78
			<groupId>org.gvsig</groupId>
79
			<artifactId>org.gvsig.jecw</artifactId>
82
        <dependency>
83
            <groupId>org.gvsig</groupId>
84
            <artifactId>org.gvsig.fmap.geometry.api</artifactId>
80 85
            <scope>compile</scope>
81
		</dependency>
86
        </dependency>
82 87
        <dependency>
83 88
            <groupId>org.gvsig</groupId>
84
            <artifactId>org.gvsig.jecw</artifactId>
85
            <classifier>${native-classifier}</classifier>
86
            <type>tar.gz</type>
89
            <artifactId>org.gvsig.fmap.geometry.impl</artifactId>
87 90
            <scope>runtime</scope>
88 91
        </dependency>
89
		<dependency>
90
			<groupId>org.gvsig</groupId>
91
			<artifactId>org.gvsig.jgdal</artifactId>
92
            <scope>compile</scope>
93
		</dependency>
94 92
        <dependency>
95 93
            <groupId>org.gvsig</groupId>
96
            <artifactId>org.gvsig.jgdal</artifactId>
97
            <classifier>${native-classifier}</classifier>
98
            <type>tar.gz</type>
94
            <artifactId>org.gvsig.fmap.geometry.operation</artifactId>
99 95
            <scope>runtime</scope>
100 96
        </dependency>
101
		<dependency>
102
	    	<groupId>org.gdal</groupId>
103
		   	<artifactId>gdal</artifactId>
104
	    	<classifier>${native-classifier}</classifier>
105
    		<type>tar.gz</type>
106
            <scope>runtime</scope>
107
   		</dependency>
108
		<dependency>
109
			<groupId>org.gvsig</groupId>
110
			<artifactId>org.gvsig.jmrsid</artifactId>
97
        <dependency>
98
            <groupId>org.gvsig</groupId>
99
            <artifactId>org.gvsig.compat.api</artifactId>
111 100
            <scope>compile</scope>
112
		</dependency>
113
		<dependency>
114
 			<groupId>org.gvsig</groupId>
115
 			<artifactId>org.gvsig.jmrsid</artifactId>
116
  			<classifier>${native-classifier}</classifier>
117
  			<type>tar.gz</type>
118
            <scope>runtime</scope>
119
		</dependency>
120
		<dependency>
121
			<groupId>org.gvsig</groupId>
122
			<artifactId>org.gvsig.jproj</artifactId>
123
			<classifier>${native-classifier}</classifier>
124
			<type>tar.gz</type>
125
            <scope>runtime</scope>
126
		</dependency>-->
127
		<dependency>
101
        </dependency>
102
        <dependency>
128 103
            <groupId>org.gvsig</groupId>
129
            <artifactId>org.gvsig.tools.lib</artifactId>
104
            <artifactId>org.gvsig.compat.se</artifactId>
130 105
            <scope>compile</scope>
131 106
        </dependency>
132 107
	</dependencies>
org.gvsig.raster.wmts/trunk/org.gvsig.raster.wmts/org.gvsig.raster.wmts.swing/pom.xml
10 10
	<parent>
11 11
		<groupId>org.gvsig</groupId>
12 12
		<artifactId>org.gvsig.raster.wmts</artifactId>
13
		<version>2.0.0-SNAPSHOT</version>
13
		<version>2.1.0-SNAPSHOT</version>
14 14
	</parent>
15 15
	<dependencies>
16 16
		<dependency>
org.gvsig.raster.wmts/trunk/org.gvsig.raster.wmts/org.gvsig.raster.wmts.swing/org.gvsig.raster.wmts.swing.api/pom.xml
8 8
	<parent>
9 9
		<groupId>org.gvsig</groupId>
10 10
		<artifactId>org.gvsig.raster.wmts.swing</artifactId>
11
		<version>2.0.0-SNAPSHOT</version>
11
		<version>2.1.0-SNAPSHOT</version>
12 12
	</parent>
13 13
	<dependencies>
14 14
		<dependency>
org.gvsig.raster.wmts/trunk/org.gvsig.raster.wmts/org.gvsig.raster.wmts.swing/org.gvsig.raster.wmts.swing.impl/pom.xml
8 8
	<parent>
9 9
		<groupId>org.gvsig</groupId>
10 10
		<artifactId>org.gvsig.raster.wmts.swing</artifactId>
11
		<version>2.0.0-SNAPSHOT</version>
11
		<version>2.1.0-SNAPSHOT</version>
12 12
	</parent>
13 13
	<dependencies>
14 14
		<dependency>
org.gvsig.raster.wmts/trunk/org.gvsig.raster.wmts/org.gvsig.raster.wmts.app.wmtsclient/src/test/java/org/gvsig/raster/app/extension/wmtsclient/gui/dialog/TestPropsDialog.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.app.extension.wmtsclient.gui.dialog;
20

  
21
import javax.swing.JFrame;
22

  
23
import org.gvsig.raster.wmts.app.wmtsclient.gui.dialog.WMTSPropsDialog;
24

  
25
public class TestPropsDialog {
26
	private int               w        = 510;
27
	private int               h        = 610;
28
	private JFrame            frame    = new JFrame();
29
	private WMTSPropsDialog   desc     = null;
30

  
31
	public TestPropsDialog() {
32
		desc = new WMTSPropsDialog();
33
		frame.getContentPane().add(desc);
34
		frame.setSize(w, h);
35
		frame.setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
36
		frame.setVisible(true);
37
	}
38

  
39
	public static void main(String[] args) {
40
		new TestPropsDialog();
41
	}
42
}
0 43

  
org.gvsig.raster.wmts/trunk/org.gvsig.raster.wmts/org.gvsig.raster.wmts.app.wmtsclient/src/test/java/org/gvsig/raster/app/extension/wmtsclient/gui/panel/TestStylesPanel.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.app.extension.wmtsclient.gui.panel;
20

  
21
import javax.swing.JFrame;
22
import org.gvsig.raster.wmts.app.wmtsclient.gui.panel.StylesPanel;
23

  
24
public class TestStylesPanel {
25
	private int               w        = 510;
26
	private int               h        = 610;
27
	private JFrame            frame    = new JFrame();
28
	private StylesPanel       desc     = null;
29

  
30
	public TestStylesPanel() {
31
		desc = new StylesPanel();
32
		frame.getContentPane().add(desc);
33
		frame.setSize(w, h);
34
		frame.setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
35
		frame.setVisible(true);
36
	}
37
 
38
	public static void main(String[] args) {
39
		new TestStylesPanel();
40
	}
41
}
0 42

  
org.gvsig.raster.wmts/trunk/org.gvsig.raster.wmts/org.gvsig.raster.wmts.app.wmtsclient/src/test/java/org/gvsig/raster/app/extension/wmtsclient/gui/panel/main/TestServerPanel.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.app.extension.wmtsclient.gui.panel.main;
20

  
21
import javax.swing.JFrame;
22

  
23
import org.gvsig.raster.wmts.app.wmtsclient.gui.panel.main.IServerPanel;
24

  
25
public class TestServerPanel {
26
	private int               w        = 510;
27
	private int               h        = 610;
28
	private JFrame            frame    = new JFrame();
29
	private IServerPanel       desc     = null;
30

  
31
	public TestServerPanel() {
32
		desc = new IServerPanel();
33
		frame.getContentPane().add(desc);
34
		frame.setSize(w, h);
35
		frame.setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
36
		frame.setVisible(true);
37
	}
38

  
39
	public static void main(String[] args) {
40
		new TestServerPanel();
41
	}
42
}
0 43

  
org.gvsig.raster.wmts/trunk/org.gvsig.raster.wmts/org.gvsig.raster.wmts.app.wmtsclient/src/test/java/org/gvsig/raster/app/extension/wmtsclient/gui/panel/main/TestConnectPanel.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.app.extension.wmtsclient.gui.panel.main;
20

  
21
import javax.swing.JFrame;
22

  
23
import org.gvsig.raster.wmts.app.wmtsclient.gui.panel.main.ConnectPanel;
24

  
25
public class TestConnectPanel {
26
	private int               w        = 510;
27
	private int               h        = 90;
28
	private JFrame            frame    = new JFrame();
29
	private ConnectPanel      connect  = null;
30

  
31
	public TestConnectPanel() {
32
		connect = new ConnectPanel();
33
		frame.getContentPane().add(connect);
34
		frame.setSize(w, h);
35
		frame.setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
36
		frame.setVisible(true);
37
	}
38

  
39
	public static void main(String[] args) {
40
		new TestConnectPanel();
41
	}
42
}
0 43

  
org.gvsig.raster.wmts/trunk/org.gvsig.raster.wmts/org.gvsig.raster.wmts.app.wmtsclient/src/test/java/org/gvsig/raster/app/extension/wmtsclient/gui/panel/main/TestNextPrevPanel.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.app.extension.wmtsclient.gui.panel.main;
20

  
21
import javax.swing.JFrame;
22

  
23
import org.gvsig.raster.wmts.app.wmtsclient.gui.panel.main.NextPrevPanel;
24

  
25
public class TestNextPrevPanel {
26
	private int               w        = 510;
27
	private int               h        = 100;
28
	private JFrame            frame    = new JFrame();
29
	private NextPrevPanel     desc     = null;
30

  
31
	public TestNextPrevPanel() {
32
		desc = new NextPrevPanel();
33
		frame.getContentPane().add(desc);
34
		frame.setSize(w, h);
35
		frame.setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
36
		frame.setVisible(true);
37
	}
38

  
39
	public static void main(String[] args) {
40
		new TestNextPrevPanel();
41
	}
42
}
0 43

  
org.gvsig.raster.wmts/trunk/org.gvsig.raster.wmts/org.gvsig.raster.wmts.app.wmtsclient/src/test/java/org/gvsig/raster/app/extension/wmtsclient/gui/panel/main/TestDescriptionPanel.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.app.extension.wmtsclient.gui.panel.main;
20

  
21
import javax.swing.JFrame;
22

  
23
import org.gvsig.raster.wmts.app.wmtsclient.gui.panel.main.DescriptionPanel;
24

  
25
public class TestDescriptionPanel {
26
	private int               w        = 510;
27
	private int               h        = 510;
28
	private JFrame            frame    = new JFrame();
29
	private DescriptionPanel  desc     = null;
30

  
31
	public TestDescriptionPanel() {
32
		desc = new DescriptionPanel();
33
		frame.getContentPane().add(desc);
34
		frame.setSize(w, h);
35
		frame.setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
36
		frame.setVisible(true);
37
	}
38

  
39
	public static void main(String[] args) {
40
		new TestDescriptionPanel();
41
	}
42
}
0 43

  
org.gvsig.raster.wmts/trunk/org.gvsig.raster.wmts/org.gvsig.raster.wmts.app.wmtsclient/src/test/java/org/gvsig/raster/app/extension/wmtsclient/gui/panel/format/TestFormatsPanel.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.app.extension.wmtsclient.gui.panel.format;
20

  
21
import javax.swing.JFrame;
22

  
23
import org.gvsig.raster.wmts.app.wmtsclient.gui.panel.format.IFormatsPanel;
24

  
25
public class TestFormatsPanel {
26
	private int               w        = 510;
27
	private int               h        = 610;
28
	private JFrame            frame    = new JFrame();
29
	private IFormatsPanel      desc     = null;
30

  
31
	public TestFormatsPanel() {
32
		desc = new IFormatsPanel();
33
		frame.getContentPane().add(desc);
34
		frame.setSize(w, h);
35
		frame.setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
36
		frame.setVisible(true);
37
	}
38

  
39
	public static void main(String[] args) {
40
		new TestFormatsPanel();
41
	}
42
}
0 43

  
org.gvsig.raster.wmts/trunk/org.gvsig.raster.wmts/org.gvsig.raster.wmts.app.wmtsclient/src/test/java/org/gvsig/raster/app/extension/wmtsclient/gui/panel/layer/TestILayerPanel.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.app.extension.wmtsclient.gui.panel.layer;
20

  
21
import javax.swing.JFrame;
22

  
23
import org.gvsig.raster.wmts.app.wmtsclient.gui.panel.layer.ILayerPanel;
24

  
25
public class TestILayerPanel {
26
	private int               w        = 510;
27
	private int               h        = 610;
28
	private JFrame            frame    = new JFrame();
29
	private ILayerPanel       desc     = null;
30

  
31
	public TestILayerPanel() {
32
		desc = new ILayerPanel();
33
		frame.getContentPane().add(desc);
34
		frame.setSize(w, h);
35
		frame.setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
36
		frame.setVisible(true);
37
	}
38

  
39
	public static void main(String[] args) {
40
		new TestILayerPanel();
41
	}
42
}
0 43

  
org.gvsig.raster.wmts/trunk/org.gvsig.raster.wmts/org.gvsig.raster.wmts.app.wmtsclient/src/test/java/org/gvsig/raster/app/extension/wmtsclient/gui/panel/layer/TestLayerListPanel.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.app.extension.wmtsclient.gui.panel.layer;
20

  
21
import javax.swing.JFrame;
22

  
23
import org.gvsig.raster.wmts.app.wmtsclient.gui.panel.layer.LayersSelectedPanel;
24

  
25
public class TestLayerListPanel {
26
	private int               w        = 510;
27
	private int               h        = 610;
28
	private JFrame            frame    = new JFrame();
29
	private LayersSelectedPanel    desc     = null;
30

  
31
	public TestLayerListPanel() {
32
		desc = new LayersSelectedPanel();
33
		frame.getContentPane().add(desc);
34
		frame.setSize(w, h);
35
		frame.setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
36
		frame.setVisible(true);
37
	}
38

  
39
	public static void main(String[] args) {
40
		new TestLayerListPanel();
41
	}
42
}
0 43

  
org.gvsig.raster.wmts/trunk/org.gvsig.raster.wmts/org.gvsig.raster.wmts.app.wmtsclient/src/test/java/org/gvsig/raster/app/extension/wmtsclient/gui/panel/layer/TestAddDelPanel.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.app.extension.wmtsclient.gui.panel.layer;
20

  
21
import javax.swing.JFrame;
22

  
23
import org.gvsig.raster.wmts.app.wmtsclient.gui.panel.layer.AddDelLayerPanel;
24

  
25
public class TestAddDelPanel {
26
	private int               w        = 510;
27
	private int               h        = 110;
28
	private JFrame            frame    = new JFrame();
29
	private AddDelLayerPanel  desc     = null;
30

  
31
	public TestAddDelPanel() {
32
		desc = new AddDelLayerPanel();
33
		frame.getContentPane().add(desc);
34
		frame.setSize(w, h);
35
		frame.setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
36
		frame.setVisible(true);
37
	}
38

  
39
	public static void main(String[] args) {
40
		new TestAddDelPanel();
41
	}
42
}
0 43

  
org.gvsig.raster.wmts/trunk/org.gvsig.raster.wmts/org.gvsig.raster.wmts.app.wmtsclient/src/test/java/org/gvsig/raster/wmts/io/TestWMTSDriver.java
1
/* gvSIG. Geographic Information System of the Valencian Government
2
 *
3
 * Copyright (C) 2007-2008 Infrastructures and Transports Department
4
 * of the Valencian Government (CIT)
5
 *
6
 * This program is free software; you can redistribute it and/or
7
 * modify it under the terms of the GNU General Public License
8
 * as published by the Free Software Foundation; either version 2
9
 * of the License, or (at your option) any later version.
10
 *
11
 * This program is distributed in the hope that it will be useful,
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 * GNU General Public License for more details.
15
 *
16
 * You should have received a copy of the GNU General Public License
17
 * along with this program; if not, write to the Free Software
18
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19
 * MA  02110-1301, USA.
20
 *
21
 */
22
package org.gvsig.raster.wmts.io;
23

  
24
import java.net.MalformedURLException;
25
import java.net.URL;
26

  
27
import org.gvsig.fmap.dal.exception.InitializeException;
28
import org.gvsig.raster.wmts.ogc.exception.WMTSException;
29
import org.gvsig.raster.wmts.ogc.struct.WMTSServiceIdentification;
30
import org.gvsig.raster.wmts.ogc.struct.WMTSServiceProvider;
31
import org.gvsig.tools.junit.AbstractLibraryAutoInitTestCase;
32

  
33
/**
34
 * @author Nacho Brodin (nachobrodin@gmail.com)
35
 */
36
public class TestWMTSDriver extends AbstractLibraryAutoInitTestCase {
37
	
38
	protected void doSetUp() throws Exception {
39
		System.err.println("TestWMTSDriver running...");
40
	}
41
	
42
	public void testStack() {
43
		
44
		URL url = null;
45
		try {
46
			url = new URL("http://scolab.es:9090/geoserver/gwc/service/wmts");
47
			
48
			//Crea el manejador para la versi?n del servidor y devuelve la versi?n 
49
			//WMTSConnector conn = WMTSDriver.getConnectorFromURL(url);
50
			//String version = conn.getVersion();
51
			
52
			//Creamos un explorer para obtener los datos del servidor
53
			WMTSServerExplorerParameters.registerDynClass();
54
			WMTSServerExplorerParameters param = new WMTSServerExplorerParameters();
55
			param.setHost(url.toString());
56
			WMTSServerExplorer explorer = new WMTSServerExplorer(param, null);
57
			explorer.connect(null);
58
			
59
			WMTSServiceIdentification id = explorer.getConnector().getServiceIdentification();
60
			String title = id.getTitle();
61
			String version = id.getServiceTypeVersion();
62
			String type = id.getServiceType();
63
			
64
			WMTSServiceProvider prov = explorer.getConnector().getServiceProvider();
65
			String pN = prov.getProviderName();
66
			String pS = prov.getProviderSite();
67
			String pC = prov.getServiceContact();
68
			
69
			//WMTSThemes themes = explorer.getThemes();
70
			System.out.println("Title: " + title);
71
			System.out.println("Version: " + version);
72
			System.out.println("Type: " + type);
73
			System.out.println("Provider Name: " + pN);
74
			System.out.println("Provider Site: " + pS);
75
			System.out.println("Service Contact: " + pC);
76
			
77
			//En este caso solo hay una lista de temas con una capa por cada uno
78
			//pero en un caso corriente seria un ?rbol de themas con una capa asociada a cada uno
79
			/*for (int i = 0; i < themes.size(); i++) {
80
				WMTSLayer layer = ((WMTSTheme)themes.get(i)).getLayer();
81
				if(layer != null)
82
					layer.print();
83
			}*/
84
			
85
		} catch (MalformedURLException e) {
86
			e.printStackTrace();
87
		} catch (InitializeException e) {
88
			e.printStackTrace();
89
		} catch (WMTSException e) {
90
			e.printStackTrace();
91
		}
92
		
93
	}
94
}
0 95

  
org.gvsig.raster.wmts/trunk/org.gvsig.raster.wmts/org.gvsig.raster.wmts.app.wmtsclient/src/main/java/org/gvsig/raster/wmts/app/wmtsclient/gui/toc/WMTSPropsTocMenuEntry.java
1
/* gvSIG. Geographic Information System of the Valencian Government
2
*
3
* Copyright (C) 2007-2008 Infrastructures and Transports Department
4
* of the Valencian Government (CIT)
5
* 
6
* This program is free software; you can redistribute it and/or
7
* modify it under the terms of the GNU General Public License
8
* as published by the Free Software Foundation; either version 2
9
* of the License, or (at your option) any later version.
10
* 
11
* This program is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
* GNU General Public License for more details.
15
* 
16
* You should have received a copy of the GNU General Public License
17
* along with this program; if not, write to the Free Software
18
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
19
* MA  02110-1301, USA.
20
* 
21
*/
22
 
23
package org.gvsig.raster.wmts.app.wmtsclient.gui.toc;
24

  
25
import org.gvsig.andami.PluginServices;
26
import org.gvsig.app.project.documents.view.toc.AbstractTocContextMenuAction;
27
import org.gvsig.app.project.documents.view.toc.ITocItem;
28
import org.gvsig.fmap.mapcontext.layers.FLayer;
29
import org.gvsig.raster.wmts.app.wmtsclient.gui.dialog.WMTSPropsDialog;
30
import org.gvsig.raster.wmts.app.wmtsclient.layer.FLyrWMTS;
31

  
32

  
33
/**
34
 * The TOC WMTS properties.
35
 *
36
 * @author Nacho Brodin (nachobrodin@gmail.com)
37
 */
38
public class WMTSPropsTocMenuEntry extends AbstractTocContextMenuAction {
39

  
40
	public void execute(ITocItem item, FLayer[] selectedItems) {
41
		WMTSPropsDialog dialog = new WMTSPropsDialog(selectedItems[0]);
42
		PluginServices.getMDIManager().addWindow(dialog);
43
	}
44

  
45
	public String getText() {
46
		return PluginServices.getText(this, "wmts_properties");
47
	}
48

  
49
	public boolean isEnabled(ITocItem item, FLayer[] selectedItems) {
50
		return selectedItems.length == 1 && selectedItems[0].isAvailable();
51
	}
52

  
53
	public boolean isVisible(ITocItem item, FLayer[] selectedItems) {
54
		if (selectedItems.length != 1) {
55
			return false;
56
		}
57
		return selectedItems[0] instanceof FLyrWMTS;
58

  
59
	}
60

  
61
}
0 62

  
org.gvsig.raster.wmts/trunk/org.gvsig.raster.wmts/org.gvsig.raster.wmts.app.wmtsclient/src/main/java/org/gvsig/raster/wmts/app/wmtsclient/gui/dialog/WMTSPropsDialog.java
1
/* gvSIG. Geographic Information System of the Valencian Government
2
*
3
* Copyright (C) 2007-2008 Infrastructures and Transports Department
4
* of the Valencian Government (CIT)
5
* 
6
* This program is free software; you can redistribute it and/or
7
* modify it under the terms of the GNU General Public License
8
* as published by the Free Software Foundation; either version 2
9
* of the License, or (at your option) any later version.
10
* 
11
* This program is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
* GNU General Public License for more details.
15
* 
16
* You should have received a copy of the GNU General Public License
17
* along with this program; if not, write to the Free Software
18
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
19
* MA  02110-1301, USA.
20
* 
21
*/
22
 
23
package org.gvsig.raster.wmts.app.wmtsclient.gui.dialog;
24

  
25
import java.awt.BorderLayout;
26
import java.awt.event.ActionEvent;
27
import java.awt.event.ActionListener;
28
import java.util.HashMap;
29

  
30
import javax.swing.JOptionPane;
31
import javax.swing.JPanel;
32

  
33
import org.gvsig.andami.PluginServices;
34
import org.gvsig.andami.ui.mdiManager.IWindow;
35
import org.gvsig.andami.ui.mdiManager.WindowInfo;
36
import org.gvsig.app.gui.wizards.WizardListener;
37
import org.gvsig.fmap.mapcontext.MapContext;
38
import org.gvsig.fmap.mapcontext.exceptions.LoadLayerException;
39
import org.gvsig.fmap.mapcontext.layers.FLayer;
40
import org.gvsig.fmap.mapcontext.layers.FLayers;
41
import org.gvsig.fmap.mapcontrol.MapControl;
42
import org.gvsig.gui.beans.buttonspanel.ButtonsPanel;
43
import org.gvsig.gui.beans.buttonspanel.ButtonsPanelEvent;
44
import org.gvsig.gui.beans.buttonspanel.ButtonsPanelListener;
45
import org.gvsig.raster.tools.app.basic.RasterToolsUtil;
46
import org.gvsig.raster.util.CancelTaskImpl;
47
import org.gvsig.raster.wmts.app.wmtsclient.gui.panel.WMTSGUIInterface;
48
import org.gvsig.raster.wmts.app.wmtsclient.gui.panel.WMTSParamsPanel;
49
import org.gvsig.raster.wmts.app.wmtsclient.layer.FLyrWMTS;
50
import org.gvsig.raster.wmts.io.WMTSServerExplorer;
51
import org.gvsig.raster.wmts.ogc.exception.WMTSException;
52

  
53

  
54
/**
55
 * The TOC WMTS properties panel container.
56
 *
57
 * @author Nacho Brodin (nachobrodin@gmail.com)
58
 */
59
public class WMTSPropsDialog extends JPanel implements IWindow, ButtonsPanelListener {
60
	private static final long         serialVersionUID      = 1L;
61
	private FLyrWMTS                  fLayer                = null;
62
	private WindowInfo                m_ViewInfo            = null;
63
	private ButtonsPanel              buttonsPanel          = null;   
64
	private WMTSGUIInterface          wmtsGUIInterface      = null;
65
    private WMTSServerExplorer        explorer              = null;
66

  
67
    public WMTSPropsDialog() {
68
    	initialize(null);
69
    }
70
    
71
    public WMTSPropsDialog(FLayer layer) {
72
		super();
73
		if(layer instanceof FLyrWMTS) {
74
			fLayer = (FLyrWMTS)layer;
75
			initialize(fLayer);
76
		}
77
	}
78

  
79
	private void initialize(FLyrWMTS layer) {
80
		HashMap<String, Object> hash = layer != null ? layer.getProperties() : null;
81
		wmtsGUIInterface = getParamsPanel(hash);
82
		wmtsGUIInterface.addWizardListener(new WizardListener(){
83
			public void wizardStateChanged(boolean finishable) {
84
				getButtonsPanel().getButton(ButtonsPanel.BUTTON_ACCEPT).setEnabled(finishable);
85
				getButtonsPanel().getButton(ButtonsPanel.BUTTON_APPLY).setEnabled(finishable);
86
			}
87

  
88
			public void error(Exception e) {
89
			}
90

  
91
        });
92
		setLayout(new BorderLayout());
93
        this.add(wmtsGUIInterface.getComponent(), BorderLayout.CENTER);
94
        this.add(getButtonsPanel(), BorderLayout.SOUTH);
95
	}
96
	
97
	/**
98
	 * Gets the buttons panel
99
	 * @return
100
	 */
101
	public ButtonsPanel getButtonsPanel() {
102
		if(buttonsPanel == null) {
103
			buttonsPanel = new ButtonsPanel();
104
			buttonsPanel.addApply();
105
			buttonsPanel.addAccept();
106
			buttonsPanel.addClose();
107
			buttonsPanel.addButtonPressedListener(this);
108
		}
109
		return buttonsPanel;
110
	}
111

  
112
	/**
113
	 * With getParamsPanel we have access to the map config TabbedPane.
114
	 * If this panel doesn't exist yet (which can occur when an existing project is
115
	 * recovered) it is been automatically constructed by connecting to the server,
116
	 * reloading the necessary data, filling up the content and setting the selected
117
	 * values that were selected when the projet was saved.
118
	 *
119
	 *
120
	 * Since a connection to the server is needed when rebuiliding the panel, this
121
	 * causes a delay for the panel's showing up or a nullPointer error if there is
122
	 * no path to the server.
123
	 *
124
	 *
125
	 * Con getParamsPanel tenemos acceso a juego de pesta?as de configuraci?n
126
	 * del mapa. Si este panel todav?a no existe (como puede ser cuando
127
	 * recuperamos un proyecto guardado) ?ste se crea autom?ticamente conectando
128
	 * al servidor, recuperando los datos necesarios, rellenando el contenido y
129
	 * dejando seleccionados los valores que estaban seleccionados cuando se
130
	 * guarda el proyecto.
131
	 *
132
	 *
133
	 * Como para reconstruirse requiere una conexi?n con el servidor esto causa
134
	 * un retardo en la aparici?n en el toc o un error de nullPointer si no
135
	 * hay conexi?n hasta el servidor.
136
	 *
137
	 *
138
	 * @return WMSParamsPanel
139
	 */
140
	public WMTSGUIInterface getParamsPanel(HashMap<String, Object> info) {
141
		if (info == null) {
142
			WMTSGUIInterface toc = new WMTSParamsPanel();
143
			return toc;
144
		}
145

  
146
		try {
147
			if(explorer == null) {
148
				explorer = ((FLyrWMTS)fLayer).getExplorer();
149

  
150
				try {
151
					explorer.connect(new CancelTaskImpl());
152
				} catch (WMTSException e) {
153
					RasterToolsUtil.messageBoxError("The connection cannot be established", this, e);
154
					return null;
155
				} 
156
			}
157
		} catch (Exception e) {
158
			explorer = null;
159
			JOptionPane.showMessageDialog(null, "error_comunicacion_servidor", "Error", JOptionPane.ERROR_MESSAGE);
160
		}
161
		
162
		try {
163
			WMTSGUIInterface toc = new WMTSParamsPanel();
164
			((WMTSParamsPanel)toc).setWizardData(explorer);
165
			toc.updateSelectedInfo(info);
166
			return toc;
167
		} catch (Exception e) {
168
			JOptionPane.showMessageDialog(null, "error_comunicacion_servidor", "Error", JOptionPane.ERROR_MESSAGE);
169
		}
170

  
171
		return null;
172
	}
173

  
174
    @SuppressWarnings("unused")
175
	private class CommandListener implements ActionListener {
176

  
177
        /**
178
         * Creates a new ComandosListener object.
179
         *
180
         * @param lg DOCUMENT ME!
181
         */
182
        public CommandListener(WMTSPropsDialog tp) {
183
        }
184

  
185
		/* (non-Javadoc)
186
		 * @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent)
187
		 */
188
        public void actionPerformed(ActionEvent e) {
189
        	if (e.getActionCommand() == "CANCEL") {
190
        		close();
191
        	} else {
192
   				MapControl mapCtrl = null;
193

  
194
				IWindow[] w = PluginServices.getMDIManager().getAllWindows();
195
				for (int i = 0; i < w.length; i++) {
196
					if (w[i] instanceof org.gvsig.app.project.documents.view.gui.AbstractViewPanel) {
197
						MapContext mapContext = ((org.gvsig.app.project.documents.view.gui.AbstractViewPanel)w[i]).getMapControl().getMapContext();
198
						if(mapContext == fLayer.getMapContext())
199
							mapCtrl = ((org.gvsig.app.project.documents.view.gui.AbstractViewPanel)w[i]).getMapControl();
200
					}
201
				}
202
				
203
        		try {
204
        			FLayer[] layerList = wmtsGUIInterface.getLayers();
205
        			removeDuplicate(layerList, mapCtrl);
206
        			for (int i = 0; i < layerList.length; i++) {
207
        				mapCtrl.getMapContext().getLayers().addLayer(layerList[i]);
208
        			}
209
        			mapCtrl.getMapContext().invalidate();
210
        		} catch (LoadLayerException exc) {
211
        			exc.printStackTrace();
212
        		}
213
        	}
214
		}
215
    }
216
    
217
    private void removeDuplicate(FLayer[] layerList, MapControl mapCtrl) {
218
    	FLayers lyrs = mapCtrl.getMapContext().getLayers();
219
    	for (int i = 0; i < lyrs.getLayersCount(); i++) {
220
			FLayer lyr = lyrs.getLayer(i);
221
			for (int j = 0; j < layerList.length; j++) {
222
				if(lyr.getName().compareTo(layerList[j].getName()) == 0) {
223
					lyrs.removeLayer(lyr);
224
				}
225
			}
226
		}
227
    }
228
    
229
    
230
	public WindowInfo getWindowInfo() {
231
		if (m_ViewInfo == null) {
232
			m_ViewInfo = new WindowInfo(WindowInfo.MODALDIALOG | WindowInfo.RESIZABLE);
233
			m_ViewInfo.setTitle(PluginServices.getText(this,"fit_WMTS_layer"));
234
	        m_ViewInfo.setWidth(500);
235
	        m_ViewInfo.setHeight(500);
236
		}
237
		return m_ViewInfo;
238
	}
239

  
240
	public void close() {
241
		PluginServices.getMDIManager().closeWindow(this);
242
	}
243

  
244
	public Object getWindowProfile() {
245
		return WindowInfo.DIALOG_PROFILE;
246
	}
247

  
248
	public void actionButtonPressed(ButtonsPanelEvent e) {
249
		if(	e.getButton() == ButtonsPanel.BUTTON_APPLY || 
250
			e.getButton() == ButtonsPanel.BUTTON_ACCEPT) {
251
			MapControl mapCtrl = null;
252

  
253
			IWindow[] w = PluginServices.getMDIManager().getAllWindows();
254
			for (int i = 0; i < w.length; i++) {
255
				if (w[i] instanceof org.gvsig.app.project.documents.view.gui.AbstractViewPanel) {
256
					MapContext mapContext = ((org.gvsig.app.project.documents.view.gui.AbstractViewPanel)w[i]).getMapControl().getMapContext();
257
					if(mapContext == fLayer.getMapContext())
258
						mapCtrl = ((org.gvsig.app.project.documents.view.gui.AbstractViewPanel)w[i]).getMapControl();
259
				}
260
			}
261
			
262
    		try {
263
    			FLayer[] layerList = wmtsGUIInterface.getLayers();
264
    			if(layerList.length > 0 && layerList[0] != null) {
265
    				if(layerList[0] instanceof FLyrWMTS) {
266
    					mapCtrl.getMapContext().getLayers().removeLayer(fLayer);
267
    					mapCtrl.getMapContext().getLayers().addLayer(layerList[0]);
268
    					fLayer = (FLyrWMTS)layerList[0];
269
    				}
270
    			}
271
    			//removeDuplicate(layerList, mapCtrl);
272
    			mapCtrl.getMapContext().invalidate();
273
    		} catch (LoadLayerException exc) {
274
    			exc.printStackTrace();
275
    		}
276
		}
277
		
278
		if(	e.getButton() == ButtonsPanel.BUTTON_CLOSE ||
279
			e.getButton() == ButtonsPanel.BUTTON_ACCEPT) {
280
			close();
281
		}
282
	}
283

  
284
}  //  @jve:decl-index=0:visual-constraint="10,10"
0 285

  
org.gvsig.raster.wmts/trunk/org.gvsig.raster.wmts/org.gvsig.raster.wmts.app.wmtsclient/src/main/java/org/gvsig/raster/wmts/app/wmtsclient/gui/panel/StylesPanel.java
1
/* gvSIG. Geographic Information System of the Valencian Government
2
*
3
* Copyright (C) 2007-2008 Infrastructures and Transports Department
4
* of the Valencian Government (CIT)
5
* 
6
* This program is free software; you can redistribute it and/or
7
* modify it under the terms of the GNU General Public License
8
* as published by the Free Software Foundation; either version 2
9
* of the License, or (at your option) any later version.
10
* 
11
* This program is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
* GNU General Public License for more details.
15
* 
16
* You should have received a copy of the GNU General Public License
17
* along with this program; if not, write to the Free Software
18
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
19
* MA  02110-1301, USA.
20
* 
21
*/
22
 
23
package org.gvsig.raster.wmts.app.wmtsclient.gui.panel;
24

  
25
import java.awt.BorderLayout;
26

  
27
import javax.swing.JScrollPane;
28

  
29
import org.gvsig.gui.beans.DefaultBean;
30

  
31
/**
32
 * This is the Styles tab of the WMTS wizard.
33
 * @author Nacho Brodin (nachobrodin@gmail.com)
34
 */
35
public class StylesPanel extends DefaultBean{
36
	private static final long   serialVersionUID   = 1L;
37
	private JScrollPane         jScrollPane        = null;
38
    private StyleTree           treeStyles         = null;
39

  
40
    public StylesPanel() {
41
        super();
42
        setLayout(new BorderLayout());
43
        add(getJScrollPane(), BorderLayout.CENTER);
44
    }
45
    
46
    /**
47
     * This method initializes jScrollPane3
48
     *
49
     * @return javax.swing.JScrollPane
50
     */
51
    private JScrollPane getJScrollPane() {
52
        if (jScrollPane == null) {
53
            jScrollPane = new JScrollPane();
54
            jScrollPane.setViewportView(getStyleTree());
55
        }
56
        return jScrollPane;
57
    }
58

  
59
    /**
60
     * This method initializes treeStyles
61
     *
62
     * @return javax.swing.JTree
63
     */
64
    public StyleTree getStyleTree() {
65
        if (treeStyles == null) {
66
            treeStyles = new StyleTree();
67
            treeStyles.addMouseListener(new java.awt.event.MouseAdapter() {
68
            	public void mouseClicked(java.awt.event.MouseEvent e) {
69
            		//StyleTreeModel model = (StyleTreeModel) treeStyles.getModel();
70
            		//callValueChanged(model.getStylesSelection(/*parent.selectedLayersToArray()*/));
71
            		callValueChanged(null);
72
            	}
73
            });
74
        }
75
        return treeStyles;
76
    }
77
}
0 78

  
org.gvsig.raster.wmts/trunk/org.gvsig.raster.wmts/org.gvsig.raster.wmts.app.wmtsclient/src/main/java/org/gvsig/raster/wmts/app/wmtsclient/gui/panel/main/IServerPanel.java
1
/* gvSIG. Geographic Information System of the Valencian Government
2
*
3
* Copyright (C) 2007-2008 Infrastructures and Transports Department
4
* of the Valencian Government (CIT)
5
*
6
* This program is free software; you can redistribute it and/or
7
* modify it under the terms of the GNU General Public License
8
* as published by the Free Software Foundation; either version 2
9
* of the License, or (at your option) any later version.
10
*
11
* This program is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
* GNU General Public License for more details.
15
*
16
* You should have received a copy of the GNU General Public License
17
* along with this program; if not, write to the Free Software
18
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19
* MA  02110-1301, USA.
20
*
21
*/
22
package org.gvsig.raster.wmts.app.wmtsclient.gui.panel.main;
23

  
24
import java.awt.Component;
25
import java.awt.FlowLayout;
26
import java.awt.GridBagConstraints;
27
import java.awt.GridBagLayout;
28
import java.awt.event.ActionEvent;
29
import java.awt.event.ActionListener;
30

  
31
import javax.swing.JButton;
32
import javax.swing.JCheckBox;
33
import javax.swing.JOptionPane;
34
import javax.swing.JPanel;
35

  
36
import org.gvsig.andami.PluginServices;
37
import org.gvsig.raster.tools.app.basic.RasterToolsUtil;
38
import org.gvsig.utils.swing.jcomboServer.JComboServer;
39

  
40
/**
41
 * Connect panel
42
 *
43
 * @author Nacho Brodin (nachobrodin@gmail.com)
44
 */
45
public class IServerPanel extends JPanel implements ActionListener {
46
	private static final long   serialVersionUID   = 1L;
47
	private ConnectPanel        connectPanel       = null;
48
	private DescriptionPanel    descPanel          = null;
49
	private JPanel              checkPanel         = null;
50
	private JCheckBox           chkInvertAxisOrder = null;
51
	
52
	public IServerPanel() {
53
		init();
54
	}
55
	
56
	public void init() {
57
		setLayout(new GridBagLayout());
58
		
59
		GridBagConstraints gridBagConstraints1 = new GridBagConstraints();
60
		gridBagConstraints1.fill = GridBagConstraints.HORIZONTAL;
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff