SWT概述

以下是资料介绍,如需要完整的请充值下载. 本资料已审核过,确保内容和网页里介绍一致.  
无需注册登录,支付后按照提示操作即可获取该资料.
资料介绍:


附件1 外文资料翻译译文

SWT概述

  在eclipse.org主页上对SWT做了如下的解释说明:

SWT设计的目的是能够为用户提供一种对其实现操作系统之上的用户接口功能的极具效率且具有移植性的访问。

  这正是SWT设计哲学的体现。

  当然,SWT之所以具有较高效率的部分原因是它主要是底层操作系统上的用户接口功能的一个兼容层,大部分真正的工作由底层操作系统的中高度优化的、特定平台中的相关代码完成。然而,还不单是这些,SWT尽最大可能地避免任何在运行的程序和操作系统之间的额外开销。比如说,SWT中不包含一个分离的内部实现层次,而这种分离的内部实现层次是AWT所采用的。这样就从公共入口点免除间接层,且同时也减少了自身库的大小。这种实现策略的权衡使得SWT实现(称为port)具有和每个平台相同的实现层次,同时在实现的内部不包含太多的共享代码。这使得SWT的初期设计变得非常的具有挑战性,但是事实上也并没有产生什么太大的问题。

  SWT可以运行在所有主流桌面操作系统和一些掌上设备上。一些在特定操作系统中不存在的功能本来妨碍其成为一个完整的SWT实现平台,但随着时间的推移,这些原本不存在的功能可以通过对应的模拟版本来加以解决。使用模拟版本的方法可以简化得到一个最初可运行的SWT实现的任务,然后再慢慢完善其功能。







附件2 外文原文



SWT Overview

The SWT component home page on eclipse.org states the following.

The SWT component is designed to provide efficient, portable access to the user interface facilities of the operating systems on which it is implemented.



This is as strong an embodiment of the design philosophy of SWT as can be found anywhere.



Certainly, part of the reason why SWT is efficient is because it is predominantly a compatibility layer on top of the user interface facilities of the underlying operating system. Most of the "real" work is done by the highly optimized, platform-specific code that the operating system vendors have implemented. There is more to it than that, however. To the greatest extent possible, anything that would put extra overhead between the running program and the operating system has been avoided. For example, SWT does not have a separate internal implementation hierarchy, as is found in the AWT peer layer. This removes a layer of indirection from every public entry point and significantly reduces the size of the library. The trade-off with this strategy