This Magercise focuses on the design and implementation of a customization dialog, as well as its specification within the bean-info class.
The first step is to create a working directory somewhere on your filesystem, hereafter referred to as workingdir.
Next, create the directory stickfigure (all lowercase characters) directly under workingdir.
Next, (1) save all the skeleton files, except the *.java files and GIF file, within workingdir and (2) save the *.java skeleton files and GIF file within stickfigure, that is, within workingdir/stickfigure.
The next, and primary, task is to design and implement a customizer dialog for the body-part properties, the "sunburned" property, and the "mood" property. The skeleton code appears in StickFigureCustomizer.java. This class must extend a container class, for example, Panel and implement the Customizer interface.
The customization dialog should provide controls for each of the body-part properties, as well as for the "sunburned" property, for example, independent (nonexclusive) Checkbox instances organized in a nested panel. Also, it should provide a radio button-style control for the "mood" property.
The next task is to augment the bean-info class, StickFigureBeanInfo. Add a getBeanDescriptor() method that returns a BeanDescriptor instance and associates StickFigureCustomizer.class with StickFigure.class.
Compile all JavaTM source files, *.java, from workingdir by including the stickfigure directory in the path specification.
Build StickFigure.jar from workingdir by executing the file MakeStickFigureJar.bat (Windows) or MakeStickFigureJar.sh (UNIX).
Next, load the StickFigure Bean into the BeanBox (or a comparable tool) using "LoadJar..." from the BeanBox "File" menu.
Lastly, test the customizer dialog for StickFigure Bean. Activate the dialog by choosing "Customize..." from the BeanBox's "Edit" menu--the customizer dialog is modal (a blocking dialog). Other Bean-aware tools may, for example, provide a "Customize" command button in the property sheet, or elsewhere.
Verify that selecting different values from the toggle buttons changes the image so that it displays various combinations of body parts. Verify that the radio buttons correctly manipulate the mood, and that changes to mood from the customizer are immediately reflected in the property sheet.
Notice the restricted number of properties displayed in the property sheet, as well as the custom "mood" property editor.