File: SweetHome3DApplet.html

package info (click to toggle)
sweethome3d 2.5%2Bdfsg-1
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 21,600 kB
  • ctags: 7,071
  • sloc: java: 58,281; xml: 701; makefile: 42; php: 37; sh: 17
file content (62 lines) | stat: -rw-r--r-- 2,457 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
<!--
   SweetHome3DApplet.html 13 Oct 2008
   
   Copyright (c) 2008 Emmanuel PUYBARET / eTeks <info@eteks.com>. All Rights Reserved.
   
   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation; either version 2 of the License, or
   (at your option) any later version.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.

   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-->
<script type="text/javascript" src="http://java.com/js/deployJava.js">
</script>

<script type="text/javascript">
  // Add an event listener that checks whether applet is modified or not
  window.onbeforeunload = function() {
    if (document.applets ["SweetHome3DOnline"].isModified()) {
      return 'Edited home has been modified.\nIf you click on Ok, changes will be lost.';
    }
  }
</script>

<script>
  var javaMinimumVersion = "1.6.0_10"; // The first version with Java Plugin 2
  var jars = "lib/SweetHome3DApplet.jar,lib/Loader3DS1_2u.jar,lib/jnlp.jar";
  // Append Jars depending on the platform
  if (navigator.platform.match("Win.*")) {
    jars += ",lib/windows/java3d.jar";
  } else if (navigator.platform.match("Mac.*")) {
    javaMinimumVersion = "1.5";
    jars += ",lib/macosx/java3d.jar";
  } else if (navigator.platform.match("Linux.*")) {
    javaMinimumVersion = "1.6"; // OpenJDK doesn't give its subversion 
    if (navigator.platform.match(".*64")) {
      jars += ",lib/linux/x64/java3d.jar";
    } else {
      jars += ",lib/linux/i386/java3d.jar";
    } 
  } else {
    jars += ",lib/java3d.jar";
  }

  var attributes = {codebase:".",
                    code:"com.eteks.sweethome3d.applet.SweetHome3DApplet",
                    archive:jars,
                    width:"100%", height:"95%",
                    name:"SweetHome3DOnline"};
  var parameters = {java_arguments:"-Xmx512m"};
   
  deployJava.setInstallerType("kernel");
  deployJava.setAdditionalPackages("javax.swing,javax.imageio");
  deployJava.runApplet(attributes, parameters, javaMinimumVersion);
</script>