Sunday, August 15, 2010

Developing Java Beans












Dedication.......................................................................... 2
Preface............................................................................... 2
Intended Audience .......................................................... 3
A Moment in Time........................................................... 3
How the Book Is Organized ............................................ 3
Conventions Used in This Book...................................... 5
Acknowledgments........................................................... 5
How to Contact Us .......................................................... 6
Providing Feedback to the Author .................................. 6
Retrieving Examples Online ........................................... 6
Chapter 1. Introduction .................................................... 6
The Component Model ................................................... 7
The JavaBeans Architecture........................................... 9
JavaBeans Overview...................................................... 11
Using Design Patterns .................................................... 14
JavaBeans vs. ActiveX ................................................... 14
Getting Started................................................................ 15
Chapter 2. Events.............................................................. 15
The Java Event Model .................................................... 15
Events in the AWT Package ........................................... 25
Chapter 3. Event Adapters............................................... 30
Demultiplexing ................................................................ 30
Generic Adapters ............................................................ 35
Event Adapters in the AWT Package ............................. 40
Event Filtering................................................................. 43
Event Queuing ................................................................ 44
Chapter 4. Properties........................................................ 50
Accessing Properties ...................................................... 50
Indexed Properties.......................................................... 53
Bound Properties ............................................................ 55
Constrained Properties ................................................... 60
Handling Events for Specific Properties ......................... 64
A java.awt Example ........................................................ 64
Chapter 5. Persistence ..................................................... 70
Object Serialization......................................................... 71
The java.io.Serializable Interface.................................... 72
Class-Specific Serialization ............................................ 78
Walking the Class Hierarchy........................................... 79
Serializing Event Listeners ............................................. 90
Versioning ....................................................................... 92
Object Validation............................................................. 94
The java.io.Externalizable Interface................................ 96
Instantiating Serialized Objects ...................................... 99
Chapter 6. JAR Files ......................................................... 102
The jar Program.............................................................. 102
The Manifest ................................................................... 104
Using JAR Files with HTML ............................................ 106
Using JAR Files on the CLASSPATH............................. 107
Archive Signing............................................................... 108
An Alternative to the jar Program.................................... 108
Chapter 7. The BeanBox Tool .......................................... 109
Running BeanBox ........................................................... 109
Dropping Beans on BeanBox ......................................... 111
Editing a Bean’s Properties ............................................ 111
Hooking Up Beans .......................................................... 113
Saving and Restoring the BeanBox Form ...................... 115
Adding Your Own Beans to BeanBox ............................. 115
Chapter 8. Putting It All Together.................................... 116
Defining the Temperature Control Simulator .................. 117
Building the Simulator ..................................................... 118
A Sample Simulator Applet ............................................. 145
Creating a JAR File......................................................... 147
Recreating the Sample Using BeanBox ......................... 148
Chapter 9. Introspection................................................... 150
The BeanInfo Interface ................................................... 150
Providing Additional BeanInfo Objects ........................... 166
Introspecting the Environment ........................................ 168
The BeansBook.SimulatorBeanInfo Classes.................. 169
Chapter 10. Property Editors and Customizers ............. 173
Property Editors .............................................................. 174
Customizers .................................................................... 188
Chapter 11. ActiveX .......................................................... 197
The JavaBeans ActiveX Bridge ...................................... 198
Technology Mapping ...................................................... 203
Using Beans in Visual Basic ........................................... 204
Appendix A. Design Patterns........................................... 212
A.1 Event Objects ........................................................... 212
A.2 Event Listeners......................................................... 213
A.3 Registering for Event Notification ............................. 213
A.4 Registering for Unicast Event Notification ................ 213
A.5 Multiple Parameter Event Methods .......................... 213
A.6 Property Access Methods ........................................ 214
A.7 Indexed Property Access Methods........................... 214
A.8 Constrained Property Access Methods .................... 214
A.9 Registering for Bound and Constrained Property
Event Notifications .......................................................... 215
A.10 Naming a BeanInfo Class....................................... 215
Appendix B. The java.beans Package............................. 215


Download

Another Java books

No comments:

Post a Comment

Related Posts with Thumbnails

Put Your Ads Here!