Optimize with a SATA RAID Storage Solution
Range of capacities as low as $1250 per TB. Ideal if you currently rely on servers/disks/JBODs
Sally: I'd like the chef salad please with oil and vinegar on the side, and the apple pie a la mode.
Waitress: Chef and apple a la mode.
Sally: But I'd like the pie heated, and I don't want the ice cream on top. I want it on the side, and I'd like strawberry instead of vanilla if you have it. If not, then no ice cream, just whipped cream, but only if it's real. If it's out of the can, then nothing.
Waitress: Not even the pie?
Sally: No, just the pie, but then not heated.
This was Meg Ryan in the role of Sally Albright in the movie When Harry Met Sally.
Sally knows exactly what she wants. As an application designer, so do you. Fortunately, no matter how complex your customization requirements may be, JavaBeans is up to the task. Customization allows an application developer to control the behavior and appearance of a software component. Making a component customizable greatly extends where it can be used. For example, consider a Spreadsheet bean. If such a bean insisted on taking up the whole screen, or clashed with the color scheme of your application, or only displayed its data in hexadecimal, you might not be able to use it -- even if it provided all of the other functionality you needed. A customizable bean has properties (like number of cells, color, and so on) that a developer can view and modify, custom-fitting the bean to the application.
The JavaBeans Specification (hereafter known as "the JavaBeans Spec") includes features that make identifying and modifying component properties extremely easy in simple cases, and provides extensions for more complex situations.
This month, we'll explore the JavaBeans customization interface. You'll learn about component properties, and how to write your beans so that integrated development environments (IDEs) can present those properties to applications developers. We'll discuss bound and constrained properties, which help beans communicate or maintain consistency. We'll also touch on special-case customizers for situations in which you want more control over customization. Finally, we'll start using the BeanBox, Sun's free testbed for JavaBeans. (For more on the BeanBox, see my companion article in this month's JavaWorld: "The BeanBox: SunSoft's JavaBeans test container.")
Software components typically are general-purpose "chunks" of functionality and data, written to be usable in a variety of
situations. (For an introduction to JavaBeans, see last month's column in JavaWorld, "A walking tour of JavaBeans.") What's important about customization? A software component can be used in a wider range of applications when the application
developer has control over its appearance and behavior. For example, a PushButton class wouldn't be very useful if its text label were always the word "Button," and its associated action were always, say,
to reboot your machine (although with some operating systems, this might be one of your most useful tools).
Even a component as simple as a lowly PushButton may have many attributes that a developer might want to control, including:
java.awt.beans is documented at the following URL. This documentation includes descriptions of the classes discussed in this article. http://java.sun.com/products/jdk/1.1/docs/api/Package-java.beans.html