1. Trang chủ
  2. » Công Nghệ Thông Tin

swt and jface in action, 2005

496 729 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 496
Dung lượng 5,24 MB

Nội dung

[...]... before we can investigate SWT/ JFace in depth, we need to introduce Swing SWT and JFace were created in response to this library, and by understanding the contrast between the two design philosophies, you’ll better appreciate how SWT and JFace function Further, in addition to recognizing the trade-offs between Swing and SWT/ JFace, you’ll be able to participate in the passionate debates concerning the two... 177 Summary 181 Updating WidgetWindow 182 8.5 189 Tables and menus 9.1 Tables 190 191 Understanding SWT tables 9.2 Creating menus 191 ■ JFace TableViewers 194 200 Accelerator keys 201 Creating menus in SWT Using JFace actions to add to menus 204 ■ 9.3 Summary 201 Updating WidgetWindow 205 9.4 10 173 Using the List widget 180 SWT lists 9 ■ 176 SWT trees 8.3 167 Dialogs 10.1 211 212 SWT dialogs 213 ColorDialog... graphical user interface development using Java and discuss the organization of the various classes and packages within SWT and JFace Chapter 2, “Getting started with SWT/ JFace, ” shows you how to set up a project to use SWT and JFace, either within the Eclipse IDE or as a standalone project built Licensed to jromero xx ABOUT THIS BOOK from the command line After showing how... Customizing individual layout cells 6.3 The grid layout GridData 6.4 116 117 The form layout 119 Using FormData 120 FormAttachment 120 6.5 Custom layouts Specifying relations using Laying out controls using a form layout ■ ■ 124 Calculating the layout’s size 125 Updating WidgetWindow 128 Laying out the widgets 126 Creating a GC object 134 Drawing shapes on a Canvas Painting and PaintEvents 138 Clipping and. .. operating system Both Swing and SWT/ JFace create Java-based, platform-independent GUIs But their methods differ in nearly every other respect SWT/ JFace rendering The most prominent aspect of SWT/ JFace involves its direct access to the operating system Rather than reinventing graphics for its GUIs, it uses heavyweight components from the underlying platform This decision makes possible the speed and appearance... enough for both SWT and Swing, and we hope the two camps will be able to put aside their differences and concentrate on improving the Java community as a whole 1.3 SWT/ JFace: licensing and platform support Before continuing with the code, we’d like to touch on two important concerns regarding building applications with SWT/ JFace The first involves the lack of strings attached to Eclipse and its development... widgets 299 Using FormToolkit and the Eclipse Forms containers Firing text-based events with Hyperlinks 302 13.5 Building a standalone RCP application 306 Exporting RCPExample to an application directory Adding plug-ins to the application directory 307 Executing the application 308 13.6 Summary 306 308 appendix A Creating projects with SWT/ JFace appendix B 299 OLE and ActiveX in SWT/ JFace 311 324 appendix... end user’s operating system When you add an SWT Button object to your application, it will look and act like a Windows button on Windows, a Macintosh button on Macintosh, and a Linux button on a Linux system Users will think that you wrote the GUI specifically for their machines, and they’ll have no idea that you wrote the code only once using SWT In addition to graphical components, SWT also provides... of whatever operating system they run on, and why they were created in the first place 1.2 Looking under the hood Adding components, events, and graphics to a user interface isn’t a new idea Therefore, to see why the SWT/ JFace toolset has caused such a stir, you need to understand what its designers were thinking This means investigating the principles behind Java GUI development and how these libraries... important topics to understand in order to fully master SWT and JFace, but they aren’t essential to get a basic application running We discuss subjects such as Licensed to jromero ABOUT THIS BOOK xxi implementing drag and drop, interacting with the operating system’s clipboard, and embedding a web browser in your application Chapter 13, “Looking beyond SWT/ JFace: the Rich Client . classes and packages within SWT and JFace. Chapter 2, “Getting started with SWT/ JFace, ” shows you how to set up a project to use SWT and JFace, either within. 21 Coding in JFace and SWT/ JFace 23 The ApplicationWindow class 23 2.3 Beginning the WidgetWindow application 24 2.4 Summary 26 3 Widgets: part 1 27 3.1 Introducing

Ngày đăng: 20/03/2014, 15:41

TỪ KHÓA LIÊN QUAN