图书介绍
JAVA设计模式PDF|Epub|txt|kindle电子书版本网盘下载
![JAVA设计模式](https://www.shukui.net/cover/74/34322993.jpg)
- (美)库珀(Cooper,J.W.)编著 著
- 出版社: 北京:科学出版社
- ISBN:7030124944
- 出版时间:2004
- 标注页数:329页
- 文件大小:10MB
- 文件页数:348页
- 主题词:JAVA语言-程序设计-英文
PDF下载
下载说明
JAVA设计模式PDF格式电子书版下载
下载的文件为RAR压缩包。需要使用解压软件进行解压得到PDF格式图书。建议使用BT下载工具Free Download Manager进行下载,简称FDM(免费,没有广告,支持多平台)。本站资源全部打包为BT种子。所以需要使用专业的BT下载软件进行下载。如BitComet qBittorrent uTorrent等BT下载工具。迅雷目前由于本站不是热门资源。不推荐使用!后期资源热门了。安装了迅雷也可以迅雷进行下载!
(文件页数 要大于 标注页数,上中下等多册电子书除外)
注意:本站所有压缩包均有解压码: 点击下载压缩包解压工具
图书目录
Section 1 What Are Design Patterns?1
Chapter 1 Introduction3
Defining Design Patterns5
The Learning Process6
Studying Design Patterns7
Notes on Object-Oriented Approaches7
The Java Foundation Classes8
Java Design Patterns9
Chapter 2 UML Diagrams11
Inheritance12
Interfaces13
CONTENTSPreface13
Composition14
Acknowledgments15
Annotation15
JVISION UML Diagrams15
Visual SlickEdit Project Files15
Section 2 Creational Patterns17
Chapter 3 The Factory Pattern19
How a Factory Works19
Sample Code20
The Two Subclasses20
Building the Simple Factory21
Factory Patterns in Math Computation23
Thought Questions24
Programs on the CD-ROM24
Chapter 4 The Factory Method25
The Swimmer Class27
The Event Classes27
Straight Seeding28
Our Seeding Program30
Other Factories30
When to Use a Factory Method31
Thought Question31
Programs on the CD-ROM31
Chapter 5 The Abstract Factory Pattern33
A GardenMaker Factory34
How the User Interface Works36
Adding More Classes37
Consequences of the Abstract Factory Pattern37
Thought Question38
Programs on the CD-ROM38
Chapter 6 The Singleton Pattern39
Creating a Singleton Using a Static Method39
Exceptions and Instances40
Throwing an Exception41
Creating an Instance of the Class41
Providing a Global Point of Access to a Singleton Pattern42
The javax.comm Package as a Singleton43
Other Consequences of the Singleton Pattern46
Thought Question47
Programs on the CD-ROM47
Chapter 7 The Builder Pattern49
An Investment Tracker50
Calling the Builders52
The List Box Builder54
The Check Box Builder54
Consequences of the Builder Pattern55
Thought Questions56
Programs on the CD-ROM56
Chapter 8 The Prototype Pattern57
Using the Prototype58
Cloning in Java58
Using the Prototype Pattern61
Prototype Managers64
Cloning Using Serialization65
Consequences of the Prototype Pattern66
Thought Question66
Programs on the CD-ROM67
Summary of Creational Patterns67
Section 3 Structural Patterns69
Moving Data between Lists71
Chapter 9 The Adapter Pattern71
Using the JFC JList Class73
Two-Way Adapters78
Pluggable Adapters78
Adapters in Java79
Thought Question81
Programs on the CD-ROM81
Chapter 10 The Bridge Pattern83
The Class Diagram85
Extending the Bridge86
Java Beans as Bridges87
Consequences of the Bridge Pattern88
Thought Question89
Programs on the CD-ROM89
Chapter 11 The Composite Pattern91
An Implementation of a Composite92
Computing Salaries93
The Employee Classes93
The Boss Class95
Building the Employee Tree97
Self-Promotion98
Doubly Linked List99
Consequences of the Composite Pattern100
A Simple Composite100
Composites in Java100
Thought Questions101
Programs on the CD-ROM101
Other Implementation Issues101
Chapter 12 The Decorator Pattern103
Decorating a CoolButton103
Using a Decorator105
The Class Diagram107
Decorating Borders in Java108
Nonvisual Decorators109
Decorators, Adapters, and Composites112
Programs on the CD-ROM113
Consequences of the Decorator Pattern113
Thought Questions113
Chapter 13 The Fa?ade Pattern115
Building the Fa?ade Classes117
Consequences of the Fa?ade Pattern120
Notes on Installing and Running the dbFrame Program121
Thought Question122
Programs on the CD-ROM122
Chapter 14 The Flyweight Pattern123
Discussion124
Example Code124
Flyweight Uses in Java129
Sharable Objects130
Copy-on-Write Objects130
Thought Question131
Programs on the CD-ROM131
Chapter 15 The Proxy Pattern133
Sample Code134
Copy-on-Write136
Enterprise Java Beans136
Comparison with Related Patterns137
Thought Question137
Programs on the CD-ROM137
Summary of Structural Patterns137
Section 4 Behavioral Patterns139
Chapter 16 Chain of Responsibility Pattern141
Applicability142
Sample Code143
The List Boxes145
Programming a Help System148
A Chain or a Tree?151
Kinds of Requests152
Examples in Java152
Consequences of the Chain of Responsibility153
Thought Questions153
Programs on the CD-ROM154
Chapter 17 The Command Pattern155
Motivation155
Command Objects156
Building Command Objects157
The Command Pattern159
The Command Pattern in the Java Language161
Consequences of the Command Pattern162
Providing Undo163
Thought Questions167
Programs on the CD-ROM168
Chapter 18 The Interpreter Pattern169
Motivation169
Applicability170
Simple Report Example170
Interpreting the Language171
Objects Used in Parsing172
Reducing the Parsed Stack175
Implementing the Interpreter Pattern176
Consequences of the Interpreter Pattern180
Thought Question181
Programs on the CD-ROM181
Chapter 19 The Iterator Pattern183
Motivation183
Enumerations in Java184
Sample Code184
Filtered Iterators185
Consequence of the Iterator Pattern188
Composites and Iterators189
Iterators in Java 1.2189
Thought Question189
Programs on the CD-ROM190
Chapter 20 The Mediator Pattern191
An Example System191
Interactions between Controls193
Sample Code194
Mediators and Command Objects197
Consequences of the Mediator Pattern198
Single Interface Mediators198
Implementation Issues199
Programs on the CD-ROM199
Chapter 21 The Memento Pattern201
Motivation201
Implementation202
Sample Code203
Consequences of the Memento Pattern207
Thought Question208
Programs on the CD-ROM208
Chapter 22 The Observer Pattern209
Watching Colors Change210
The Message to the Media213
The JList as an Observer214
Consequences of the Observer Pattern216
The Observer Interface and Observable Class216
The MVC Architecture as an Observer216
Thought Questions217
Programs on the CD-ROM217
Chapter 23 The State Pattern219
Sample Code219
Switching between States224
How the Mediator Interacts with the StateManager225
Consequences of the State Pattern227
Mediators and the God Class227
State Transitions227
Thought Questions228
Programs on the CD-ROM228
Chapter 24 The Strategy Pattern229
Motivation229
Sample Code230
The Context Class231
The Program Commands232
Drawing Plots in Java233
The Line and Bar Graph Strategies233
Consequences of the Strategy Pattern236
Thought Question237
Programs on the CD-ROM237
Chapter 25 The Template Pattern239
Motivation239
Kinds of Methods in a Template Class241
Template Method Patterns in Java241
Sample Code242
Templates and Callbacks246
Consequences of the Template Pattern247
Thought Question247
Programs on the CD-ROM247
Chapter 26 The Visitor Pattern249
Motivation249
When to Use the Visitor Pattern251
Sample Code251
Visiting Several Classes253
Visiting the Classes253
Bosses are Employees, Too255
Catch-All Operations Using Visitors256
Double Dispatching257
Traversing a Series of Classes257
Consequence of the Visitor Pattern257
Thought Question258
Programs on the CD-ROM258
Section 5 Design Patterns and the Java Foundation Classes259
Chapter 27 The JFC, or Swing261
Installing and Using Swing261
Ideas behind Swing262
The Swing Class Hierarchy262
Chapter 28 Writing a Simple JFC Program263
Setting the Look and Feel263
Setting the Window Close Box264
Making a JxFrame Class264
A Simple Two-Button Program265
More on JButton266
Programs on the CD-ROM267
Chapter 29 Radio Buttons and Toolbars269
Radio Buttons269
The JToolBar270
JToggleButton270
A Sample Button Program271
Programs on the CD-ROM271
Action Objects273
Chapter 30 Menus and Actions273
Design Patterns in the Action Object276
Programs on the CD-ROM277
Chapter 31 The JList Class279
List Selections and Events280
Changing a List Display Dynamically281
A Sorted JList with a ListModel282
Sortirg More-Complicated Objects284
Getting Database Keys286
Adding Pictures in List Boxes288
Programs on the CD-ROM289
Chapter 32 The JTable Class291
A Simple JTable Program291
Cell Renderers295
Rendering Other Kinds of Classes296
Selecting Cells in a Table298
Patterns Used in This Image Table299
Programs on the CD-ROM301
Chapter 33 The JTree Class303
The TreeModel Interface305
Programs on the CD-ROM305
Summary305
Section 6 Case Studies307
Chapter 34 Sandy and the Mediator309
Chapter 35 Herb'sText ProcessingTangle313
Chapter 36 Mary's Dilemma315
Bibliography317