Java Event Handling (Paperback)

Grant Palmer

  • 出版商: Prentice Hall
  • 出版日期: 2001-08-08
  • 定價: $1,500
  • 售價: 6.0$900
  • 語言: 英文
  • 頁數: 590
  • 裝訂: Paperback
  • ISBN: 0130418021
  • ISBN-13: 9780130418029
  • 相關分類: Java 程式語言
  • 立即出貨(限量) (庫存=9)

買這商品的人也買了...

相關主題

商品描述

The only start-to-finish guide to Java event handling.

  • Unlocks the power of Java event handling to enhance GUI development
  • Teaches basic skills and advanced event programming techniques
  • Provides complete technical references to all Java events
  • Stand-alone examples demonstrate the potential of Java events
  • Covers event classes, interfaces, the Java event model, and more!

Efficient event handling is key to creating powerful, GUI-based Java software. Java Event Handling is the first Java book to focus entirely on event handling, from the absolute basics to state-of-the-art techniques. Expert Java developer Grant Palmer presents an in-depth introduction to the Java event model, showing how event handling has evolved to provide greater power and control, and demonstrating how to take full advantage of it. Coverage includes:

  • Local and distributed events: differences, similarities, and practical
  • techniques
  • Detailed technical reference to all Java events: event classes,
  • listener interfaces, support classes, lifecycle methods, and more
  • Advanced techniques: event listener manager classes, user-defined
  • event classes, event listeners, and more
  • Dozens of practical, easy-to-adapt code examples

Whatever your Java experience, Java Event Handling delivers the expert insights and practical guidance you need to supercharge virtually any GUI-based application.

Table of Contents

Acknowledgments.
Introduction.

A Roadmap for this Book. A Note on the Code Examples. What This Book is Not.


About the Author.

I. THE BASICS.

1. An Introduction to Java Events.

What Is an Event? Local Versus Distributed Events. The Evolution of Java Event Handling. The Java Event Model. The Java 1.0 Event Model. The Java 1.1 Event Model.


2. The Java Event Life Cycle.

Event Life Cycle Methods. Basic Event Life Cycle Methods from the Component Class. Event Processing Methods. Methods to Fire Events. Deprecated Methods from the Component Class. Event Life Cycle Methods Defined in the Component Subclasses.


3. Event Classes.

Event and Support Class Hierarchy. Low-Level Versus High-Level Event Types. A Description of the Event Classes in the J2SE. The EventObject Class. The AWTEvent Class. Low-Level Event Classes Defined in the java.awt.event Package. High-Level Event Classes Defined in the java.awt.event Package. Special Event Classes Defined in the java.awt.event Package. Low-Level Event Classes Defined in the javax.swing.event Package. High-Level Event Classes Defined in the javax.swing.event Package. High-Level Event Interfaces Defined in the javax.swing.event Package. Event Support Classes Defined in the javax.swing.event Package. Event and Support Classes Defined in the java.beans Package. Event Classes Defined in the javax.swing.text.html Package. Event Support Classes Defined in the javax.swing.undo Package. Other Event Classes Defined in the J2SE. User-Generated Events. User-Defined Events.


4. Event Listeners.

A Brief Review of Interfaces. Event Listener Interfaces in the J2SE. EventListener Interface. Listener Interfaces Contained in the java.awt.event Package. Listener Interfaces Contained in the javax.swing.event Package. Listener Interfaces Contained in the java.beans Package. Other Listener Interfaces Defined in the J2SE. Event Listener Objects. Creating an Event Listener. Method 1: Have a GUI Component Serve as the Event Listener. Method 2: Implement the Event Listener as a Separate Class. Method 3: Implement the Event Listener as an Inner Class. Method 4: Implement the Event Listener as an Anonymous Inner Class. Listener Adapter Classes. Listener Adapter Classes Contained in the java.awt.event Package. Listener Adapter Classes Contained in the javax.swing.event Package. User-Defined Event Listener Interfaces. Connecting an Event Source to an Event Listener. Disconnecting an Event Source from an Event Listener. The getListeners() Method. Event Listener Manager Classes. AWTEventMulticaster Class. EventListenerList Class.


5. Event Handling Odds and Ends.

Determining the Event Source. Consuming Events. Event Consumption Methods. The Event Queue. EventQueue Class. The Event-Dispatching Thread. Running Code in the Event-Dispatching Thread.

II. A JAVA EVENT REFERENCE.


6. Event Classes and Interfaces.

ActionEvent Class. ActiveEvent Interface. AdjustmentEvent Class. AncestorEvent Class. AWTEvent Class. CaretEvent Class. ChangeEvent Class. ComponentEvent Class. ContainerEvent Class. DocumentEvent Interface. DocumentEvent.ElementChange Interface. DocumentEvent.EventType Class. EventObject Class. FocusEvent Class. HierarchyEvent Class. HTMLFrameHyperlinkEvent Class. HyperlinkEvent Class. HyperlinkEvent.EventType Class. InputEvent Class. InputMethodEvent Class. InternalFrameEvent Class. InvocationEvent Class. ItemEvent Class. KeyEvent Class. ListDataEvent Class. ListSelectionEvent Class. MenuDragMouseEvent Class. MenuEvent Class. MenuKeyEvent Class. MouseEvent Class. PaintEvent Class. PopupMenuEvent Class. PropertyChangeEvent Class. TableColumnModelEvent Class. TableModelEvent Class. TextEvent Class. TreeExpansionEvent Class. TreeModelEvent Class. TreeSelectionEvent Class. UndoableEditEvent Class. WindowEvent Class. Other Event Classes in the J2SE.


7. Event Support Classes.

PropertyChangeSupport Class. SwingPropertyChangeSupport Class. UndoableEditSupport Class. VetoableChangeSupport Class.


8. Event Listener Interfaces.

ActionListener Interface. AdjustmentListener Interface. AncestorListener Interface. AWTEventListener Interface. CaretListener Interface. CellEditorListener Interface. ChangeListener Interface. ComponentListener Interface. ContainerListener Interface. DocumentListener Interface. EventListener Interface. FocusListener Interface. HierarchyBoundsListener Interface. HierarchyListener Interface. HyperlinkListener Interface. InputMethodListener Interface. InternalFrameListener Interface. ItemListener Interface. KeyListener Interface. ListDataListener Interface. ListSelectionListener Interface. MenuDragMouseListener Interface. MenuKeyListener Interface. MenuListener Interface. MouseInputListener Interface. MouseListener Interface. MouseMotionListener Interface. PopupMenuListener Interface. PropertyChangeListener Interface. TableColumnModelListener Interface. TableModelListener Interface. TextListener Interface. TreeExpansionListener Interface. TreeModelListener Interface. TreeSelectionListener Interface. TreeWillExpandListener Interface. UndoableEditListener Interface. VetoableChangeListener Interface. WindowListener Interface. Other Listener Interfaces in the J2SE.


9. Listener Adapter Classes.

ComponentAdapter Class. ContainerAdapter Class. FocusAdapter Class. HierarchyBoundsAdapter Class. InternalFrameAdapter Class. KeyAdapter Class. MouseAdapter Class. MouseInputAdapter Class. MouseMotionAdapter Class. WindowAdapter Class.


10. Event Life Cycle Methods.

AbstractAction Class Methods. AbstractButton Class Methods. AbstractCellEditor Class Methods. AbstractListModel Class Methods. Button Class Methods. Checkbox Class Methods. CheckboxMenuItem Class Methods. Choice Class Methods. Component Class Methods. Container Class Methods. DefaultBoundedRangeModel Class Methods. DefaultButtonModel Class Methods. DefaultListCellRenderer Class Methods. DefaultListSelectionModel Class Methods. DefaultSingleSelectionModel Class Methods. JApplet Class Methods. JComboBox Class Methods. JComponent Class Methods. JDialog Class Methods. JEditorPane Class Methods. JFrame Class Methods. JInternalFrame Class Methods. JList Class Methods. JMenu Class Methods. JMenuBar Class Methods. JMenuItem Class Methods. JPopupMenu Class Methods. JProgressBar Class Methods. JScrollBar Class Methods. JSlider Class Methods. JTabbedPane Class Methods. JTextArea Class Methods. JTextField Class Methods. JTree Class Methods. JViewport Class Methods. List Class Methods. MenuComponent Class Methods. MenuItem Class Methods. PropertyChangeSupport Class Methods. Scrollbar Class Methods. SwingPropertyChangeSupport Class Methods. TextComponent Class Methods. TextField Class Methods. Timer Class Methods. VetoableChangeSupport Class Methods. Window Class Methods.

III. ADVANCED TOPICS.


11. Event Listener Manager Classes.

AWTEventMulticaster Class. EventListenerList Class.


12. User-Defined Event Classes and Event Listeners.

Creating a User-Defined EventListener. Creating a User-Defined Event Class. Defining a Component that Supports a User-Defined Event. Putting it All Together.


13. Putting It All Together.

Stagnation Point Heating Rate Program. A Java Document Editor.


14. Distributed Events.

Distributed Event Model. Remote Event Classes. RemoteEvent Class. RemoteDiscoveryEvent Class. RenewalFailureEvent Class. ServiceEvent Class. Remote Event Listener Interfaces. Remote Interface. RemoteEventListener Interface. Remote Event Listener Support Classes. EventRegistration Class.


Appendix: Java GUI Components and the Events They Generate.
Index.

商品描述(中文翻譯)

唯一一本從頭到尾介紹Java事件處理的指南。

解鎖Java事件處理的力量,以增強GUI開發。

教授基本技能和高級事件編程技巧。

提供所有Java事件的完整技術參考。

獨立的示例展示了Java事件的潛力。

涵蓋事件類、接口、Java事件模型等內容!

高效的事件處理是創建功能強大的基於GUI的Java軟件的關鍵。《Java事件處理》是第一本完全專注於事件處理的Java書籍,從基礎知識到最先進的技術。Java專家Grant Palmer深入介紹了Java事件模型,展示了事件處理如何演變以提供更大的力量和控制,並演示如何充分利用它。內容包括:

本地和分佈式事件:差異、相似之處和實用技巧。

所有Java事件的詳細技術參考:事件類、監聽器接口、支持類、生命周期方法等。

高級技術:事件監聽器管理類、用戶定義事件類、事件監聽器等。

數十個實用且易於適應的代碼示例。

無論您的Java經驗如何,《Java事件處理》都提供了您需要的專家見解和實用指南,以加強幾乎任何基於GUI的應用程序。

目錄:

致謝。

介紹。

本書路線圖。

代碼示例注意事項。

關於作者。

第一部分:基礎知識。

1. Java事件介紹。

事件是什麼?本地事件與分佈式事件的區別。Java事件處理的演變。Java事件模型。Java 1.0事件模型。Java 1.1事件模型。

2. Java事件生命周期。

事件生命周期方法。Component類中的基本事件生命周期方法。事件處理方法。觸發事件的方法。Component類中的已棄用方法。Component子類中定義的事件生命周期方法。

3. 事件類。

事件和支持類的層次結構。低級和高級事件類型。J2SE中事件類的描述。EventObject類。AWTEvent類。java.awt.event包中定義的低級事件類。javax.swing.event包中定義的高級事件類。javax.swing.event包中定義的高級事件接口。javax.swing.event包中定義的事件支持類。java.beans包中定義的事件和支持類。javax.swing.text.html包中定義的事件類。javax.swing.undo包中定義的事件支持類。J2SE中定義的其他事件類。用戶生成的事件。用戶定義的事件。

4. 事件監聽器。

介面簡介。J2SE中的事件監聽器接口。EventListener接口。java.awt.event包中的監聽器接口。javax.swing.event包中的監聽器接口。java.beans包中的監聽器接口。J2SE中定義的其他監聽器接口。事件監聽器對象。創建事件監聽器。方法1:將GUI組件作為事件列表服務的方式。