TAILIEUCHUNG - Addison Wesley - The Design Patterns Java Companion (1998)

This book, commonly referred to as the Gang of Four or “GoF” book, has had a powerful impact on those seeking to understand how to use design patterns and has become an all-time best seller. We will refer to this groundbreaking book as Design Patterns, throughout this book and The Design Patterns Smalltalk Companion (Alpert, Brown and Woolf, 1998) as the Smalltalk Companion. | 1 2 THE DESIGN PATTERNS JAVA COMPANION JAMES W. COOPER October 2, 1998 Copyright © 1998, by James W. Cooper 3 Some Background on Design Patterns 10 Defining Design Patterns 11 This Book and its Parentage 13 The Learning Process 13 Studying Design Patterns 14 Notes on Object Oriented Approaches 14 The Java Foundation Classes 15 Java Design Patterns 15 1. Creational Patterns 17 The Factory Pattern 18 How a Factory Works 18 Sample Code 18 The Two Derived Classes 19 Building the Factory 20 Factory Patterns in Math Computation 22 When to Use a Factory Pattern 24 Thought Questions 25 The Abstract Factory Pattern 26 A GardenMaker Factory 26 How the User Interface Works 28 Consequences of Abstract Factory 30 Thought Questions 30 The Singleton Pattern 31 Throwing the Exception 32 Creating an Instance of the Class 32 Static Classes as Singleton Patterns 33 Creating Singleton Using a Static Method 34 4 Finding the Singletons in a Large Program 35 Other Consequences of the Singleton Pattern 35 The Builder Pattern 37 An Investment Tracker 38 Calling the Builders 40 The List Box Builder 42 The Checkbox Builder 43 Consequences of the Builder Pattern 44 Thought Questions 44 The Prototype Pattern 45 Cloning in Java 45 Using the Prototype 47 Consequences of the Prototype Pattern 50 Summary of Creational Patterns 51 2. The Java Foundation Classes 52 Installing and Using the JFC 52 Ideas Behind Swing 53 The Swing Class Hierarchy 53 Writing a Simple JFC Program 54 Setting the Look and Feel 54 Setting the Window Close Box 55 Making a JxFrame Class 55 A Simple Two Button Program 56 More on JButtons 57 Buttons and Toolbars 59 Radio Buttons 59 The JToolBar 59 Toggle Buttons 60 5 Sample Code 61 Menus and Actions 62 Action Objects 62 Design Patterns in the Action Object 65 The JList Class 67 List Selections and Events 68 Changing a List Display Dynamically 69 The JTable Class 71 A Simple JTable Program 71 Cell Renderers 74 The JTree Class 77 The TreeModel Interface 78 Summary 79 3. .

TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.