- 浏览: 105761 次
- 性别:
- 来自: GreatArcan
文章分类
最新评论
-
yysct2005:
java webgame开发,游戏服务器,游戏设计q群:334 ...
网络游戏服务端解决方案Project Darkstar的线路图,1.0版本2008年5月15日发布。 -
Nighthaven:
Tomzheng 写道刚才想去玩<倾城>>明 ...
中国造Java网络(网页)游戏引擎JGnet -
Tomzheng:
刚才想去玩<倾城>>明明机器里有javaVM ...
中国造Java网络(网页)游戏引擎JGnet -
Nighthaven:
<div class="quote_title ...
新项目《三国封神》截图 -
sql:
<div class="quote_title ...
新项目《三国封神》截图
Applets重装上阵: 新标签和示例总览(翻译)(上半部分)
原文地址http://java.dzone.com/news/applets-reloaded-overview-new-
Applets Reloaded: An Overview of New Tags and Demos
Applets重装上阵: 新标签和示例总览
What's the deal with applets in JDK 6 Update 10? In this article, we walk through the new applet tags and see some JNLP-powered applets in the wild.
Applet在新的JDK 6 Update 10中到底是个什么样子?在这篇文章里,我们将会遍历一下新的applet 标签并且看看新的基于JNLP的applet真正是如何运作的!
If you're used to creating applet tags that look like this:
如果你以前创建的applet标签是像这样的:
<applet code="org.me.hello.MyApplet" archive="HelloApplet.jar"></applet>
...then you're in for a surprise. Here are the new parameters that you should be aware of:
……那么,你肯定会很吃惊。以下是你需要知道的新参数:
· "jnlp_href". Probably the most important new parameter, it lets you launch an applet from a JNLP (web start) file.
· "jnlp_href". 也许是最重要的新参数, 它允许你从一个JNLP(web start)文件中启动applet.。
· "boxborder". Offers support for the "image" attribute, specifying whether a one-pixel border should be drawn around the edge of the applet's area while displaying the image shown before the applet is loaded.
· "boxborder".为“image”属性提供支持。当applet还没有被载入的时候,浏览器会在applet所在的位置显示载入画面,这个参数用来指定是否要在此时给浏览器中applet的范围画上一个一像素宽的边界。
· "centerimage". Offers support for the "image" attribute, specifying whether the loading image should be centered within the area of the applet instead of originating at the upper left corner.
· "centerimage".为“image”属性提供支持。用来指定载入画面是否要被放置在applet区域的中间而不是默认的显示在左上角。
· "java_arguments." Specifies JVM command-line arguments to be used when executing this applet instance. Nearly all JVM command-line arguments are supported, though there are certain rules and restrictions.
· "java_arguments." 指定在执行applet实例时的JVM命令行参数。几乎所有的JVM命令行参数都可以使用,虽然有一些特别的规定和限制。
· "java_version." Specifies a JRE version upon which to launch a particular applet.
· "java_version." 指定特定applet运行的JRE版本。
· "separate_jvm." Specifies a separate JVM for an applet, specifically for powerful applets that cannot tolerate interference during deployment.
· "separate_jvm." 为这个applet指定一个单独的虚拟机,主要是为了那些在部署时不能容忍干扰的强大的applet而用。
· "classloader_cache." Lets an applet opt out of the use of the class loader cache on an applet by applet basis.
· "classloader_cache." 让applet避免使用class loader cache
For a full description of the above new parameters,see Release Notes for the Next-Generation Java™ Plug-In Technology. You will find that the improvements for applets in JDK 6 Update 10 are as follows:
对于上面这些新参数的全面介绍, 请参考 Release Notes for the Next-Generation Java™ Plug-In Technology. 你会发现applet在 JDK 6 Update 10 有了如下改善:
· Improved reliability. The JVM running the applet is isolated from the web browser at the operating system level. If something should go wrong while running the applet, or if an uncooperative applet refuses to shut down, the new Java Plug-In detects and handles the error condition gracefully; the web browser is unaffected.
· 可靠性增强. 运行applet 的JVM在操作系统层与网页浏览器分离了开来. 如果在运行applet的时候出现问题,或者一个不合作的applet拒绝关闭,新的Java Plug-in会检测到,并且将出现的错误温柔的处理掉,浏览器不会被影响到。
· Built-in JNLP support. The new plug-in offers the capability to launch applets directly from JNLP files, unifying deployment of Java content both in the browser and out of the browser (via Java Web Start). Developers can now reuse JNLP extensions for advanced functionality including the JavaFX run-time libraries, 3D graphics via OpenGL, and planetary-scale terrain visualization within applets. Applets can now access JNLP APIs for persistent data storage, local file system access, and other useful functionality from sandboxed code.
· 内置的JNLP支持. 新的plug-in提供了直接从JNLP文件启动applet的能力,使得在浏览器内和浏览器外(通过Java Web Start)部署Java程序的方式得到了统一。开发者们现在可以使用JNLP扩展机制来使applet获得高级功能,这包括:JavaFX run-time libraries, 3D graphics via OpenGL, 以及planetary-scale terrain visualization 。 Applet现在可以在sandbox中使用JNLP的API来进行数据存储,访问本地文件系统,以及其他有用的功能。
· Per-applet command-line arguments. JVM command-line arguments may be specified on a per-applet basis, providing fine-grained control over options such as the heap size and Java 2D hardware acceleration features. JNLP-launched applets simply incorporate the command-line arguments and/or system properties into the JNLP file. Old-style applets can embed these arguments in the HTML of the web page.
· 每个applet特定的命令行参数. JVM命令行参数现在可以对每个applet进行分别定制,可以对JVM选项进行细粒度的控制,例如可使用的内存的大小和Java 2D 硬件加速特性。 基于JNLP的applet可以简单的将命令行参数和系统参数包含进JNLP文件,而旧式的applet可以将这些参数嵌入进HTML页面。
· Multiple JRE version support. Each individual applet instance may request a different JRE version on which to run. This feature is designed for enterprise customers which prefer to qualify their applets against either a particular JRE version or a particular JRE family. Both selection of a specific JRE version, or any in a particular family, are supported in the new plug-in.
· 多JRE版本支持.每个单独的applet实例都可以要求在一个不同的JRE版本中运行。部分企业级用户为他们的applet对特定的JRE版本或者特定的JRE系列进行了优化,这项特性是为他们服务的。无论是对JRE版本还是对JRE系列的选择在新的plug-in中都得到了支持.
· Improved Java/JavaScript communication. The bridge between the JavaScript engine in the web browser and the Java programming language has been completely reimplemented. The new implementation is backward-compatible and features improved reliability, performance and cross-browser portability, for both Java calling JavaScript as well as JavaScript calling Java. Formerly Mozilla-specific "LiveConnect" functionality, such as the ability to call static Java methods, instantiate new Java objects and reference third-party packages from JavaScript, is now available in all browsers.
· 增强的Java/JavaScript通信. 浏览器的JavaScript引擎与Java编程之间的通信桥梁被完全重新实现了。新的实现是向后兼容的,并且对于无论是Java调用JavaScript,还是JavaScript调用Java,都进行了可靠性、性能和跨浏览器能力的增强。以前只有Mozilla系列的浏览器拥有的“LiveConnect”功能:如在JavaScript中调用静态Java方法、实例化新的Java 对象以及引用第三方包的能力,现在对于所有的浏览器都是可用的。
· Improved user experience. The new Java Plug-In starts applets in the background, so the web browser always remains responsive. Applets appear on the web page as they become ready to run.
· 改善的用户体验. 新的Java plug-in在后台启动applet,从而使得浏览器可以一直保持响应。Applet只有在已经可以运行时才会出现在网页上.
· Improved applet lifecycle management. Calls to the applet lifecycle methods init
, start
, stop
, and destroy
are more deterministic and cross-browser behavior has been improved. The applet class loader cache and the legacy applet lifecycle, required for backward compatibility, are fully supported and the behavior of both has been improved.
· 改善的applet生命周期管理.与applet生命周期相关的方法 init
,start
,stop
以及destroy
更加确定了,并且跨浏览器的行为得到了改善。 Applet的class loader 缓冲和旧applet的生命周期的向后兼容性都得到了支持,并且两者的表现都得到了改善。
· Better large heap support. Historically, the maximum heap size that could be specified for applets via the Java Control Panel has been limited. This limitation is fixed in the new Java Plug-In; applets can now utilize as much heap space as command-line applications.
· 更好的大内存支持. 过去,最大的内存使用量只能由用户在Java Control Panel指定。这样的限制在新的
评论
顺便说一下,尽管javaeye的“可视化编辑器”相对比较好,但是基于网页的编辑器实在是非常恶心,尤其是在网速不好的情况下,插入图片的用户体验糟糕透了。强烈建议用flex或者applet写一个好点的。
<p class='MsoNormal' style='background: white; margin: 7.2pt 0cm 14.4pt 18.75pt; text-indent: -18pt; line-height: 13.5pt;'><span style='font-size: 10pt; color: #000000; font-family: Symbol;'><span style=''>·<span style=''> </span></span></span><strong><span style='font-size: 9pt; color: #000000;'><span style=''>更好的大内存支持</span></span></strong><strong><span style='font-size: 9pt; color: #000000; font-family: Arial;'>.</span></strong><span style='font-size: 9pt; color: #000000; font-family: Arial;'> </span><span style='font-size: 9pt; color: #000000;'><span style=''>过去,最大的内存使用量只能由用户在</span></span><span style='font-size: 9pt; color: #000000; font-family: Arial;'>Java Control Panel</span><span style='font-size: 9pt; color: #000000;'><span style=''>指定。这样的限制在新的</span></span><span style='font-size: 9pt; color: #000000; font-family: Arial;'>Java Plug-in</span><span style='font-size: 9pt; color: #000000;'><span style=''>中得到了修正;现在</span></span><span style='font-size: 9pt; color: #000000; font-family: Arial;'>applet</span><span style='font-size: 9pt; color: #000000;'><span style=''>可以通过命令行参数来制定它们可以使用的内存大小。</span></span><span style='font-size: 9pt; color: #000000; font-family: Arial;'> </span></p>
<p class='MsoNormal' style='background: white; margin: 7.2pt 0cm 14.4pt 18.75pt; text-indent: -18pt; line-height: 13.5pt;'><span style='font-size: 10pt; color: #000000; font-family: Symbol;'><span style=''>·<span style=''> </span></span></span><strong><span style='font-size: 9pt; color: #000000; font-family: Arial;'>Better Windows Vista support.</span></strong><span style='font-size: 9pt; color: #000000; font-family: Arial;'> Signed applets running in Protected Mode Internet Explorer on Microsoft's Windows Vista now have the same privileges as normal user applications, eliminating a portability barrier to this platform. </span></p>
<p class='MsoNormal' style='background: white; margin: 7.2pt 0cm 14.4pt 18.75pt; text-indent: -18pt; line-height: 13.5pt;'><span style='font-size: 10pt; color: #000000; font-family: Symbol;'><span style=''>·<span style=''> </span></span></span><strong><span style='font-size: 9pt; color: #000000;'><span style=''>更好的</span></span></strong><strong><span style='font-size: 9pt; color: #000000; font-family: Arial;'>Windows Vista </span></strong><strong><span style='font-size: 9pt; color: #000000;'><span style=''>支持</span></span></strong><strong><span style='font-size: 9pt; color: #000000; font-family: Arial;'>.</span></strong><span style='font-size: 9pt; color: #000000; font-family: Arial;'> </span><span style='font-size: 9pt; color: #000000;'><span style=''>对于</span></span><span style='font-size: 9pt; color: #000000; font-family: Arial;'>Windows Vista</span><span style='font-size: 9pt; color: #000000;'><span style=''>处于保护模式的</span></span><span style='font-size: 9pt; color: #000000; font-family: Arial;'>IE</span><span style='font-size: 9pt; color: #000000;'><span style=''>浏览器,已签名的</span></span><span style='font-size: 9pt; color: #000000; font-family: Arial;'>applet</span><span style=''><span style='font-size: 9pt; color: #000000;'>现在享有和其他普通的应用程序相同的特权。这消除了之前对于这个平台的移植障碍。</span></span></p>
<p style='background: white; line-height: 13.5pt;'><span style='font-size: 9pt; color: #000000; font-family: Arial;'>To get started using the new support for applets, including the above tags, you need JDK 6 Update 10 Beta. If you are using FireFox, you also need some beta version of FireFox 3. The above release notes state, on this point: "Sun Microsystems and the Mozilla Foundation have been working closely in order to support the new Java Plug-In in Firefox 3. Both organizations have mutually decided not to back-port the required changes — which are significant — to Firefox 2, as it is expected that most Firefox users will upgrade to Firefox 3 a short time after its final version has been released."</span></p>
<p style='background: white; line-height: 13.5pt;'><span style='font-size: 9pt; color: #000000;'><span style=''>为了使用这些对于</span></span><span style='font-size: 9pt; color: #000000; font-family: Arial;'>applet</span><span style='font-size: 9pt; color: #000000;'><span style=''>新的支持,包括上面的这些标签,你需要安装</span></span><span style='font-size: 9pt; color: #000000; font-family: Arial;'>JDK 6 Update 10 Beta</span><span style='font-size: 9pt; color: #000000;'><span style=''>。如果你是</span></span><span style='font-size: 9pt; color: #000000; font-family: Arial;'>FireFox</span><span style='font-size: 9pt; color: #000000;'><span style=''>用户,你还需要使用</span></span><span style='font-size: 9pt; color: #000000; font-family: Arial;'>FireFox 3</span><span style='font-size: 9pt; color: #000000;'><span style=''>。对于这样的发布状况,解释是:“</span></span><span style='font-size: 9pt; color: #000000; font-family: Arial;'>Sun Microsystems </span><span style='font-size: 9pt; color: #000000;'><span style=''>和</span></span><span style='font-size: 9pt; color: #000000; font-family: Arial;'> Mozilla Foundation</span><span style='font-size: 9pt; color: #000000;'><span style=''>为了能在</span></span><span style='font-size: 9pt; color: #000000; font-family: Arial;'>FireFox 3</span><span style='font-size: 9pt; color: #000000;'><span style=''>上支持新的</span></span><span style='font-size: 9pt; color: #000000; font-family: Arial;'>Java Plug-In</span><span style='font-size: 9pt; color: #000000;'><span style=''>进行了紧密的合作。两个组织都很成熟的决定不会向后兼容至</span></span><span style='font-size: 9pt; color: #000000; font-family: Arial;'>FireFox 2</span><span style='font-size: 9pt; color: #000000;'><span style=''>,而是寄希望于绝大多数的</span></span><span style='font-size: 9pt; color: #000000; font-family: Arial;'>FireFox</span><span style='font-size: 9pt; color: #000000;'><span style=''>用户会在</span></span><span style='font-size: 9pt; color: #000000; font-family: Arial;'>FireFox 3</span><span style='font-size: 9pt; color: #000000;'><span style=''>最终版发布后的很短时间内,将浏览器升级至</span></span><span style='font-size: 9pt; color: #000000; font-family: Arial;'>FireFox 3</span><span style=''><span style='font-size: 9pt; color: #000000;'>”</span></span></p>
<p style='background: white; line-height: 13.5pt;'><span style='font-size: 9pt; color: #000000; font-family: Arial;'>Several examples are already available of the new applet technology in action. I must say that I find them pretty convincing: smooth, no browser freezing, very nice indeed.</span></p>
<p style='background: white; line-height: 13.5pt;'><span style='font-size: 9pt; color: #000000;'><span style=''>目前对于新的</span></span><span style='font-size: 9pt; color: #000000; font-family: Arial;'>applet</span><span style=''><span style='font-size: 9pt; color: #000000;'>技术,已经有了一些样例程序。我不得不说,我发现他们非常的有说服力:平滑,无浏览器锁死,真的很不错。</span></span></p>
<p style='background: white; line-height: 13.5pt;'><span style='font-size: 9pt; color: #000000; font-family: Arial;'><a href='http://download.java.net/javadesktop/plugin2/wwj/'><span style='color: #0048c0;'>NASA World Wind Applet</span></a></span></p>
<p style='background: white; line-height: 13.5pt;'><span style='font-size: 9pt; color: #000000; font-family: Arial;'>Shows how to embed the Earth in full 3D on a web page. <a href='https://jdk6.dev.java.net/plugin2/jnlp/#EXAMPLES_WORLDWIND'><span style='color: #0048c0;'>Click here</span></a> for all the deployment info.</span></p>
<p style='background: white; line-height: 13.5pt;'><span style='font-size: 9pt; color: #000000;'><span style=''>展示如何把全</span></span><span style='font-size: 9pt; color: #000000; font-family: Arial;'>3D</span><span style=''><span style='font-size: 9pt; color: #000000;'>的地球嵌入到网页当中。</span><span style='font-size: 9pt; color: #000000; font-family: Arial;'><a href='https://jdk6.dev.java.net/plugin2/jnlp/#EXAMPLES_WORLDWIND'><span style=''><span lang='EN-US'><span style='color: #0048c0;'>点这里</span></span></span></a></span><span style='font-size: 9pt; color: #000000;'>来了解部署信息</span></span></p>
<p style='background: white; line-height: 13.5pt;'><span style='font-size: 9pt; color: #000000; font-family: Arial;'><img src='http://java.dzone.com/sites/all/files/new-applet-9.png' alt=''/></span></p>
<p style='background: white; line-height: 13.5pt;'><span style='font-size: 9pt; color: #000000; font-family: Arial;'><a href='http://download.java.net/javadesktop/plugin2/jake2/'><span style='color: #0048c0;'>Jake2 Applet</span></a> </span></p>
<p style='background: white; line-height: 13.5pt;'><span style='font-size: 9pt; color: #000000; font-family: Arial;'>Game deployment over the web? Check out this one for a great and fun example. <a href='https://jdk6.dev.java.net/plugin2/jnlp/#EXAMPLES_JAKE2'><span style='color: #0048c0;'>Click here</span></a> for deployment info. </span></p>
<p style='background: white; line-height: 13.5pt;'><span style='font-size: 9pt; color: #000000;'><span style=''>通过网页部署游戏?</span></span><span style='font-size: 9pt; color: #000000; font-family: Arial;'> </span><span style=''><span style='font-size: 9pt; color: #000000;'>这是一有趣例子。</span><span style='font-size: 9pt; color: #000000; font-family: Arial;'><a href='https://jdk6.dev.java.net/plugin2/jnlp/#EXAMPLES_JAKE2'><span style=''><span lang='EN-US'><span style='color: #0048c0;'>点这里</span></span></span></a></span><span style='font-size: 9pt; color: #000000;'>来了解部署信息。</span></span></p>
<p style='background: white; line-height: 13.5pt;'><span style='font-size: 9pt; color: #000000; font-family: Arial;'><img src='http://java.dzone.com/sites/all/files/new-applet-2.png' alt=''/></span></p>
<p style='background: white; line-height: 13.5pt;'><span style='font-size: 9pt; color: #000000; font-family: Arial;'><a href='https://scenegraph-demos.dev.java.net/demo-applets.html'><span style='color: #0048c0;'>Scene Graph Applets</span></a> </span></p>
<p style='background: white; line-height: 13.5pt;'><span style='font-size: 9pt; color: #000000; font-family: Arial;'>The Scene Graph applets are pretty excellent, showing the power of the new <a href='https://scenegraph-demos.dev.java.net/'><span style='color: #0048c0;'>Scene Graph</span></a> together with the power of the new browser Java plugin. Here's the whole list of them:</span></p>
<p style='background: white; line-height: 13.5pt;'><span style='font-size: 9pt; color: #000000; font-family: Arial;'>Scene Graph applets</span><span style='font-size: 9pt; color: #000000;'><span style=''>棒极了</span></span><span style='font-size: 9pt; color: #000000; font-family: Arial;'> </span><span style='font-size: 9pt; color: #000000;'><span style=''>,同时展示了新的</span></span><span style='font-size: 9pt; color: #000000; font-family: Arial;'><a href='https://scenegraph-demos.dev.java.net/'><span style='color: #0048c0;'>Scene Graph</span></a> </span><span style='font-size: 9pt; color: #000000;'><span style=''>和新的</span></span><span style='font-size: 9pt; color: #000000; font-family: Arial;'> Java plugin</span><span style='font-size: 9pt; color: #000000;'><span style=''>的强大力量。</span></span><span style='font-size: 9pt; color: #000000; font-family: Arial;'> </span><span style='font-size: 9pt; color: #000000;'><span style=''>这里给出这些样例程序的列表</span></span><span style='font-size: 9pt; color: #000000; font-family: Arial;'>:</span></p>
<p style='background: white; line-height: 13.5pt;'><strong><span style='font-size: 9pt; color: #000000; font-family: Arial;'>Calculator. </span></strong><span style='font-size: 9pt; color: #000000; font-family: Arial;'>A simple, functioning, calculator application: </span></p>
<p style='background: white; line-height: 13.5pt;'><strong><span style='font-size: 9pt; color: #000000;'><span style=''>计算器</span></span></strong><strong><span style='font-size: 9pt; color: #000000; font-family: Arial;'>. </span></strong><span style='font-size: 9pt; color: #000000;'><span style=''>一个简单的,功能完全的计算器程序</span></span><span style='font-size: 9pt; color: #000000; font-family: Arial;'>: </span></p>
<p style='background: white; line-height: 13.5pt;'><span style='font-size: 9pt; color: #000000; font-family: Arial;'><img src='http://java.dzone.com/sites/all/files/new-applet-92.png' alt=''/></span></p>
<p style='background: white; line-height: 13.5pt;'><strong><span style='font-size: 9pt; color: #000000; font-family: Arial;'>SnowMark. I</span></strong><span style='font-size: 9pt; color: #000000; font-family: Arial;'>llustrates the use of images, transformations, and effects such as shadows and Gaussian blurs. Click the demo to pause / resume the animation: </span></p>
<p style='background: white; line-height: 13.5pt;'><strong><span style='font-size: 9pt; color: #000000;'><span style=''>雪花</span></span></strong><strong><span style='font-size: 9pt; color: #000000; font-family: Arial;'>. </span></strong><span style=''><span style='font-size: 9pt; color: #000000;'>展示了对图片的使用,变型,以及阴影和高斯模糊。点击样例来暂停和恢复动画。</span></span></p>
<p style='background: white; line-height: 13.5pt;'><span style='font-size: 9pt; color: #000000; font-family: Arial;'><img src='http://java.dzone.com/sites/all/files/new-applet-3.png' alt=''/></span></p>
<p style='background: white; line-height: 13.5pt;'><strong><span style='font-size: 9pt; color: #000000; font-family: Arial;'>Egg Timer. </span></strong><span style='font-size: 9pt; color: #000000; font-family: Arial;'>A functioning "egg timer" example which can be set for up to 59 minutes: </span></p>
<p style='background: white; line-height: 13.5pt;'><strong><span style='font-size: 9pt; color: #000000;'><span style=''>鸡蛋计时器</span></span></strong><strong><span style='font-size: 9pt; color: #000000; font-family: Arial;'>. </span></strong><span style='font-size: 9pt; color: #000000;'><span style=''>一个可运行的“鸡蛋计时器”,可以定时至</span></span><span style='font-size: 9pt; color: #000000; font-family: Arial;'>59</span><span style='font-size: 9pt; color: #000000;'><span style=''>分钟</span></span><span style='font-size: 9pt; color: #000000; font-family: Arial;'>: </span></p>
<p style='background: white; line-height: 13.5pt;'><span style='font-size: 9pt; color: #000000; font-family: Arial;'><img src='http://java.dzone.com/sites/all/files/new-applet-91.png' alt=''/></span></p>
<p style='background: white; line-height: 13.5pt;'><strong><span style='font-size: 9pt; color: #000000; font-family: Arial;'>Dynamic Demo. </span></strong><span style='font-size: 9pt; color: #000000; font-family: Arial;'>Shows several hundred dynamically moving shapes in the scene. Click the demo to pause / resume the animation: </span></p>
<p style='background: white; line-height: 13.5pt;'><strong><span style='font-size: 9pt; color: #000000;'><span style=''>动态示例</span></span></strong><strong><span style='font-size: 9pt; color: #000000; font-family: Arial;'>. </span></strong><span style='font-size: 9pt; color: #000000;'><span style=''>在场景中显示了数百个动态移动的形体</span></span><span style='font-size: 9pt; color: #000000; font-family: Arial;'>. </span><span style='font-size: 9pt; color: #000000;'><span style=''>点击样例来暂停和恢复动画</span></span><span style='font-size: 9pt; color: #000000; font-family: Arial;'>: </span></p>
<p style='background: white; line-height: 13.5pt;'><span style='font-size: 9pt; color: #000000; font-family: Arial;'><img src='http://java.dzone.com/sites/all/files/new-applet-4.png' alt=''/></span></p>
<p style='background: white; line-height: 13.5pt;'><strong><span style='font-size: 9pt; color: #000000; font-family: Arial;'>JPhone. </span></strong><span style='font-size: 9pt; color: #000000; font-family: Arial;'>An example of a modern cell phone UI written using Scene Graph: </span></p>
<p style='background: white; line-height: 13.5pt;'><strong><span style='font-size: 9pt; color: #000000; font-family: Arial;'>JPhone. </span></strong><span style='font-size: 9pt; color: #000000;'><span style=''>一个使用</span></span><span style='font-size: 9pt; color: #000000; font-family: Arial;'>Scene Graph</span><span style='font-size: 9pt; color: #000000;'><span style=''>来绘制现代手机用户界面的例子</span></span><span style='font-size: 9pt; color: #000000; font-family: Arial;'>: </span></p>
<p style='background: white; line-height: 13.5pt;'><span style='font-size: 9pt; color: #000000; font-family: Arial;'><img src='http://java.dzone.com/sites/all/files/new-applet-5.png' alt=''/></span></p>
<p style='background: white; line-height: 13.5pt;'><strong><span style='font-size: 9pt; color: #000000; font-family: Arial;'>NestedText. </span></strong><span style='font-size: 9pt; color: #000000; font-family: Arial;'>An example of a JSGPanel nested inside an SGComponent, which is part of the scene of another JSGPanel: </span></p>
<p style='background: white; line-height: 13.5pt;'><strong><span style='font-size: 9pt; color: #000000; font-family: Arial;'>NestedText. </span></strong><span style='font-size: 9pt; color: #000000;'><span style=''>一个使用一个</span></span><span style='font-size: 9pt; color: #000000; font-family: Arial;'>JSGPanel </span><span style='font-size: 9pt; color: #000000;'><span style=''>筑巢(译者:绑定?</span></span><span style='font-size: 9pt; color: #000000; font-family: Arial;'>nested</span><span style='font-size: 9pt; color: #000000;'><span style=''>好像是</span></span><span style='font-size: 9pt; color: #000000; font-family: Arial;'>Scene Graph</span><span style='font-size: 9pt; color: #000000;'><span style=''>专业术语)于</span></span><span style='font-size: 9pt; color: #000000; font-family: Arial;'> </span><span style='font-size: 9pt; color: #000000;'><span style=''>一个</span></span><span style='font-size: 9pt; color: #000000; font-family: Arial;'> SGComponent</span><span style='font-size: 9pt; color: #000000;'><span style=''>,而后者又是另一个</span></span><span style='font-size: 9pt; color: #000000; font-family: Arial;'> JSGPanel</span><span style='font-size: 9pt; color: #000000;'><span style=''>场景的一部分</span></span><span style='font-size: 9pt; color: #000000; font-family: Arial;'>: </span></p>
<p style='background: white; line-height: 13.5pt;'><span style='font-size: 9pt; color: #000000; font-family: Arial;'><img src='http://java.dzone.com/sites/all/files/new-applet-6.png' alt=''/></span></p>
<p style='background: white; line-height: 13.5pt;'><span style='font-size: 9pt; color: #000000; font-family: Arial;'><a href='http://download.java.net/javadesktop/plugin2/javafx-applet/'><span style='color: #0048c0;'>JavaFX Timer Applet </span></a></span></p>
<p style='background: white; line-height: 13.5pt;'><span style='font-size: 9pt; color: #000000; font-family: Arial;'>How about JavaFX in an applet? The cool thing is that you also see the source code, when you go to the site. </span></p>
<p style='background: white; line-height: 13.5pt;'><span style='font-size: 9pt; color: #000000;'><span style=''>在</span></span><span style='font-size: 9pt; color: #000000; font-family: Arial;'>applet</span><span style='font-size: 9pt; color: #000000;'><span style=''>中使用</span></span><span style='font-size: 9pt; color: #000000; font-family: Arial;'>JavaFx</span><span style='font-size: 9pt; color: #000000;'><span style=''>?最酷的地方是:你访问这个站点的时候,可以看到源代码。</span></span><span style='font-size: 9pt; color: #000000; font-family: Arial;'> </span></p>
<p style='background: white; line-height: 13.5pt;'><span style='font-size: 9pt; color: #000000; font-family: Arial;'><img src='http://java.dzone.com/sites/all/files/new-applet-8.png' alt=''/></span></p>
<p style='background: white; line-height: 13.5pt;'><span style='font-size: 9pt; color: #000000; font-family: Arial;'>Finally, I had to try it out myself. I created a small applet, added some Swing components, and deployed it via a JNLP file. First I deployed it to FireFox 2 and got the same old terrible performance. Deployed to FireFox 3, it was a breeze. There's some kind of very gentle introduction of the applet to the browser whereby it seems to unfold before your eyes as it is deployed to the page. A very nice professional effect. And then my applet appeared: </span></p>
<p style='background: white; line-height: 13.5pt;'><span style='font-size: 9pt; color: #000000;'><span style=''>最后</span></span><span style='font-size: 9pt; color: #000000; font-family: Arial;'>, </span><span style='font-size: 9pt; color: #000000;'><span style=''>我自己尝试了一下。</span></span><span style='font-size: 9pt; color: #000000; font-family: Arial;'> </span><span style='font-size: 9pt; color: #000000;'><span style=''>我创建了一个简单的</span></span><span style='font-size: 9pt; color: #000000; font-family: Arial;'>applet</span><span style='font-size: 9pt; color: #000000;'><span style=''>,添加了些</span></span><span style='font-size: 9pt; color: #000000; font-family: Arial;'>Swing</span><span style='font-size: 9pt; color: #000000;'><span style=''>空间,然后通过</span></span><span style='font-size: 9pt; color: #000000; font-family: Arial;'>JNLP</span><span style='font-size: 9pt; color: #000000;'><span style=''>文件部署了它。起初我把它部署到了</span></span><span style='font-size: 9pt; color: #000000; font-family: Arial;'>FireFox 2</span><span style='font-size: 9pt; color: #000000;'><span style=''>上,结果得到了和以前一样的糟糕表现。而部署到</span></span><span style='font-size: 9pt; color: #000000; font-family: Arial;'>FireFox 3</span><span style='font-size: 9pt; color: #000000;'><span style=''>后,像微风一样流畅!当在</span></span><span style='font-size: 9pt; color: #000000; font-family: Arial;'>applet</span><span style='font-size: 9pt; color: #000000;'><span style=''>部署到网页的过程中,载入过程非常流畅,然人感觉</span></span><span style='font-size: 9pt; color: #000000; font-family: Arial;'>applet</span><span style='font-size: 9pt; color: #000000;'><span style=''>似乎是在你眼前展开一样。非常漂亮专业的效果。下面是我的</span></span><span style='font-size: 9pt; color: #000000; font-family: Arial;'>applet</span><span style='font-size: 9pt; color: #000000;'><span style=''>:</span></span><span style='font-size: 9pt; color: #000000; font-family: Arial;'> </span></p>
<p style='background: white; line-height: 13.5pt;'><span style='font-size: 9pt; color: #000000; font-family: Arial;'><img src='http://java.dzone.com/sites/all/files/new-applet-1.png' alt=''/></span></p>
<p style='background: white; line-height: 13.5pt;'><span style='font-size: 9pt; font-family: Arial;'>Also, because of the JNLP support, applets can access JNLP APIs for persistent data storage, local file system access, and other useful functionality from sandboxed code. All the information you should ever need can be found in <a href='https://jdk6.dev.java.net/plugin2/'><span style='color: #0048c0;'>Release Notes for the Next-Generation Java™ Plug-In Technology</span></a> and, especially, in <a href='https://jdk6.dev.java.net/plugin2/jnlp/'><span style='color: #0048c0;'>JNLP Support in the New Java Plug-in Technology</span></a>.</span></p>
<p style='background: white; line-height: 13.5pt;'><span style='font-size: 9pt;'><span style=''>并且<span lang='EN'>, </span>由于有了<span lang='EN'>JNLP</span>的支持,<span lang='EN'> applet</span>可以从<span lang='EN'>sandbox</span>中通过<span lang='EN'>JNLP</span>的<span lang='EN'>API</span>进行数据存储,本地文件访问和其它很多有用的功能。所有你要的信息都可以在 <span lang='EN'><a href='https://jdk6.dev.java.net/plugin2/'><span style=''><span style='color: #0048c0;'>Release Notes for the Next-Generation Java™ Plug-In Technology</span></span></a> </span>,尤其是<span lang='EN'><a href='https://jdk6.dev.java.net/plugin2/jnlp/'><span style=''><span style='color: #0048c0;'>JNLP Support in the New Java Plug-in Technology</span></span></a></span>找到。</span></span></p>
<p class='MsoNormal' style='background: white; margin: 7.2pt 0cm 14.4pt; line-height: 13.5pt;'><span style='font-size: 9pt; color: #000000; font-family: Verdana;'> </span></p>
<p class='MsoNormal' style='background: white; margin: 7.2pt 0cm 14.4pt; line-height: 13.5pt;'><span style='font-size: 9pt; color: #000000;'><span style=''>译者:翻译东西最怕的就是翻不准,虽然是翻这种比较随意的</span></span><span style='font-size: 9pt; color: #000000; font-family: Arial;'>blog</span><span style=''><span style='font-size: 9pt; color: #000000;'>,翻错了终究不太好。人都是有惰性的,如果只给出个原帖地址,大多数人即使觉得有问题,也很少跑去原帖核实。所以决定回归以前采用的中英文对照的方法,这样只需要向上看一行就能看到原文,更有助于大家理解和纠错。</span></span></p>
<p class='MsoNormal' style='background: white; margin: 7.2pt 0cm 14.4pt; line-height: 13.5pt;'><span style='font-size: 9pt;'><span style=''>最后,对于我的所有文章都一样:水平有限,欢迎大家纠正错别字、语法错误和翻译错误。</span></span></p>
相关推荐
这个压缩包文件"Applets1"很可能是包含了一些Java Applet的源代码示例,供初学者进行学习和调试。 Java Applets的工作原理基于Java插件,该插件允许Web浏览器解析和执行Java字节码。当用户访问包含Java Applet的...
【Applets-fanyi:小程序翻译工具】 "Applets-fanyi"是一个专门针对小程序的翻译工具,旨在帮助开发者高效地进行多语言版本的小程序开发。这个开源项目提供了源码,使得用户可以自由查看、修改和扩展其功能,以适应...
在Java SE程序设计中,GUI(图形用户界面)和Applets是构建交互式应用程序的重要部分。本课件主要关注如何创建用户界面,涵盖了多种常见的GUI组件以及它们的使用方法。 1. GUI组件 GUI组件是构建用户界面的基本...
总的来说,“Workshop applets”和“Example Programs”是学习和掌握数据结构与算法的重要资源,它们将理论知识与实践相结合,使学习过程更加生动和有效。无论是自学还是课堂教学,这些资源都能极大地促进理解和应用...
- **Applets的安全限制**:为了保护用户的计算机免受恶意代码的攻击,Java Applets运行在一个沙箱环境中,这个环境限制了Applet能够执行的操作。 - **在Applets中实现密码学功能**:尽管存在安全限制,但Java ...
Java 游戏编程是利用 Java 语言开发游戏的过程,尽管在 Java 平台上大型流行的商业游戏相对较少,但 Java 的跨平台性和丰富的库使其在游戏编程领域具有潜力。本篇文章旨在引导初学者逐步掌握 Java 游戏开发,通过...
Java Applets在1990年代中期非常流行,它们使得开发者能够创建可以在网页上运行的轻量级应用程序,但随着JavaScript和其他现代Web技术的发展,Java Applets的使用逐渐减少,现在更多的被HTML5、Web Components和...
applets-program.rar_java”显然包含了一个关于Java Applets的详细讲解资源,特别是“java applets program.ppt”,这是一个PowerPoint演示文稿,可能涵盖了Applets的基础知识、工作原理以及如何开发和部署。...
Domino_65x_applets_2009_all_platforms.zip Domino_65x_applets_2009_all_platforms.zip Domino_65x_applets_2009_all_platforms.zip
Web小应用程序(Applets)是Java的一种早期应用形式,允许在浏览器环境中执行Java代码,为用户提供丰富的用户体验。本文将深入探讨如何使用Java来创建和部署Web小应用程序。 一、理解Web小应用程序 Web小应用程序...
7. ****:用于嵌入Java applet,但现在已被或取代,因为Java Applets的安全问题和性能问题。 8. ****:用于定义图像映射中的热点区域,通常与和配合使用。 9. ****:粗体文本标签,尽管它常用于改变文本样式,但...
Java Applets Java Applets 是 Java 程序的一种类型,它们可以在浏览器中运行。它们与独立应用程序和 Servlet programs 相比,具有不同的特点和限制。 什么是 Java Applets? Java Applets 是一种 Java 程序,...
1. **系统托盘API**:该框架可能封装了操作系统提供的系统托盘API,如Windows的Shell_NotifyIcon API,使得开发者能够轻松地在任务栏上添加和管理自己的托盘图标。 2. **事件处理**:为了响应用户的鼠标点击、右键...
以上内容仅是部分HTML5标签和属性的简要概述,更详细的信息和示例可以在《Safari HTML5 Handbook》中找到。这本书对于任何希望深入了解HTML5在Safari中的应用的开发者来说都是非常有价值的资源。
这部分可能包含了一些关于Visa对GlobalPlatform规范的具体实现或解释的细节,包括但不限于技术规格、具体实现示例以及与标准的偏离等。这部分内容对于深入了解Visa GlobalPlatform 2.1.1版本的功能细节非常重要。 ...
Java认证课程旨在帮助学员深入理解和掌握Java编程语言的核心概念与技术,特别关注Java应用程序(Java Applications)和Java小应用程序(Java Applets)的面向对象编程方法。本课程将引导学习者从基础到高级,逐步...
### Object标签遮罩问题解析及解决方案 #### 一、Object标签概述 在Web开发中,`<object>` 标签是一种非常重要的元素,主要用于在HTML文档中嵌入多媒体内容,如图像、音频、视频、Java Applets、ActiveX 控件、PDF...
总的来说,这个压缩包提供了一个基于Java Applets和Java 3D技术的在线虚拟艺术展览馆,用户通过浏览器和WireFusion Player可以体验3D的视觉效果和互动功能。由于Java Applets的安全性和浏览器兼容性问题,这种技术...