Applets重装上阵: 新标签和示例总览(翻译)(下半部分)
关键字: 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指定。这样的限制在新的Java Plug-in中得到了修正;现在applet可以通过命令行参数来制定它们可以使用的内存大小。
· Better Windows Vista support. 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.
· 更好的Windows Vista 支持. 对于Windows Vista处于保护模式的IE浏览器,已签名的applet现在享有和其他普通的应用程序相同的特权。这消除了之前对于这个平台的移植障碍。
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."
为了使用这些对于applet新的支持,包括上面的这些标签,你需要安装JDK 6 Update 10 Beta。如果你是FireFox用户,你还需要使用FireFox 3。对于这样的发布状况,解释是:“Sun Microsystems 和 Mozilla Foundation为了能在FireFox 3上支持新的Java Plug-In进行了紧密的合作。两个组织都很成熟的决定不会向后兼容至FireFox 2,而是寄希望于绝大多数的FireFox用户会在FireFox 3最终版发布后的很短时间内,将浏览器升级至FireFox 3”
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.
目前对于新的applet技术,已经有了一些样例程序。我不得不说,我发现他们非常的有说服力:平滑,无浏览器锁死,真的很不错。
Shows how to embed the Earth in full 3D on a web page. Click here for all the deployment info.
展示如何把全3D的地球嵌入到网页当中。点这里来了解部署信息

Game deployment over the web? Check out this one for a great and fun example. Click here for deployment info.
通过网页部署游戏? 这是一有趣例子。点这里来了解部署信息。

The Scene Graph applets are pretty excellent, showing the power of the new Scene Graph together with the power of the new browser Java plugin. Here's the whole list of them:
Scene Graph applets棒极了 ,同时展示了新的Scene Graph 和新的 Java plugin的强大力量。 这里给出这些样例程序的列表:
Calculator. A simple, functioning, calculator application:
计算器. 一个简单的,功能完全的计算器程序:

SnowMark. Illustrates the use of images, transformations, and effects such as shadows and Gaussian blurs. Click the demo to pause / resume the animation:
雪花. 展示了对图片的使用,变型,以及阴影和高斯模糊。点击样例来暂停和恢复动画。

Egg Timer. A functioning "egg timer" example which can be set for up to 59 minutes:
鸡蛋计时器. 一个可运行的“鸡蛋计时器”,可以定时至59分钟:

Dynamic Demo. Shows several hundred dynamically moving shapes in the scene. Click the demo to pause / resume the animation:
动态示例. 在场景中显示了数百个动态移动的形体. 点击样例来暂停和恢复动画:

JPhone. An example of a modern cell phone UI written using Scene Graph:
JPhone. 一个使用Scene Graph来绘制现代手机用户界面的例子:

NestedText. An example of a JSGPanel nested inside an SGComponent, which is part of the scene of another JSGPanel:
NestedText. 一个使用一个JSGPanel 筑巢(译者:绑定?nested好像是Scene Graph专业术语)于 一个 SGComponent,而后者又是另一个 JSGPanel场景的一部分:

How about JavaFX in an applet? The cool thing is that you also see the source code, when you go to the site.
在applet中使用JavaFx?最酷的地方是:你访问这个站点的时候,可以看到源代码。

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:
最后, 我自己尝试了一下。 我创建了一个简单的applet,添加了些Swing空间,然后通过JNLP文件部署了它。起初我把它部署到了FireFox 2上,结果得到了和以前一样的糟糕表现。而部署到FireFox 3后,像微风一样流畅!当在applet部署到网页的过程中,载入过程非常流畅,然人感觉applet似乎是在你眼前展开一样。非常漂亮专业的效果。下面是我的applet:

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 Release Notes for the Next-Generation Java™ Plug-In Technology and, especially, in JNLP Support in the New Java Plug-in Technology.
并且, 由于有了JNLP的支持, applet可以从sandbox中通过JNLP的API进行数据存储,本地文件访问和其它很多有用的功能。所有你要的信息都可以在 Release Notes for the Next-Generation Java™ Plug-In Technology ,尤其是JNLP Support in the New Java Plug-in Technology找到。
译者:翻译东西最怕的就是翻不准,虽然是翻这种比较随意的blog,翻错了终究不太好。人都是有惰性的,如果只给出个原帖地址,大多数人即使觉得有问题,也很少跑去原帖核实。所以决定回归以前采用的中英文对照的方法,这样只需要向上看一行就能看到原文,更有助于大家理解和纠错。
最后,对于我的所有文章都一样:水平有限,欢迎大家纠正错别字、语法错误和翻译错误。
发表评论
- 浏览: 6097 次
- 性别:

- 来自: GreatArcan

- 详细资料
搜索本博客
最近加入圈子
最新评论
-
为什么一些JAVA EE / J2EE ...
的确倒出了程序员的苦水,很多东西占用了大部分时间,但对最后的结果并没多大贡献。
-- by jackyxiap -
面试第一天,面试第二天
在7楼面试java,应该就是tx了。 如果不是的话,只能猜测是网易了。
-- by codeutil -
面试第一天,面试第二天
面几轮?? 受不了~~
-- by java菜菜鸟 -
面试第一天,面试第二天
不是深圳也不是腾讯,不过确实是广东地区。呵呵。不过具体的公司名就不透露了:)
-- by Nighthaven -
面试第一天,面试第二天
呵呵,深圳能这样折腾得游戏带游戏开发的公司?难道是tencent?
-- by YoungCool






评论排行榜