Revision 697

View differences:

2.1/tags/org.gvsig.view3d-1.0.21/org.gvsig.view3d.app/org.gvsig.view3d.app.lin.x86_64/buildNumber.properties
1
#Wed Aug 03 22:25:34 CEST 2016
2
buildNumber=25
2.1/tags/org.gvsig.view3d-1.0.21/org.gvsig.view3d.app/org.gvsig.view3d.app.lin.x86_64/src/main/assembly/gvsig-plugin-package.xml
1
<!-- gvSIG. Desktop Geographic Information System. Copyright (C) 2007-2013 
2
	gvSIG Association. This program is free software; you can redistribute it 
3
	and/or modify it under the terms of the GNU General Public License as published 
4
	by the Free Software Foundation; either version 3 of the License, or (at 
5
	your option) any later version. This program is distributed in the hope that 
6
	it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty 
7
	of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General 
8
	Public License for more details. You should have received a copy of the GNU 
9
	General Public License along with this program; if not, write to the Free 
10
	Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 
11
	USA. For any additional information, do not hesitate to contact us at info 
12
	AT gvsig.com, or visit our website www.gvsig.com. -->
13
<assembly>
14
	<id>gvsig-plugin-package</id>
15
	<formats>
16
		<format>zip</format>
17
	</formats>
18
	<baseDirectory>${project.parent.artifactId}</baseDirectory>
19
	<includeBaseDirectory>true</includeBaseDirectory>
20
	<files>
21
		<file>
22
			<source>target/${project.artifactId}-${project.version}.jar</source>
23
			<outputDirectory>lib</outputDirectory>
24
		</file>
25
		<file>
26
			<source>target/package.info</source>
27
		</file>
28
	</files>
29

  
30
	<fileSets>
31
		<fileSet>
32
			<directory>src/main/resources-plugin</directory>
33
			<outputDirectory>.</outputDirectory>
34
		</fileSet>
35
		<fileSet>
36
			<directory>target/org.gvsig.view3d.app.common</directory>
37
			<outputDirectory>.</outputDirectory>
38
			<excludes>
39
				<exclude>package.info</exclude>
40
			</excludes>
41
		</fileSet>
42
	</fileSets>
43

  
44

  
45

  
46

  
47
	<dependencySets>
48
		<dependencySet>
49
			<useProjectArtifact>false</useProjectArtifact>
50
			<useTransitiveDependencies>false</useTransitiveDependencies>
51
			<outputDirectory>lib</outputDirectory>
52
			<includes>
53
				<include>org.gvsig:org.gvsig.view3d.app.common</include>
54
				<include>org.jogamp.jogl:jogl-all</include>
55
				<include>org.jogamp.gluegen:gluegen-rt</include>
56
			</includes>
57
		</dependencySet>
58
	</dependencySets>
59

  
60
</assembly>
2.1/tags/org.gvsig.view3d-1.0.21/org.gvsig.view3d.app/org.gvsig.view3d.app.lin.x86_64/pom.xml
1
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
2
	<modelVersion>4.0.0</modelVersion>
3
	<parent>
4
		<groupId>org.gvsig</groupId>
5
		<artifactId>org.gvsig.view3d.app</artifactId>
6
		<version>1.0.21</version>
7
	</parent>
8
	<artifactId>org.gvsig.view3d.app.lin.x86_64</artifactId>
9
	<name>org.gvsig.view3d.app.lin.x86_64</name>
10
  
11
  <properties>
12
    <gvsig.package.info.operatingSystem>lin</gvsig.package.info.operatingSystem>
13
    <gvsig.package.info.architecture>x86_64</gvsig.package.info.architecture>
14
  </properties>
15

  
16
	<dependencyManagement>
17
		<dependencies>
18
			<dependency>
19
				<groupId>org.jogamp.jogl</groupId>
20
				<artifactId>jogl-all</artifactId>
21
				<version>2.2.1</version>
22
				<classifier>natives-linux-amd64</classifier>
23
				<scope>runtime</scope>
24
			</dependency>
25
			<dependency>
26
				<groupId>org.jogamp.gluegen</groupId>
27
				<artifactId>gluegen-rt</artifactId>
28
				<version>2.2.1</version>
29
				<classifier>natives-linux-amd64</classifier>
30
				<scope>runtime</scope>
31
			</dependency>
32
		</dependencies>
33
	</dependencyManagement>
34

  
35
	<dependencies>
36
		<dependency>
37
			<groupId>org.gvsig</groupId>
38
			<artifactId>org.gvsig.view3d.app.common</artifactId>
39
		</dependency>
40
		<dependency>
41
			<groupId>org.jogamp.jogl</groupId>
42
			<artifactId>jogl-all</artifactId>
43
			<classifier>natives-linux-amd64</classifier>
44
		</dependency>
45
		<dependency>
46
			<groupId>org.jogamp.gluegen</groupId>
47
			<artifactId>gluegen-rt</artifactId>
48
			<classifier>natives-linux-amd64</classifier>
49
		</dependency>
50
	</dependencies>
51

  
52
	<build>
53
		<plugins>
54
			<plugin>
55
				<groupId>org.apache.maven.plugins</groupId>
56
				<artifactId>maven-dependency-plugin</artifactId>
57
				<executions>
58
					<execution>
59
						<id>unpack</id>
60
						<phase>process-sources</phase>
61
						<goals>
62
							<goal>unpack</goal>
63
						</goals>
64
						<configuration>
65
							<artifactItems>
66
								<artifactItem>
67
									<groupId>org.gvsig</groupId>
68
									<artifactId>org.gvsig.view3d.app.common</artifactId>
69
									<type>zip</type>
70
									<overWrite>true</overWrite>
71
									<outputDirectory>target</outputDirectory>
72
								</artifactItem>
73
							</artifactItems>
74
						</configuration>
75
					</execution>
76
				</executions>
77
			</plugin>
78
		</plugins>
79
	</build>
80

  
81
	<!-- The profiles only configure the automatic deploy of gvSIG plugin in 
82
		the gvSIG configured in HOME/.gvsig-devel.properties -->
83
	<profiles>
84

  
85
		<profile>
86
			<id>gvsig-plugin-install-view3d-linux-x86_64</id>
87
			<activation>
88
				<os>
89
					<family>unix</family>
90
					<name>linux</name>
91
					<arch>x86_64</arch>
92
				</os>
93
			</activation>
94
			<properties>
95
				<gvsig.install.plugin>true</gvsig.install.plugin>
96
			</properties>
97
		</profile>
98

  
99
		<profile>
100
			<id>gvsig-plugin-install-view3d-linux-amd64</id>
101
			<activation>
102
				<os>
103
					<family>unix</family>
104
					<name>linux</name>
105
					<arch>amd64</arch>
106
				</os>
107
			</activation>
108
			<properties>
109
				<gvsig.install.plugin>true</gvsig.install.plugin>
110
			</properties>
111
		</profile>
112

  
113
	</profiles>
114
</project>
2.1/tags/org.gvsig.view3d-1.0.21/org.gvsig.view3d.app/org.gvsig.view3d.app.win.x86/buildNumber.properties
1
#Wed Aug 03 22:25:34 CEST 2016
2
buildNumber=25
2.1/tags/org.gvsig.view3d-1.0.21/org.gvsig.view3d.app/org.gvsig.view3d.app.win.x86/src/main/assembly/gvsig-plugin-package.xml
1
<!-- gvSIG. Desktop Geographic Information System. Copyright (C) 2007-2013
2
	gvSIG Association. This program is free software; you can redistribute it
3
	and/or modify it under the terms of the GNU General Public License as published
4
	by the Free Software Foundation; either version 3 of the License, or (at
5
	your option) any later version. This program is distributed in the hope that
6
	it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
7
	of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
8
	Public License for more details. You should have received a copy of the GNU
9
	General Public License along with this program; if not, write to the Free
10
	Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
11
	USA. For any additional information, do not hesitate to contact us at info
12
	AT gvsig.com, or visit our website www.gvsig.com. -->
13
<assembly>
14
	<id>gvsig-plugin-package</id>
15
	<formats>
16
		<format>zip</format>
17
	</formats>
18
	<baseDirectory>${project.parent.artifactId}</baseDirectory>
19
	<includeBaseDirectory>true</includeBaseDirectory>
20
	<files>
21
		<file>
22
			<source>target/${project.artifactId}-${project.version}.jar</source>
23
			<outputDirectory>lib</outputDirectory>
24
		</file>
25
		<file>
26
			<source>target/package.info</source>
27
		</file>
28
	</files>
29

  
30
	<fileSets>
31
		<fileSet>
32
			<directory>src/main/resources-plugin</directory>
33
			<outputDirectory>.</outputDirectory>
34
		</fileSet>
35
		<fileSet>
36
			<directory>target/org.gvsig.view3d.app.common</directory>
37
			<outputDirectory>.</outputDirectory>
38
			<excludes>
39
				<exclude>package.info</exclude>
40
			</excludes>
41
		</fileSet>
42
		<fileSet>
43
			<directory>target/jogamp-rt</directory>
44
			<outputDirectory>./jogamp-rt</outputDirectory>
45
		</fileSet>
46
	</fileSets>
47

  
48

  
49
	<dependencySets>
50
		<dependencySet>
51
			<useProjectArtifact>false</useProjectArtifact>
52
			<useTransitiveDependencies>false</useTransitiveDependencies>
53
			<outputDirectory>lib</outputDirectory>
54
			<includes>
55
				<include>org.gvsig:org.gvsig.view3d.app.common</include>
56
				<include>org.jogamp.jogl:jogl-all</include>
57
				<include>org.jogamp.gluegen:gluegen-rt</include>
58
			</includes>
59
		</dependencySet>
60
	</dependencySets>
61

  
62
</assembly>
2.1/tags/org.gvsig.view3d-1.0.21/org.gvsig.view3d.app/org.gvsig.view3d.app.win.x86/src/main/resources-plugin/autorun.sh
1
#!/bin/sh
2
#
3
# gvSIG. Desktop Geographic Information System.
4
#
5
# Copyright (C) 2007-2013 gvSIG Association.
6
#
7
# This program is free software; you can redistribute it and/or
8
# modify it under the terms of the GNU General Public License
9
# as published by the Free Software Foundation; either version 3
10
# of the License, or (at your option) any later version.
11
#
12
# This program is distributed in the hope that it will be useful,
13
# but WITHOUT ANY WARRANTY; without even the implied warranty of
14
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15
# GNU General Public License for more details.
16
#
17
# You should have received a copy of the GNU General Public License
18
# along with this program; if not, write to the Free Software
19
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
20
# MA  02110-1301, USA.
21
#
22
# For any additional information, do not hesitate to contact us
23
# at info AT gvsig.com, or visit our website www.gvsig.com.
24
#
25

  
26

  
27
#
28
# Plugin autorun
29
#
30

  
31
PLUGIN_NAME=$(basename "$PLUGIN_FOLDER")
32

  
33
jogamp_init() {
34

  
35
    JOGAMP_RT="$PLUGIN_FOLDER/jogamp-rt"
36
    add_library_path "$JOGAMP_RT"
37

  
38
    list_shared_library_dependencies "$JOGAMP_RT/gluegen-rt.dll"
39
    list_shared_library_dependencies "$JOGAMP_RT/jogl_desktop.dll"
40
}
41

  
42
jogamp_init
2.1/tags/org.gvsig.view3d-1.0.21/org.gvsig.view3d.app/org.gvsig.view3d.app.win.x86/pom.xml
1
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
2
	<modelVersion>4.0.0</modelVersion>
3
	<parent>
4
		<groupId>org.gvsig</groupId>
5
		<artifactId>org.gvsig.view3d.app</artifactId>
6
		<version>1.0.21</version>
7
	</parent>
8
	<artifactId>org.gvsig.view3d.app.win.x86</artifactId>
9
	<name>org.gvsig.view3d.app.win.x86</name>
10

  
11
  <properties>
12
    <gvsig.package.info.operatingSystem>win</gvsig.package.info.operatingSystem>
13
    <gvsig.package.info.architecture>x86</gvsig.package.info.architecture>
14
  </properties>
15

  
16
	<dependencyManagement>
17
		<dependencies>
18
			<dependency>
19
				<groupId>org.jogamp.jogl</groupId>
20
				<artifactId>jogl-all</artifactId>
21
				<version>2.2.1</version>
22
				<classifier>natives-windows-i586</classifier>
23
				<scope>runtime</scope>
24
			</dependency>
25
			<dependency>
26
				<groupId>org.jogamp.gluegen</groupId>
27
				<artifactId>gluegen-rt</artifactId>
28
				<version>2.2.1</version>
29
				<classifier>natives-windows-i586</classifier>
30
				<scope>runtime</scope>
31
			</dependency>
32
		</dependencies>
33
	</dependencyManagement>
34

  
35
	<dependencies>
36
		<dependency>
37
			<groupId>org.gvsig</groupId>
38
			<artifactId>org.gvsig.view3d.app.common</artifactId>
39
		</dependency>
40
		<dependency>
41
			<groupId>org.jogamp.jogl</groupId>
42
			<artifactId>jogl-all</artifactId>
43
			<classifier>natives-windows-i586</classifier>
44
		</dependency>
45
		<dependency>
46
			<groupId>org.jogamp.gluegen</groupId>
47
			<artifactId>gluegen-rt</artifactId>
48
			<classifier>natives-windows-i586</classifier>
49
		</dependency>
50
	</dependencies>
51

  
52
	<build>
53
        <plugins>
54
            <plugin>
55
                <groupId>org.apache.maven.plugins</groupId>
56
                <artifactId>maven-dependency-plugin</artifactId>
57
                <executions>
58
                    <execution>
59
                        <id>unpack</id>
60
                        <phase>process-sources</phase>
61
                        <goals>
62
                            <goal>unpack</goal>
63
                        </goals>
64
                        <configuration>
65
                            <artifactItems>
66
                                <artifactItem>
67
                                    <groupId>org.gvsig</groupId>
68
                                    <artifactId>org.gvsig.view3d.app.common</artifactId>
69
                                    <type>zip</type>
70
                                    <overWrite>true</overWrite>
71
                                    <outputDirectory>target</outputDirectory>
72
                                </artifactItem>
73
                                <artifactItem>
74
                                    <groupId>org.jogamp.gluegen</groupId>
75
                                    <artifactId>gluegen-rt</artifactId>
76
                                    <classifier>natives-windows-i586</classifier>
77
                                    <type>jar</type>
78
                                    <overWrite>true</overWrite>
79
                                    <outputDirectory>target/jogamp-rt</outputDirectory>
80
                                </artifactItem>
81
                                <artifactItem>
82
                                    <groupId>org.jogamp.jogl</groupId>
83
                                    <artifactId>jogl-all</artifactId>
84
                                    <classifier>natives-windows-i586</classifier>
85
                                    <type>jar</type>
86
                                    <overWrite>true</overWrite>
87
                                    <outputDirectory>target/jogamp-rt</outputDirectory>
88
                                </artifactItem>
89
                            </artifactItems>
90
                        </configuration>
91
                    </execution>
92
                </executions>
93
            </plugin>
94
        </plugins>
95
    </build>
96

  
97
	<!-- The profiles only configure the automatic deploy of gvSIG plugin in
98
		the gvSIG configured in HOME/.gvsig-devel.properties -->
99
	<profiles>
100

  
101
		<profile>
102
			<id>gvsig-plugin-install-view3d-windows-x86</id>
103
			<activation>
104
				<os>
105
					<family>windows</family>
106
					<arch>x86</arch>
107
				</os>
108
			</activation>
109
			<properties>
110
				<gvsig.install.plugin>true</gvsig.install.plugin>
111
			</properties>
112
		</profile>
113

  
114
		<profile>
115
			<id>gvsig-plugin-install-view3d-windows-i586</id>
116
			<activation>
117
				<os>
118
					<family>windows</family>
119
					<arch>i586</arch>
120
				</os>
121
			</activation>
122
			<properties>
123
				<gvsig.install.plugin>true</gvsig.install.plugin>
124
			</properties>
125
		</profile>
126

  
127
	</profiles>
128

  
129
</project>
2.1/tags/org.gvsig.view3d-1.0.21/org.gvsig.view3d.app/org.gvsig.view3d.app.lin.x86/buildNumber.properties
1
#Wed Aug 03 22:25:32 CEST 2016
2
buildNumber=25
2.1/tags/org.gvsig.view3d-1.0.21/org.gvsig.view3d.app/org.gvsig.view3d.app.lin.x86/src/main/assembly/gvsig-plugin-package.xml
1
<!-- gvSIG. Desktop Geographic Information System. Copyright (C) 2007-2013 
2
	gvSIG Association. This program is free software; you can redistribute it 
3
	and/or modify it under the terms of the GNU General Public License as published 
4
	by the Free Software Foundation; either version 3 of the License, or (at 
5
	your option) any later version. This program is distributed in the hope that 
6
	it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty 
7
	of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General 
8
	Public License for more details. You should have received a copy of the GNU 
9
	General Public License along with this program; if not, write to the Free 
10
	Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 
11
	USA. For any additional information, do not hesitate to contact us at info 
12
	AT gvsig.com, or visit our website www.gvsig.com. -->
13
<assembly>
14
	<id>gvsig-plugin-package</id>
15
	<formats>
16
		<format>zip</format>
17
	</formats>
18
	<baseDirectory>${project.parent.artifactId}</baseDirectory>
19
	<includeBaseDirectory>true</includeBaseDirectory>
20
	<files>
21
		<file>
22
			<source>target/${project.artifactId}-${project.version}.jar</source>
23
			<outputDirectory>lib</outputDirectory>
24
		</file>
25
		<file>
26
			<source>target/package.info</source>
27
		</file>
28
	</files>
29

  
30
	<fileSets>
31
		<fileSet>
32
			<directory>src/main/resources-plugin</directory>
33
			<outputDirectory>.</outputDirectory>
34
		</fileSet>
35
		<fileSet>
36
			<directory>target/org.gvsig.view3d.app.common</directory>
37
			<outputDirectory>.</outputDirectory>
38
			<excludes>
39
				<exclude>package.info</exclude>
40
			</excludes>
41
		</fileSet>
42
	</fileSets>
43

  
44

  
45
	<dependencySets>
46
		<dependencySet>
47
			<useProjectArtifact>false</useProjectArtifact>
48
			<useTransitiveDependencies>false</useTransitiveDependencies>
49
			<outputDirectory>lib</outputDirectory>
50
			<includes>
51
				<include>org.gvsig:org.gvsig.view3d.app.common</include>
52
				<include>org.jogamp.jogl:jogl-all</include>
53
				<include>org.jogamp.gluegen:gluegen-rt</include>
54
			</includes>
55
		</dependencySet>
56
	</dependencySets>
57

  
58
</assembly>
2.1/tags/org.gvsig.view3d-1.0.21/org.gvsig.view3d.app/org.gvsig.view3d.app.lin.x86/pom.xml
1
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
2
  <modelVersion>4.0.0</modelVersion>
3
  <parent>
4
    <groupId>org.gvsig</groupId>
5
    <artifactId>org.gvsig.view3d.app</artifactId>
6
    <version>1.0.21</version>
7
  </parent>
8
  <artifactId>org.gvsig.view3d.app.lin.x86</artifactId>
9
  <name>org.gvsig.view3d.app.lin.x86</name>
10
  
11
   <properties>
12
    <gvsig.package.info.operatingSystem>lin</gvsig.package.info.operatingSystem>
13
    <gvsig.package.info.architecture>x86</gvsig.package.info.architecture>
14
   </properties>
15
  
16
  <dependencyManagement>
17
    <dependencies>
18
        <dependency>
19
            <groupId>org.jogamp.jogl</groupId>
20
            <artifactId>jogl-all</artifactId>
21
            <version>2.2.1</version>
22
            <classifier>natives-linux-i586</classifier>
23
            <scope>runtime</scope>
24
        </dependency>
25
        <dependency>
26
            <groupId>org.jogamp.gluegen</groupId>
27
            <artifactId>gluegen-rt</artifactId>
28
            <version>2.2.1</version>
29
            <classifier>natives-linux-i586</classifier>
30
            <scope>runtime</scope>
31
        </dependency>
32
    </dependencies>
33
  </dependencyManagement>
34
  
35
  <dependencies>
36
    <dependency>
37
        <groupId>org.jogamp.jogl</groupId>
38
        <artifactId>jogl-all</artifactId>
39
        <classifier>natives-linux-i586</classifier>
40
    </dependency>
41
    <dependency>
42
        <groupId>org.jogamp.gluegen</groupId>
43
        <artifactId>gluegen-rt</artifactId>
44
        <classifier>natives-linux-i586</classifier>
45
    </dependency>
46
    <dependency>
47
        <groupId>org.gvsig</groupId>
48
        <artifactId>org.gvsig.view3d.app.common</artifactId>
49
    </dependency>
50
  </dependencies>
51
  
52
  <build>
53
        <plugins>
54
            <plugin>
55
                <groupId>org.apache.maven.plugins</groupId>
56
                <artifactId>maven-dependency-plugin</artifactId>
57
                <executions>
58
                    <execution>
59
                        <id>unpack</id>
60
                        <phase>process-sources</phase>
61
                        <goals>
62
                            <goal>unpack</goal>
63
                        </goals>
64
                        <configuration>
65
                            <artifactItems>
66
                                <artifactItem>
67
                                    <groupId>org.gvsig</groupId>
68
                                    <artifactId>org.gvsig.view3d.app.common</artifactId>
69
                                    <type>zip</type>
70
                                    <overWrite>true</overWrite>
71
                                    <outputDirectory>target</outputDirectory>
72
                                </artifactItem>
73
                            </artifactItems>
74
                        </configuration>
75
                    </execution>
76
                </executions>
77
            </plugin>
78
        </plugins>
79
    </build>
80
  
81
  <!-- 
82
  The profiles only configure the automatic deploy of gvSIG plugin in the gvSIG
83
  configured in HOME/.gvsig-devel.properties
84
  -->
85
  <profiles>
86
  
87
    <profile>
88
      <id>gvsig-plugin-install-view3d-linux-x86</id>
89
      <activation>
90
         <os>
91
             <family>unix</family>
92
             <name>linux</name>
93
             <arch>x86</arch>
94
         </os>
95
      </activation>
96
        <properties>
97
          <gvsig.install.plugin>true</gvsig.install.plugin>
98
        </properties>
99
    </profile>
100

  
101
    <profile>
102
      <id>gvsig-plugin-install-view3d-linux-i586</id>
103
      <activation>
104
         <os>
105
             <family>unix</family>
106
             <name>linux</name>
107
             <arch>i586</arch>
108
         </os>
109
      </activation>
110
      <properties>
111
         <gvsig.install.plugin>true</gvsig.install.plugin>
112
      </properties>
113
    </profile>
114

  
115
  </profiles>
116
</project>
2.1/tags/org.gvsig.view3d-1.0.21/org.gvsig.view3d.app/pom.xml
1
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
2
	<modelVersion>4.0.0</modelVersion>
3
	<parent>
4
		<groupId>org.gvsig</groupId>
5
		<artifactId>org.gvsig.view3d</artifactId>
6
		<version>1.0.21</version>
7
	</parent>
8
	<artifactId>org.gvsig.view3d.app</artifactId>
9
	<packaging>pom</packaging>
10
	<name>org.gvsig.view3d.app</name>
11

  
12
	<properties>
13
    <gvsig.package.info.code>org.gvsig.view3d.app</gvsig.package.info.code>
14
	  <gvsig.install.plugin>false</gvsig.install.plugin>
15
    <gvsig.package.info.state>testing</gvsig.package.info.state>
16
    <gvsig.package.info.official>true</gvsig.package.info.official>
17
    <gvsig.package.info.name>3D View</gvsig.package.info.name>
18
    <gvsig.package.info.categories>3D</gvsig.package.info.categories>
19
    <gvsig.package.info.description>3D View: allows user to create 3D views from 2D views</gvsig.package.info.description>
20
    <gvsig.package.info.dependencies>required: org.gvsig.app.mainplugin -ge 2.2.0</gvsig.package.info.dependencies>
21
    <gvsig.package.info.javaVM>j1_6</gvsig.package.info.javaVM>
22
    <svn.tags.folder>https://devel.gvsig.org/svn/gvsig-3d/2.1/tags/</svn.tags.folder>
23
    <gvsig.package.info.poolURL>https://devel.gvsig.org/download/projects/gvsig-3d/pool/</gvsig.package.info.poolURL>
24
	</properties>
25

  
26
	<modules>
27
		<module>org.gvsig.view3d.app.common</module>
28
		<module>org.gvsig.view3d.app.lin.x86</module>
29
		<module>org.gvsig.view3d.app.lin.x86_64</module>
30
		<module>org.gvsig.view3d.app.win.x86</module>
31
		<module>org.gvsig.view3d.app.win.x86_64</module>
32
	</modules>
33
</project>
2.1/tags/org.gvsig.view3d-1.0.21/org.gvsig.view3d.app/org.gvsig.view3d.app.common/src/main/java/org/gvsig/view3d/app/properties/General3DPreferencePage.java
1
package org.gvsig.view3d.app.properties;
2

  
3
import java.awt.BorderLayout;
4
import java.io.File;
5

  
6
import javax.swing.ImageIcon;
7
import javax.swing.JPanel;
8

  
9
import org.gvsig.andami.IconThemeHelper;
10
import org.gvsig.andami.PluginServices;
11
import org.gvsig.andami.PluginsLocator;
12
import org.gvsig.andami.PluginsManager;
13
import org.gvsig.andami.preferences.AbstractPreferencePage;
14
import org.gvsig.andami.preferences.StoreException;
15
import org.gvsig.tools.ToolsLocator;
16
import org.gvsig.tools.dynobject.DynObject;
17
import org.gvsig.tools.i18n.I18nManager;
18
import org.gvsig.view3d.swing.api.View3DSwingLocator;
19
import org.gvsig.view3d.swing.api.View3DSwingManager;
20
import org.gvsig.view3d.swing.api.properties.GeneralProperties3D;
21
import org.gvsig.view3d.swing.api.properties.GeneralProperties3DPanel;
22

  
23
public class General3DPreferencePage extends AbstractPreferencePage {
24

  
25
    private static final long serialVersionUID = -3384416698766077019L;
26

  
27
    public static final String ID = General3DPreferencePage.class.getName();
28

  
29
    private GeneralProperties3DPanel propertiesPanel;
30
    private DynObject pluginProperties;
31
    private PluginServices plugin;
32

  
33
    public General3DPreferencePage() {
34
        initComponents();
35
    }
36

  
37
    private void initComponents() {
38
        PluginsManager pluginManager = PluginsLocator.getManager();
39
        this.plugin = pluginManager.getPlugin(this);
40
        this.pluginProperties = this.plugin.getPluginProperties();
41

  
42
        initializeValues();
43

  
44
        View3DSwingManager swingManager = View3DSwingLocator.getManager();
45
        GeneralProperties3D generalProperties3D =
46
            swingManager.getGeneral3DProperties();
47

  
48
        propertiesPanel =
49
            swingManager.createGeneralProperties3DPanel(generalProperties3D);
50

  
51
        this.setLayout(new BorderLayout());
52
        this.add(propertiesPanel.asJComponent(), BorderLayout.NORTH);
53
    }
54

  
55
    public String getID() {
56
        return ID;
57
    }
58

  
59
    public String getTitle() {
60
        I18nManager i18nManager = ToolsLocator.getI18nManager();
61
        return i18nManager.getTranslation("3D");
62
    }
63

  
64
    public JPanel getPanel() {
65
        return this;
66
    }
67

  
68
    public void initializeValues() {
69
        
70
        View3DSwingManager swingManager = View3DSwingLocator.getManager();
71
        GeneralProperties3D generalProperties3D =
72
            swingManager.getGeneral3DProperties();
73

  
74
        int width =
75
            (Integer) this.pluginProperties.getDynValue("defultViewWidth");
76
        int height =
77
            (Integer) this.pluginProperties.getDynValue("defultViewHeight");
78
        boolean atmosphereVisibility =
79
            (Boolean) this.pluginProperties.getDynValue("atmosphereVisibility");
80
        boolean northIndicatorVisibility =
81
            (Boolean) this.pluginProperties
82
                .getDynValue("northIndicatorVisibility");
83
        boolean minimapVisibility =
84
            (Boolean) this.pluginProperties.getDynValue("minimapVisibility");
85
        boolean starsBackgroundVisibility =
86
            (Boolean) this.pluginProperties
87
                .getDynValue("starsBackgroundVisibility");
88
        boolean scaleVisibility =
89
            (Boolean) this.pluginProperties.getDynValue("scaleVisibility");
90
        boolean viewportAnimation =
91
            (Boolean) this.pluginProperties.getDynValue("viewportAnimation");
92
        String cachePath =
93
            (String) this.pluginProperties.getDynValue("cachePath");
94

  
95
        generalProperties3D.setDefaultViewWidth(width);
96
        generalProperties3D.setDefaultViewHeight(height);
97
        generalProperties3D.setAtmosphereVisibility(atmosphereVisibility);
98
        generalProperties3D.setMinimapVisibility(minimapVisibility);
99
        generalProperties3D
100
            .setNorthIndicatorVisibility(northIndicatorVisibility);
101
        generalProperties3D
102
            .setStarsBackgroundVisibility(starsBackgroundVisibility);
103
        generalProperties3D.setScaleVisibility(scaleVisibility);
104
        generalProperties3D.setViewPortAnimation(viewportAnimation);
105
        
106
        if(cachePath != null){
107
            generalProperties3D.setCachePath(new File(cachePath));
108
        }
109

  
110
        swingManager.setGeneral3DProperties(generalProperties3D);
111
        
112
    }
113

  
114
    public void initializeDefaults() {
115
        
116
    }
117

  
118
    @Override
119
    public boolean isResizeable() {
120
        return true;
121
    }
122

  
123
    public ImageIcon getIcon() {
124
        return IconThemeHelper.getImageIcon("general-properties-view-3d");
125
    }
126

  
127
    public boolean isValueChanged() {
128
        
129
        int width = propertiesPanel.getDefaultWidth();
130
        int heigth = propertiesPanel.getDefaultHeight();
131
        boolean atmosphereVisibility = propertiesPanel.getAtmosphereVisibility();
132
        boolean minimapVisibility = propertiesPanel.getMinimapVisibility();
133
        boolean northIndicatorVisibility = propertiesPanel.getNorthIndicatorVisibility();
134
        boolean scaleVisiblity = propertiesPanel.getScaleVisiblity();
135
        boolean starsBackgroundVisiblity = propertiesPanel.getStarsBackgroundVisiblity();
136
        boolean viewPortAnimation = propertiesPanel.getViewPortAnimation();
137
        String cachePath = propertiesPanel.getCachePath();
138
        
139
        View3DSwingManager swingManager = View3DSwingLocator.getManager();
140
        GeneralProperties3D general3dProperties = swingManager.getGeneral3DProperties();
141

  
142
        if (width != general3dProperties.getDefaultViewWidth()
143
            || heigth != general3dProperties.getDefaultViewHeight()
144
            || atmosphereVisibility != general3dProperties
145
                .getAtmosphereVisibility()
146
            || minimapVisibility != general3dProperties.getMinimapVisibility()
147
            || northIndicatorVisibility != general3dProperties
148
                .getNorthIndicatorVisibility()
149
            || scaleVisiblity != general3dProperties.getScaleVisibility()
150
            || starsBackgroundVisiblity != general3dProperties
151
                .getStarsBackgroundVisibility()
152
            || viewPortAnimation != general3dProperties.getViewPortAnimation()
153
            || !cachePath.equals(general3dProperties.getCachePath()
154
                .getAbsolutePath())) {
155
            
156
            return true;
157
        }
158
        return false;
159
    }
160

  
161
    @Override
162
    public void storeValues() throws StoreException {
163

  
164
        this.pluginProperties.setDynValue("defultViewWidth",
165
            propertiesPanel.getDefaultWidth());
166
        this.pluginProperties.setDynValue("defultViewHeight",
167
            propertiesPanel.getDefaultHeight());
168
        this.pluginProperties.setDynValue("atmosphereVisibility",
169
            propertiesPanel.getAtmosphereVisibility());
170
        this.pluginProperties.setDynValue("minimapVisibility",
171
            propertiesPanel.getMinimapVisibility());
172
        this.pluginProperties.setDynValue("northIndicatorVisibility",
173
            propertiesPanel.getNorthIndicatorVisibility());
174
        this.pluginProperties.setDynValue("starsBackgroundVisibility",
175
            propertiesPanel.getStarsBackgroundVisiblity());
176
        this.pluginProperties.setDynValue("scaleVisibility",
177
            propertiesPanel.getScaleVisiblity());
178
        this.pluginProperties.setDynValue("viewportAnimation",
179
            propertiesPanel.getViewPortAnimation());
180
        this.pluginProperties.setDynValue("cachePath",
181
            propertiesPanel.getCachePath());
182

  
183
        this.plugin.savePluginProperties();
184
    }
185

  
186
    @Override
187
    public void setChangesApplied() {
188

  
189
        View3DSwingManager swingManager = View3DSwingLocator.getManager();
190
        GeneralProperties3D generalProperties3D =
191
            swingManager.getGeneral3DProperties();
192

  
193
        generalProperties3D.setDefaultViewWidth(propertiesPanel
194
            .getDefaultWidth());
195
        generalProperties3D.setDefaultViewHeight(propertiesPanel
196
            .getDefaultHeight());
197
        generalProperties3D.setAtmosphereVisibility(propertiesPanel
198
            .getAtmosphereVisibility());
199
        generalProperties3D.setMinimapVisibility(propertiesPanel
200
            .getMinimapVisibility());
201
        generalProperties3D.setNorthIndicatorVisibility(propertiesPanel
202
            .getNorthIndicatorVisibility());
203
        generalProperties3D.setScaleVisibility(propertiesPanel
204
            .getScaleVisiblity());
205
        generalProperties3D.setStarsBackgroundVisibility(propertiesPanel
206
            .getStarsBackgroundVisiblity());
207
        generalProperties3D.setViewPortAnimation(propertiesPanel
208
            .getViewPortAnimation());
209
        generalProperties3D.setCachePath(new File(propertiesPanel
210
            .getCachePath()));
211

  
212
        swingManager.setGeneral3DProperties(generalProperties3D);
213
    }
214

  
215
}
2.1/tags/org.gvsig.view3d-1.0.21/org.gvsig.view3d.app/org.gvsig.view3d.app.common/src/main/java/org/gvsig/view3d/app/properties/RasterLayerProperties3DPanel.java
1
package org.gvsig.view3d.app.properties;
2

  
3
import java.awt.BorderLayout;
4
import java.awt.Dimension;
5

  
6
import org.gvsig.fmap.mapcontext.layers.FLayer;
7
import org.gvsig.gui.beans.panelGroup.panels.AbstractPanel;
8
import org.gvsig.tools.ToolsLocator;
9
import org.gvsig.tools.i18n.I18nManager;
10
import org.gvsig.view3d.lib.api.View3DLocator;
11
import org.gvsig.view3d.lib.api.View3DManager;
12
import org.gvsig.view3d.lib.api.properties.LayerProperties3D;
13
import org.gvsig.view3d.lib.api.properties.VectorialLayerProperties3D;
14
import org.gvsig.view3d.swing.api.View3DSwingLocator;
15
import org.gvsig.view3d.swing.api.View3DSwingManager;
16
import org.gvsig.view3d.swing.api.properties.LayerProperties3DPanel;
17

  
18
public class RasterLayerProperties3DPanel extends AbstractPanel {
19

  
20
    private static final long serialVersionUID = 5429099827670959087L;
21

  
22
    private LayerProperties3DPanel propertiesPanel;
23
    private LayerProperties3D tmpProperties;
24

  
25
    public RasterLayerProperties3DPanel() {
26
        super();
27
        initialize();
28
    }
29

  
30
    public void accept() {
31
        apply();
32

  
33
        View3DManager manager = View3DLocator.getManager();
34
        manager.setLayerProperties(propertiesPanel.getLayer(), tmpProperties);
35
    }
36

  
37
    public void apply() {
38
        I18nManager i18nManager = ToolsLocator.getI18nManager();
39

  
40
        View3DManager manager = View3DLocator.getManager();
41
        LayerProperties3D layerProperties =
42
            manager.getLayerProperties(propertiesPanel.getLayer());
43

  
44
        layerProperties.setMinLevel(propertiesPanel.getMinLevel());
45
        layerProperties.setMaxLevel(propertiesPanel.getMaxLevel());
46
        layerProperties.setLevelZeroResolutionMultiplier(propertiesPanel
47
            .getResolutionMultiplier());
48
        layerProperties.setTileWidth(propertiesPanel.getTileWidth());
49
        layerProperties.setTileHeight(propertiesPanel.getTileHeight());
50

  
51
        if (propertiesPanel.getLoadMode().equalsIgnoreCase(
52
            i18nManager.getTranslation("elevation"))) {
53

  
54
            layerProperties.setElevation(true);
55

  
56
            if (layerProperties instanceof VectorialLayerProperties3D) {
57
                VectorialLayerProperties3D vectorialProperties =
58
                    (VectorialLayerProperties3D) layerProperties;
59
                vectorialProperties.setElevationField(propertiesPanel
60
                    .getElevationField());
61
            }
62

  
63
            layerProperties.setElevationUnits(propertiesPanel
64
                .getElevationUnits());
65
            layerProperties.setNoDataValue(propertiesPanel.getNoDataValue());
66

  
67
        } else {
68
            if (layerProperties instanceof VectorialLayerProperties3D) {
69
                VectorialLayerProperties3D vectorialProperties =
70
                    (VectorialLayerProperties3D) layerProperties;
71
                vectorialProperties.setRasterized(true);
72
            }
73
            layerProperties.setElevation(false);
74
        }
75
        tmpProperties = layerProperties;
76
    }
77

  
78
    public void cancel() {
79
        this.propertiesPanel = null;
80
    }
81

  
82
    @Override
83
    protected void initialize() {
84
        I18nManager i18nManager = ToolsLocator.getI18nManager();
85
        setLabel(i18nManager.getTranslation("3D"));
86

  
87
        this.setLayout(new BorderLayout());
88
        this.setPreferredSize(new Dimension(100, 80));
89
    }
90

  
91
    public void selected() {
92
    }
93

  
94
    public void setReference(Object ref) {
95
        super.setReference(ref);
96

  
97
        if (ref instanceof FLayer) {
98
            FLayer layer = (FLayer) ref;
99
            View3DSwingManager swingManager = View3DSwingLocator.getManager();
100
            this.propertiesPanel =
101
                swingManager.createLayerProperties3DPanel(layer);
102
            this.add(propertiesPanel.asJComponent(), BorderLayout.CENTER);
103
        }
104
    }
105

  
106
}
2.1/tags/org.gvsig.view3d-1.0.21/org.gvsig.view3d.app/org.gvsig.view3d.app.common/src/main/java/org/gvsig/view3d/app/properties/ViewProperties3DPageFactory.java
1
package org.gvsig.view3d.app.properties;
2

  
3
import org.gvsig.app.project.documents.view.ViewDocument;
4
import org.gvsig.propertypage.PropertiesPage;
5
import org.gvsig.propertypage.PropertiesPageFactory;
6

  
7

  
8
public class ViewProperties3DPageFactory implements PropertiesPageFactory {
9

  
10
    public String getGroupID() {
11
        return ViewDocument.VIEW_PROPERTIES_PAGE_GROUP;
12
    }
13

  
14
    public boolean isVisible(Object obj) {
15
        return true;
16
    }
17

  
18
    public PropertiesPage create(Object obj) {
19
        return new ViewProperties3DPage((ViewDocument) obj);
20
    }
21

  
22
}
2.1/tags/org.gvsig.view3d-1.0.21/org.gvsig.view3d.app/org.gvsig.view3d.app.common/src/main/java/org/gvsig/view3d/app/properties/LayerProperties3DThemeManagerPage.java
1
package org.gvsig.view3d.app.properties;
2

  
3
import java.awt.BorderLayout;
4

  
5
import org.gvsig.app.project.documents.view.legend.gui.AbstractThemeManagerPage;
6
import org.gvsig.fmap.mapcontext.layers.FLayer;
7
import org.gvsig.tools.ToolsLocator;
8
import org.gvsig.tools.i18n.I18nManager;
9
import org.gvsig.view3d.lib.api.View3DLocator;
10
import org.gvsig.view3d.lib.api.View3DManager;
11
import org.gvsig.view3d.lib.api.properties.LayerProperties3D;
12
import org.gvsig.view3d.lib.api.properties.VectorialLayerProperties3D;
13
import org.gvsig.view3d.swing.api.View3DSwingLocator;
14
import org.gvsig.view3d.swing.api.View3DSwingManager;
15
import org.gvsig.view3d.swing.api.properties.LayerProperties3DPanel;
16

  
17
public class LayerProperties3DThemeManagerPage extends AbstractThemeManagerPage {
18

  
19
    private static final long serialVersionUID = 6180306542845960820L;
20

  
21
    private LayerProperties3DPanel propertiesPanel;
22

  
23
    public LayerProperties3DThemeManagerPage() {
24
        super();
25
        initialize();
26
    }
27

  
28
    @Override
29
    public void acceptAction() {
30
        applyAction();
31
    }
32

  
33
    @Override
34
    public void applyAction() {
35

  
36
        I18nManager i18nManager = ToolsLocator.getI18nManager();
37

  
38
        View3DManager manager = View3DLocator.getManager();
39
        LayerProperties3D layerProperties =
40
            manager.getLayerProperties(propertiesPanel.getLayer());
41

  
42
        if (layerProperties instanceof VectorialLayerProperties3D) {
43

  
44
            layerProperties.setMinLevel(propertiesPanel.getMinLevel());
45
            layerProperties.setMaxLevel(propertiesPanel.getMaxLevel());
46
            layerProperties.setLevelZeroResolutionMultiplier(propertiesPanel
47
                .getResolutionMultiplier());
48
            layerProperties.setTileWidth(propertiesPanel.getTileWidth());
49
            layerProperties.setTileHeight(propertiesPanel.getTileHeight());
50

  
51
            if (propertiesPanel.getLoadMode().equalsIgnoreCase(
52
                i18nManager.getTranslation("elevation"))) {
53

  
54
                layerProperties.setElevation(true);
55

  
56
                if (layerProperties instanceof VectorialLayerProperties3D) {
57
                    VectorialLayerProperties3D vectorialProperties =
58
                        (VectorialLayerProperties3D) layerProperties;
59
                    vectorialProperties.setElevationField(propertiesPanel
60
                        .getElevationField());
61
                }
62
                layerProperties.setElevationUnits(propertiesPanel
63
                    .getElevationUnits());
64
                layerProperties
65
                    .setNoDataValue(propertiesPanel.getNoDataValue());
66

  
67
            } else {
68
                if (layerProperties instanceof VectorialLayerProperties3D) {
69
                    VectorialLayerProperties3D vectorialProperties =
70
                        (VectorialLayerProperties3D) layerProperties;
71
                    vectorialProperties.setRasterized(true);
72
                }
73
            }
74
        }
75

  
76
        manager.setLayerProperties(propertiesPanel.getLayer(), layerProperties);
77
    }
78

  
79
    @Override
80
    public void cancelAction() {
81
    }
82

  
83
    @Override
84
    public String getName() {
85
        I18nManager i18nManager = ToolsLocator.getI18nManager();
86
        return i18nManager.getTranslation("3D");
87
    }
88

  
89
    @Override
90
    public int getPriority() {
91
        return 10;
92
    }
93

  
94
    private void initialize() {
95
        this.setLayout(new BorderLayout());
96
    }
97

  
98
    @Override
99
    public void setModel(FLayer layer) {
100

  
101
        View3DSwingManager swingManager = View3DSwingLocator.getManager();
102
        this.propertiesPanel = swingManager.createLayerProperties3DPanel(layer);
103
        this.add(propertiesPanel.asJComponent(), BorderLayout.CENTER);
104

  
105
    }
106

  
107
}
2.1/tags/org.gvsig.view3d-1.0.21/org.gvsig.view3d.app/org.gvsig.view3d.app.common/src/main/java/org/gvsig/view3d/app/properties/ViewProperties3DPage.java
1
package org.gvsig.view3d.app.properties;
2

  
3
import java.awt.BorderLayout;
4
import java.util.List;
5

  
6
import javax.swing.JComponent;
7
import javax.swing.JOptionPane;
8
import javax.swing.JPanel;
9

  
10
import org.gvsig.app.project.documents.view.ViewDocument;
11
import org.gvsig.fmap.mapcontext.MapContext;
12
import org.gvsig.propertypage.PropertiesPage;
13
import org.gvsig.tools.ToolsLocator;
14
import org.gvsig.tools.i18n.I18nManager;
15
import org.gvsig.tools.swing.api.ToolsSwingLocator;
16
import org.gvsig.tools.swing.api.threadsafedialogs.ThreadSafeDialogsManager;
17
import org.gvsig.view3d.swing.api.MapControl3D;
18
import org.gvsig.view3d.swing.api.View3DSwingLocator;
19
import org.gvsig.view3d.swing.api.View3DSwingManager;
20
import org.gvsig.view3d.swing.api.properties.MapControlProperties3D;
21
import org.gvsig.view3d.swing.api.properties.ViewProperties3DPanel;
22

  
23
public class ViewProperties3DPage implements PropertiesPage {
24

  
25
    private ViewDocument viewDocument;
26
    private JPanel panel;
27
    private ViewProperties3DPanel properties3DPanel;
28

  
29
    public ViewProperties3DPage(ViewDocument viewDocument) {
30
        this.viewDocument = viewDocument;
31

  
32
        initialize();
33
    }
34

  
35
    private void initialize() {
36

  
37
        View3DSwingManager swingManager = View3DSwingLocator.getManager();
38
        MapControlProperties3D mapControl3DProperties =
39
            swingManager.getMapControl3DProperties(viewDocument);
40

  
41
        this.properties3DPanel =
42
            swingManager.createViewProperties3DPanel(mapControl3DProperties);
43
        
44
        panel = new JPanel(new BorderLayout());
45
        panel.add(properties3DPanel.asJComponent(), BorderLayout.CENTER);
46
    }
47

  
48
    public JComponent asJComponent() {
49
        return this.panel;
50
    }
51

  
52
    public String getTitle() {
53
        I18nManager i18nManager = ToolsLocator.getI18nManager();
54
        return i18nManager.getTranslation("3D");
55
    }
56

  
57
    public int getPriority() {
58
        return 10;
59
    }
60

  
61
    public boolean whenAccept() {
62
        whenApply();
63
        return true;
64
    }
65

  
66
    public boolean whenApply() {
67
        
68
        double sphereVerticalExaggeration =
69
            this.properties3DPanel.getSphereVerticalExaggeration();
70
        double flatVerticalExaggeration =
71
            this.properties3DPanel.getFlatVerticalExaggeration();
72
        boolean autoLayerSynchronize =
73
            this.properties3DPanel.getAutoLayerSynchronize();
74
        boolean autoViewPortSynchronize =
75
            this.properties3DPanel.getAutoViewPortSynchronize();
76
        boolean showBlueMarble = this.properties3DPanel.getShowBlueMarble();
77
        boolean showNasaLandsat = this.properties3DPanel.getShowNasaLandsat();
78
        boolean showDefaultElevation =
79
            this.properties3DPanel.getShowDefaultElevation();
80
        boolean anaglyphMode = this.properties3DPanel.getAnaglyphMode();
81
        
82
        View3DSwingManager swingManager = View3DSwingLocator.getManager();
83
        MapControlProperties3D mapControl3DProperties =
84
            swingManager.getMapControl3DProperties(viewDocument);
85
        
86
        mapControl3DProperties
87
            .setSphereVerticalExaggeration(sphereVerticalExaggeration);
88
        mapControl3DProperties
89
            .setFlatVerticalExaggeration(flatVerticalExaggeration);
90
        mapControl3DProperties.setAutoLayerSynchronize(autoLayerSynchronize);
91
        mapControl3DProperties.setAutoViewPortSynchronize(autoViewPortSynchronize);
92
        mapControl3DProperties.setBlueMarbleLayerVisibility(showBlueMarble);
93
        mapControl3DProperties.setNasaLandsatVisibility(showNasaLandsat);
94
        mapControl3DProperties
95
            .setDefaultElevationVisibility(showDefaultElevation);
96
        
97
        if (mapControl3DProperties.getAnaglyphMode() != anaglyphMode) {
98
            // Check if there are view 3d created.
99
            List<MapControl3D> mapControls3D =
100
                View3DSwingLocator.getManager().getMapControl3D(viewDocument);
101
            if (!mapControls3D.isEmpty()) {
102
                // Info user that it is necessary to reopen 3d views.
103
                ThreadSafeDialogsManager dialogsManager =
104
                    ToolsSwingLocator.getThreadSafeDialogsManager();
105
                I18nManager i18nManager = ToolsLocator.getI18nManager();
106
                String message = null;
107
                if (anaglyphMode) {
108
                    message =
109
                        i18nManager
110
                            .getTranslation("close_and_re-create_3D_views_to_active_anagliph_mode");
111
                } else {
112
                    message =
113
                        i18nManager
114
                            .getTranslation("close_and_re-create_3D_views_to_desactive_anagliph_mode");
115
                }
116
                dialogsManager.messageDialog(message, i18nManager.getTranslation("warning"),
117
                    JOptionPane.WARNING_MESSAGE);
118
            }
119
            mapControl3DProperties.setAnaglyphMode(anaglyphMode);
120
        }
121
        
122
        swingManager.setMapControlProperties3D(viewDocument, mapControl3DProperties);
123
        return true;
124
    }
125

  
126
    public boolean whenCancel() {
127
        return true;
128
    }
129

  
130
}
2.1/tags/org.gvsig.view3d-1.0.21/org.gvsig.view3d.app/org.gvsig.view3d.app.common/src/main/java/org/gvsig/view3d/app/mainplugin/View3DExtension.java
1
/**
2
 * gvSIG. Desktop Geographic Information System.
3
 *
4
 * Copyright ? 2007-2015 gvSIG Association
5
 *
6
 * This program is free software; you can redistribute it and/or
7
 * modify it under the terms of the GNU General Public License
8
 * as published by the Free Software Foundation; either version 2
9
 * of the License, or (at your option) any later version.
10
 *
11
 * This program is distributed in the hope that it will be useful,
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 * GNU General Public License for more details.
15
 *
16
 * You should have received a copy of the GNU General Public License
17
 * along with this program; if not, write to the Free Software
18
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19
 * MA  02110-1301, USA.
20
 *
21
 * For any additional information, do not hesitate to contact us
22
 * at info AT gvsig.com, or visit our website www.gvsig.com.
23
 */
24

  
25
package org.gvsig.view3d.app.mainplugin;
26

  
27
import org.gvsig.andami.IconThemeHelper;
28
import org.gvsig.andami.plugins.Extension;
29
import org.gvsig.app.ApplicationLocator;
30
import org.gvsig.app.ApplicationManager;
31
import org.gvsig.app.project.documents.view.ViewDocument;
32
import org.gvsig.app.project.documents.view.gui.IView;
33
import org.gvsig.app.project.documents.view.legend.gui.ThemeManagerWindow;
34
import org.gvsig.fmap.mapcontext.layers.ExtendedPropertiesSupport;
35
import org.gvsig.fmap.mapcontext.layers.vectorial.FLyrVect;
36
import org.gvsig.fmap.mapcontrol.MapControlLocator;
37
import org.gvsig.propertypage.PropertiesPageManager;
38
import org.gvsig.tools.ToolsLocator;
39
import org.gvsig.tools.extensionpoint.ExtensionPoint;
40
import org.gvsig.tools.extensionpoint.ExtensionPointManager;
41
import org.gvsig.tools.i18n.I18nManager;
42
import org.gvsig.tools.observer.Notification;
43
import org.gvsig.tools.observer.Observable;
44
import org.gvsig.tools.observer.Observer;
45
import org.gvsig.view3d.app.properties.General3DPreferencePage;
46
import org.gvsig.view3d.app.properties.LayerProperties3DThemeManagerPage;
47
import org.gvsig.view3d.app.properties.RasterLayerProperties3DPanel;
48
import org.gvsig.view3d.app.properties.ViewProperties3DPageFactory;
49
import org.gvsig.view3d.swing.api.MapControl3D;
50
import org.gvsig.view3d.swing.api.View3DPanel;
51
import org.gvsig.view3d.swing.api.View3DSwingLocator;
52
import org.gvsig.view3d.swing.api.View3DSwingManager;
53
import org.gvsig.view3d.swing.api.View3DSwingManager.TYPE;
54

  
55
/**
56
 * @author <a href="mailto:lmarques@disid.com">Lluis Marques</a>
57
 *
58
 */
59
public class View3DExtension extends Extension implements Observer {
60

  
61
    public void initialize() {
62
        // Register general 3D properties
63
        I18nManager i18nManager = ToolsLocator.getI18nManager();
64
        ExtensionPointManager extensionPoints =ToolsLocator.getExtensionPointManager();
65
        ExtensionPoint ep = extensionPoints.add("AplicationPreferences", "");
66
        ep.append(i18nManager.getTranslation("3D"), "", new General3DPreferencePage());
67
        
68
        // Register vectorial layer 3D properties panel
69
        ThemeManagerWindow.addPage(LayerProperties3DThemeManagerPage.class);
70
        ThemeManagerWindow.setTabEnabledForLayer(
71
            LayerProperties3DThemeManagerPage.class, FLyrVect.class, true);
72
        
73
        // Regsiter raster layer 3D properties panel
74
        ExtensionPoint point = extensionPoints.get("RasterSEPropertiesDialog");
75
        if (point != null) {
76
            point.append("3D", "3D Raster properties panel",
77
                RasterLayerProperties3DPanel.class);
78
        }
79
        
80
        // Regsiter view properties
81
        PropertiesPageManager manager = MapControlLocator.getPropertiesPageManager();
82
        manager.registerFactory(new ViewProperties3DPageFactory());
83
        
84
        registerIcons();
85
    }
86

  
87
    private void registerIcons() {
88
        IconThemeHelper.registerIcon("view3d", "spherical-view-3d", this);
89
        IconThemeHelper.registerIcon("view3d", "flat-view-3d", this);
90
        IconThemeHelper.registerIcon("view3d", "general-properties-view-3d", this);
91
    }
92

  
93
    public void execute(String actionCommand) {
94

  
95
        TYPE type = getType(actionCommand);
96

  
97
        IView view = getActiveView();
98

  
99
        if (view != null && type != null) {
100
            View3DSwingManager manager = View3DSwingLocator.getManager();
101

  
102
            ViewDocument viewDocument = view.getViewDocument();
103
            MapControl3D mapControl3D =
104
                manager.getMapControl3D(
105
                    (ExtendedPropertiesSupport) viewDocument, type);
106
            if (mapControl3D == null || mapControl3D.getType() != type) {
107
                View3DPanel view3DPanel =
108
                    manager.createView3DPanel(view.getMapControl()
109
                        .getMapContext(), viewDocument.getName(), type,
110
                        (ExtendedPropertiesSupport) viewDocument);
111
                view3DPanel.getMapControl3D().addObserver(this);
112
                view3DPanel.show();
113
            }
114
        }
115
    }
116

  
117
    private TYPE getType(String actionCommand) {
118
        if ("spherical-view-3d".equals(actionCommand)) {
119
            return TYPE.SPHERE;
120
        } else if ("flat-view-3d".equals(actionCommand)) {
121
            return TYPE.FLAT;
122
        }
123
        return null;
124
    }
125

  
126
    public boolean isEnabled() {
127
        return true;
128
    }
129

  
130
    public boolean isVisible() {
131
        return true;
132
    }
133

  
134
    @Override
135
    public boolean isEnabled(String actionCommand) {
136

  
137
        IView view = getActiveView();
138
        if (view != null
139
            && ("spherical-view-3d".equals(actionCommand) || "flat-view-3d"
140
                .equals(actionCommand))) {
141

  
142
            View3DSwingManager manager = View3DSwingLocator.getManager();
143
            TYPE type = getType(actionCommand);
144

  
145
            if (type != null) {
146
                MapControl3D mapControl3D =
147
                    manager.getMapControl3D(
148
                        (ExtendedPropertiesSupport) view.getViewDocument(),
149
                        getType(actionCommand));
150

  
151
                if (mapControl3D == null) {
152
                    return true;
153
                }
154
            }
155
        }
156
        return false;
157
    }
158

  
159
    @Override
160
    public boolean isVisible(String actionCommand) {
161
        IView view = getActiveView();
162
        if (view != null) {
163
            return true;
164
        }
165
        return false;
166
    }
167

  
168
    private IView getActiveView() {
169
        ApplicationManager application = ApplicationLocator.getManager();
170
        IView view = (IView) application.getActiveComponent(ViewDocument.class);
171
        return view;
172
    }
173

  
174
    @Override
175
    public boolean canQueryByAction() {
176
        return true;
177
    }
178

  
179
    public void update(Observable observable, Object notification) {
180
        if (observable instanceof MapControl3D
181
            && notification instanceof Notification) {
182

  
183
            Notification n = (Notification) notification;
184
            if (n.getType().equalsIgnoreCase(
185
                MapControl3D.AFTER_DISPOSE_MAPCONTEX3D_NOTIFICATION)) {
186
                ApplicationManager appManager = ApplicationLocator.getManager();
187
                appManager.refreshMenusAndToolBars();
188
            }
189
        }
190

  
191
    }
192
}
2.1/tags/org.gvsig.view3d-1.0.21/org.gvsig.view3d.app/org.gvsig.view3d.app.common/src/main/java/org/gvsig/view3d/app/mainplugin/SynchronizeViewPort3DExtension.java
1
package org.gvsig.view3d.app.mainplugin;
2

  
3
import java.util.List;
4

  
5
import org.gvsig.andami.IconThemeHelper;
6
import org.gvsig.andami.plugins.Extension;
7
import org.gvsig.app.ApplicationLocator;
8
import org.gvsig.app.ApplicationManager;
9
import org.gvsig.app.project.documents.view.ViewDocument;
10
import org.gvsig.app.project.documents.view.gui.IView;
11
import org.gvsig.fmap.mapcontext.layers.ExtendedPropertiesSupport;
12
import org.gvsig.view3d.swing.api.MapControl3D;
13
import org.gvsig.view3d.swing.api.View3DSwingLocator;
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff