Revision 702

View differences:

2.1/tags/org.gvsig.view3d-1.0.22/org.gvsig.view3d.app/org.gvsig.view3d.app.win.x86_64/buildNumber.properties
1
#Thu Aug 04 10:54:43 CEST 2016
2
buildNumber=26
2.1/tags/org.gvsig.view3d-1.0.22/org.gvsig.view3d.app/org.gvsig.view3d.app.win.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
		<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.22/org.gvsig.view3d.app/org.gvsig.view3d.app.win.x86_64/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.22/org.gvsig.view3d.app/org.gvsig.view3d.app.win.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.22</version>
7
	</parent>
8
	<artifactId>org.gvsig.view3d.app.win.x86_64</artifactId>
9
	<name>org.gvsig.view3d.app.win.x86_64</name>
10

  
11
  <properties>
12
    <gvsig.package.info.operatingSystem>win</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-windows-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-windows-amd64</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-windows-amd64</classifier>
40
		</dependency>
41
		<dependency>
42
			<groupId>org.jogamp.gluegen</groupId>
43
			<artifactId>gluegen-rt</artifactId>
44
			<classifier>natives-windows-amd64</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
                                <artifactItem>
74
                                    <groupId>org.jogamp.gluegen</groupId>
75
                                    <artifactId>gluegen-rt</artifactId>
76
                                    <classifier>natives-windows-amd64</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-amd64</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_64</id>
103
			<activation>
104
				<os>
105
					<family>windows</family>
106
					<arch>x86_64</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-amd64</id>
116
			<activation>
117
				<os>
118
					<family>windows</family>
119
					<arch>amd64</arch>
120
				</os>
121
			</activation>
122
			<properties>
123
				<gvsig.install.plugin>true</gvsig.install.plugin>
124
			</properties>
125
		</profile>
126

  
127
	</profiles>
128
</project>
2.1/tags/org.gvsig.view3d-1.0.22/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.22</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.22/org.gvsig.view3d.app/org.gvsig.view3d.app.lin.x86_64/buildNumber.properties
1
#Thu Aug 04 10:54:40 CEST 2016
2
buildNumber=26
2.1/tags/org.gvsig.view3d-1.0.22/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.22/org.gvsig.view3d.app/org.gvsig.view3d.app.win.x86/buildNumber.properties
1
#Thu Aug 04 10:54:41 CEST 2016
2
buildNumber=26
2.1/tags/org.gvsig.view3d-1.0.22/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.22/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.22/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.22</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.22/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.22</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.22/org.gvsig.view3d.app/org.gvsig.view3d.app.lin.x86/buildNumber.properties
1
#Thu Aug 04 10:54:37 CEST 2016
2
buildNumber=26
2.1/tags/org.gvsig.view3d-1.0.22/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.22/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.22</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.22/org.gvsig.view3d.app/org.gvsig.view3d.app.common/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.22</version>
7
	</parent>
8
	<artifactId>org.gvsig.view3d.app.common</artifactId>
9
	<name>org.gvsig.view3d.app.common</name>
10

  
11
	<properties>
12
		<!-- Control the deploy of the plugin in gvsig.product.folder.path/gvSIG/extensiones -->
13
		<gvsig.install.plugin>false</gvsig.install.plugin>
14
		<!-- Control the deploy of the plugin package in gvsig.product.folder.path/install -->
15
		<gvsig.install.plugin.package>false</gvsig.install.plugin.package>
16
	</properties>
17

  
18
	<dependencies>
19
		<dependency>
20
			<groupId>org.gvsig</groupId>
21
			<artifactId>org.gvsig.view3d.lib.api</artifactId>
22
		</dependency>
23
		<dependency>
24
			<groupId>org.gvsig</groupId>
25
			<artifactId>org.gvsig.view3d.lib.impl</artifactId>
26
			<scope>runtime</scope>
27
		</dependency>
28
		<dependency>
29
			<groupId>org.gvsig</groupId>
30
			<artifactId>org.gvsig.view3d.swing.api</artifactId>
31
		</dependency>
32
		<dependency>
33
			<groupId>org.gvsig</groupId>
34
			<artifactId>org.gvsig.view3d.swing.impl</artifactId>
35
			<scope>runtime</scope>
36
		</dependency>
37
		<dependency>
38
			<groupId>org.gvsig</groupId>
39
			<artifactId>org.gvsig.app.mainplugin</artifactId>
40
		</dependency>
41
		<dependency>
42
			<groupId>gov.nasa</groupId>
43
			<artifactId>worldwind</artifactId>
44
			<scope>runtime</scope>
45
		</dependency>
46
		<dependency>
47
			<groupId>org.jogamp.gluegen</groupId>
48
			<artifactId>gluegen-rt</artifactId>
49
			<scope>runtime</scope>
50
		</dependency>
51
		<dependency>
52
			<groupId>org.jogamp.jogl</groupId>
53
			<artifactId>jogl-all</artifactId>
54
			<scope>runtime</scope>
55
		</dependency>
56
	</dependencies>
57
</project>
2.1/tags/org.gvsig.view3d-1.0.22/org.gvsig.view3d.app/org.gvsig.view3d.app.common/buildNumber.properties
1
#Thu Aug 04 10:54:36 CEST 2016
2
buildNumber=26
2.1/tags/org.gvsig.view3d-1.0.22/org.gvsig.view3d.app/org.gvsig.view3d.app.common/src/main/assembly/gvsig-plugin-package.xml
1
<!-- gvSIG. Desktop Geographic Information System. Copyright (C) 2007-2013 
2
	gvSIG Association. This program is free software; you can redistribute it 
3
	and/or modify it under the terms of the GNU General Public License as published 
4
	by the Free Software Foundation; either version 3 of the License, or (at 
5
	your option) any later version. This program is distributed in the hope that 
6
	it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty 
7
	of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General 
8
	Public License for more details. You should have received a copy of the GNU 
9
	General Public License along with this program; if not, write to the Free 
10
	Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 
11
	USA. For any additional information, do not hesitate to contact us at info 
12
	AT gvsig.com, or visit our website www.gvsig.com. -->
13
<assembly>
14
	<id>gvsig-plugin-package</id>
15
	<formats>
16
		<format>zip</format>
17
	</formats>
18
	<baseDirectory>${project.artifactId}</baseDirectory>
19
	<includeBaseDirectory>true</includeBaseDirectory>
20
	<files>
21
		<file>
22
			<source>target/${project.artifactId}-${project.version}.jar</source>
23
			<outputDirectory>lib</outputDirectory>
24
		</file>
25
		<file>
26
			<source>target/package.info</source>
27
		</file>
28
	</files>
29

  
30
	<fileSets>
31
		<fileSet>
32
			<directory>src/main/resources-plugin</directory>
33
			<outputDirectory>.</outputDirectory>
34
		</fileSet>
35
	</fileSets>
36

  
37

  
38
	<dependencySets>
39
		<dependencySet>
40
			<useProjectArtifact>false</useProjectArtifact>
41
			<useTransitiveDependencies>false</useTransitiveDependencies>
42
			<outputDirectory>lib</outputDirectory>
43
			<includes>
44
			    <include>org.gvsig:org.gvsig.view3d.lib.api</include>
45
                <include>org.gvsig:org.gvsig.view3d.lib.impl</include>
46
				<include>org.gvsig:org.gvsig.view3d.swing.api</include>
47
				<include>org.gvsig:org.gvsig.view3d.swing.impl</include>
48
				<include>gov.nasa:worldwind</include>
49
				<include>org.jogamp.gluegen:gluegen-rt</include>
50
				<include>org.jogamp.jogl:jogl-all</include>
51
			</includes>
52
		</dependencySet>
53
	</dependencySets>
54

  
55
</assembly>
56

  
2.1/tags/org.gvsig.view3d-1.0.22/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.22/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;
14
import org.gvsig.view3d.swing.api.View3DSwingManager;
15
import org.gvsig.view3d.swing.api.View3DSwingManager.TYPE;
16

  
17

  
18
public class SynchronizeViewPort3DExtension extends Extension {
19

  
20
    public void initialize() {
21
        registerIcons();
22
    }
23
    
24
    private void registerIcons() {
25
        IconThemeHelper.registerIcon("view3d", "synchronize-viewport-3d", this);
26
    }
27

  
28
    public void execute(String actionCommand) {
29
        
30
        if ("synchronize-viewport-3d".equals(actionCommand)) {
31
            IView view = getActiveView();
32

  
33
            View3DSwingManager manager = View3DSwingLocator.getManager();
34
            MapControl3D mapControl3DFlat =
35
                manager.getMapControl3D(
36
                    (ExtendedPropertiesSupport) view.getViewDocument(),
37
                    TYPE.FLAT);
38
            if (mapControl3DFlat != null) {
39
                mapControl3DFlat.synchronizeViewPorts();
40
            }
41

  
42
            MapControl3D mapControl3DSphere =
43
                manager.getMapControl3D(
44
                    (ExtendedPropertiesSupport) view.getViewDocument(),
45
                    TYPE.SPHERE);
46
            if (mapControl3DSphere != null) {
47
                mapControl3DSphere.synchronizeViewPorts();
48
            }
49
        }
50
    }
51

  
52
    public boolean isEnabled() {
53
        IView view = getActiveView();
54
        if (view != null) {
55
            View3DSwingManager manager = View3DSwingLocator.getManager();
56
            List<MapControl3D> mapControls3D =
57
                manager.getMapControl3D((ExtendedPropertiesSupport) view
58
                    .getViewDocument());
59
            if (mapControls3D.size() > 0) {
60
                return true;
61
            }
62
        }
63
        return false;
64
    }
65

  
66
    public boolean isVisible() {
67
        IView view = getActiveView();
68
        if (view != null) {
69
            return true;
70
        }
71
        return false;
72
    }
73
    
74
    private IView getActiveView() {
75
        ApplicationManager application = ApplicationLocator.getManager();
76
        IView view = (IView) application.getActiveComponent(ViewDocument.class);
77
        return view;
78
    }
79

  
80
}
2.1/tags/org.gvsig.view3d-1.0.22/org.gvsig.view3d.app/org.gvsig.view3d.app.common/src/main/java/org/gvsig/view3d/app/mainplugin/FullScreenView3DExtension.java
1
package org.gvsig.view3d.app.mainplugin;
2

  
3
import javax.swing.JComponent;
4

  
5
import org.gvsig.andami.IconThemeHelper;
6
import org.gvsig.andami.plugins.Extension;
7
import org.gvsig.andami.ui.ToolsWindowManager.Window;
8
import org.gvsig.andami.ui.mdiManager.IWindow;
9
import org.gvsig.app.ApplicationLocator;
10
import org.gvsig.app.ApplicationManager;
11
import org.gvsig.app.project.documents.view.ViewDocument;
12
import org.gvsig.app.project.documents.view.gui.IView;
13
import org.gvsig.view3d.swing.api.View3DPanel;
14

  
15

  
16
public class FullScreenView3DExtension extends Extension {
17

  
18
    public void execute(String actionCommand) {
19
        
20
        if ("full-screen-view-3d".equals(actionCommand)) {
21
            View3DPanel view3dPanel = getActiveView3DPanel();
22
            if(view3dPanel != null){
23
                view3dPanel.fullScreen();
24
            }
25
        }
26
    }
27

  
28
    private void registerIcons() {
29
        IconThemeHelper.registerIcon("view3d", "full-screen-view-3d", this);
30
    }
31

  
32
    public void initialize() {
33
        registerIcons();
34

  
35
    }
36

  
37
    public boolean isEnabled() {
38
        
39
        View3DPanel view3DPanel = getActiveView3DPanel();
40
        
41
        if(view3DPanel != null){
42
            return true;
43
        }
44
        
45
        return false;
46
    }
47

  
48
    private View3DPanel getActiveView3DPanel() {
49
        ApplicationManager appManager = ApplicationLocator.getManager();
50
        IWindow activeWindow = appManager.getActiveWindow();
51
        
52
        if(activeWindow instanceof Window){
53
            Window aWindow = (Window) activeWindow;
54
            JComponent contents = aWindow.getContents();
55
            if( contents instanceof View3DPanel){
56
                return (View3DPanel) contents;
57
            }
58
        }
59
        return null;
60
    }
61

  
62
    public boolean isVisible() {
63
        IView view = getActiveView();
64
        if (view != null) {
65
            return true;
66
        }
67
        return false;
68
    }
69
    
70
    private IView getActiveView() {
71
        ApplicationManager application = ApplicationLocator.getManager();
72
        IView view = (IView) application.getActiveComponent(ViewDocument.class);
73
        return view;
74
    }
75

  
76
}
2.1/tags/org.gvsig.view3d-1.0.22/org.gvsig.view3d.app/org.gvsig.view3d.app.common/src/main/java/org/gvsig/view3d/app/mainplugin/SynchronizeView3DExtension.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;
14
import org.gvsig.view3d.swing.api.View3DSwingManager;
15
import org.gvsig.view3d.swing.api.View3DSwingManager.TYPE;
16

  
17
public class SynchronizeView3DExtension extends Extension {
18

  
19
    public void initialize() {
20
        registerIcons();
21
    }
22

  
23
    private void registerIcons() {
24
        IconThemeHelper.registerIcon("view3d", "synchronize-view-3d", this);
25
    }
26

  
27
    public void execute(String actionCommand) {
28

  
29
        if ("synchronize-view-3d".equals(actionCommand)) {
30
            IView view = getActiveView();
31

  
32
            View3DSwingManager manager = View3DSwingLocator.getManager();
33
            MapControl3D mapControl3DFlat =
34
                manager.getMapControl3D(
35
                    (ExtendedPropertiesSupport) view.getViewDocument(),
36
                    TYPE.FLAT);
37
            if (mapControl3DFlat != null) {
38
                mapControl3DFlat.reloadLayers();
39
            }
40

  
41
            MapControl3D mapControl3DSphere =
42
                manager.getMapControl3D(
43
                    (ExtendedPropertiesSupport) view.getViewDocument(),
44
                    TYPE.SPHERE);
45
            if (mapControl3DSphere != null) {
46
                mapControl3DSphere.reloadLayers();
47
            }
48
        }
49
    }
50

  
51
    public boolean isEnabled() {
52
        IView view = getActiveView();
53
        if (view != null) {
54
            View3DSwingManager manager = View3DSwingLocator.getManager();
55
            List<MapControl3D> mapControls3D =
56
                manager.getMapControl3D((ExtendedPropertiesSupport) view
57
                    .getViewDocument());
58
            if (mapControls3D.size() > 0) {
59
                return true;
60
            }
61
        }
62
        return false;
63
    }
64

  
65
    public boolean isVisible() {
66
        IView view = getActiveView();
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff