C Platform-Specific Event Handling
Số trang: 14
Loại file: pdf
Dung lượng: 74.12 KB
Lượt xem: 9
Lượt tải: 0
Xem trước 2 trang đầu tiên của tài liệu này:
Thông tin tài liệu:
Cuộc sống của tôi với Java bắt đầu vào Tháng Chín năm 1995. Tôi bắt đầu trên một Sparc20 Sun và kể từ đó đã được sử dụng Java trên Windows 95, Windows NT (3.51/4.0), một PowerMac, và phiên bản đầu tiên của một nhà ga Java. Vào lúc đó tôi bắt đầu sử dụng Java, nó được trong phiên bản alpha của nó 3. Ngay cả trước khi phát hành phiên bản beta, đám đông Internet được hailing Java như một ngôn ngữ lập trình cho thiên niên kỷ tới, và người đã xếp hàng để theo học các...
Nội dung trích xuất từ tài liệu:
C Platform-Specific Event Handling In this appendix: • The Results • Test Program C Platform-Specific Event HandlingMy life with Java began in September of 1995. I started on a Sun Sparc20 and havesince used Java on Windows 95, Windows NT (3.51/4.0), a PowerMac, and an earlyversion of a Java terminal. At the time I started using Java, it was in its alpha 3release. Even before the beta release, the Internet crowd was hailing Java as theprogramming language for the next millennium, and people were lining up totake Sun’s Java training classes.Although Java has many important features, probably the most important is plat-form independence: you can compile a program once and run it anywhere. Atleast, that was the goal; and Java came impressively close to meeting that goal.However, there are some problems, particularly in the area of event handling. Javaprograms just do not act the same, from platform to platform, environment toenvironment. Even if you stay within Sun’s Java Developer’s Kit, you cannot take aprogram created on one platform, move it to another, and be guaranteed that itwill react the same way to the user’s interactions. To make matters worse, Netscape,the makers of the first run-time environment for beta API applets, Netscape,decided to take matters into its own hands with Navigator version 3.0; its version ofAWT behaves slightly differently than the JDK’s. On top of that, Navigator itself dif-fers from platform to platform. Version 1.1 of the JDK introduces more idiosyn-crasies, even as it resolves some others.With more Java environments available, HotJava, Internet Explorer, and Java termi-nals to name a few, and new official extensions to AWT coming out, the differencesare expanding, instead of contracting. Hopefully, there will be a day when thisappendix can go away, completely. Until that time, I’ve tried to document thebehavior of different run-time systems, on different platforms. If the platform is 10031004 APPENDIX C: PLATFORM-SPECIFIC EVENT HANDLINGnot included in this appendix, the source for a test program is. If you run the pro-gram on your platform and send the results to me at jaz@ora.com, they will beincluded in a future printing or provided online. The test program requires user-interaction, so please follow directions carefully. Between printings, the book’sWeb site will maintain the latest information at http://www.ora.com/cata-log/javawt/. Only the results from using the latest releases of each platform areincluded in Table C-1.C.1 The ResultsTable C-1 shows the events delivered to each component on the major platforms inJava 1.0. An in a particular entry means that the event is passed to Java from thecomponent’s peer; a dash means it is not.Table C–1: Component Events in Java 1.0Component/Events vs. NN3.0 NN3.0 NN3.0 SDK JDK JDK JDK IE3.0 HJ HJRun-time/Platform NT/ Mac Sun NT/ NT/ Mac Sun NT/ NT/ Sun Win95 Win95 Win95 Win95 Win95 ButtonKEY_PRESS — — KEY_RELEASE — — KEY_ACTION — — — KEY_ACTION_RELEASE — — — MOUSE_DOWN — — — — — — — —MOUSE_UP — — — — — — —MOUSE_MOVE — — — — — — —MOUSE_ENTER — — — — — — —MOUSE_EXIT — — — — — — —MOUSE_DRAG — — — — — — — —ACTION_EVENT GOT_FOCUS — — — — — — — —LOST_FOCUS — — — — — — — — CanvasKEY_PRESS — —KEY_RELEASE — —KEY_ACTION — — —KEY_ACTION_RELEASE — — — —MOUSE_DOWN MOUSE_UP ...
Nội dung trích xuất từ tài liệu:
C Platform-Specific Event Handling In this appendix: • The Results • Test Program C Platform-Specific Event HandlingMy life with Java began in September of 1995. I started on a Sun Sparc20 and havesince used Java on Windows 95, Windows NT (3.51/4.0), a PowerMac, and an earlyversion of a Java terminal. At the time I started using Java, it was in its alpha 3release. Even before the beta release, the Internet crowd was hailing Java as theprogramming language for the next millennium, and people were lining up totake Sun’s Java training classes.Although Java has many important features, probably the most important is plat-form independence: you can compile a program once and run it anywhere. Atleast, that was the goal; and Java came impressively close to meeting that goal.However, there are some problems, particularly in the area of event handling. Javaprograms just do not act the same, from platform to platform, environment toenvironment. Even if you stay within Sun’s Java Developer’s Kit, you cannot take aprogram created on one platform, move it to another, and be guaranteed that itwill react the same way to the user’s interactions. To make matters worse, Netscape,the makers of the first run-time environment for beta API applets, Netscape,decided to take matters into its own hands with Navigator version 3.0; its version ofAWT behaves slightly differently than the JDK’s. On top of that, Navigator itself dif-fers from platform to platform. Version 1.1 of the JDK introduces more idiosyn-crasies, even as it resolves some others.With more Java environments available, HotJava, Internet Explorer, and Java termi-nals to name a few, and new official extensions to AWT coming out, the differencesare expanding, instead of contracting. Hopefully, there will be a day when thisappendix can go away, completely. Until that time, I’ve tried to document thebehavior of different run-time systems, on different platforms. If the platform is 10031004 APPENDIX C: PLATFORM-SPECIFIC EVENT HANDLINGnot included in this appendix, the source for a test program is. If you run the pro-gram on your platform and send the results to me at jaz@ora.com, they will beincluded in a future printing or provided online. The test program requires user-interaction, so please follow directions carefully. Between printings, the book’sWeb site will maintain the latest information at http://www.ora.com/cata-log/javawt/. Only the results from using the latest releases of each platform areincluded in Table C-1.C.1 The ResultsTable C-1 shows the events delivered to each component on the major platforms inJava 1.0. An in a particular entry means that the event is passed to Java from thecomponent’s peer; a dash means it is not.Table C–1: Component Events in Java 1.0Component/Events vs. NN3.0 NN3.0 NN3.0 SDK JDK JDK JDK IE3.0 HJ HJRun-time/Platform NT/ Mac Sun NT/ NT/ Mac Sun NT/ NT/ Sun Win95 Win95 Win95 Win95 Win95 ButtonKEY_PRESS — — KEY_RELEASE — — KEY_ACTION — — — KEY_ACTION_RELEASE — — — MOUSE_DOWN — — — — — — — —MOUSE_UP — — — — — — —MOUSE_MOVE — — — — — — —MOUSE_ENTER — — — — — — —MOUSE_EXIT — — — — — — —MOUSE_DRAG — — — — — — — —ACTION_EVENT GOT_FOCUS — — — — — — — —LOST_FOCUS — — — — — — — — CanvasKEY_PRESS — —KEY_RELEASE — —KEY_ACTION — — —KEY_ACTION_RELEASE — — — —MOUSE_DOWN MOUSE_UP ...
Tìm kiếm theo từ khóa liên quan:
thủ thuật máy tính công nghệ thông tin tin học quản trị mạng computer networkGợi ý tài liệu liên quan:
-
52 trang 430 1 0
-
24 trang 355 1 0
-
Top 10 mẹo 'đơn giản nhưng hữu ích' trong nhiếp ảnh
11 trang 314 0 0 -
Làm việc với Read Only Domain Controllers
20 trang 303 0 0 -
74 trang 299 0 0
-
96 trang 293 0 0
-
Báo cáo thực tập thực tế: Nghiên cứu và xây dựng website bằng Wordpress
24 trang 289 0 0 -
Đồ án tốt nghiệp: Xây dựng ứng dụng di động android quản lý khách hàng cắt tóc
81 trang 281 0 0 -
EBay - Internet và câu chuyện thần kỳ: Phần 1
143 trang 275 0 0 -
Tài liệu dạy học môn Tin học trong chương trình đào tạo trình độ cao đẳng
348 trang 269 1 0