next up previous NU-CCS-99-04.ps [ Readme | Copyright | Tutorial | Download | Feedback ]


Next: Moving Beans Up: How Are the Existing Previous: How Are the Existing

Adding a Bean

Most constructions start by putting a bean in the assembly window, i.e., in the BeanBox. This means clicking on one of the beans displayed in the ToolBox. Responding to the mouse click, the ToolBox creates a new instance of the selected bean (if possible), and passes it to the current BeanBox by invoking the doInsert() method. The current BeanBox will then wait for a mouse click on it to determine the position of the new bean. After the mouse button has been clicked, the current BeanBox:

1.
Creates a new wrapper for the new bean
2.
Places that wrapper inside itself (at the clicked position)

3.
Puts a new bean inside the BeanContext peer

4.
If the bean is an instance of an Applet, starts an applet

5.
If the bean is an instance of InfoBusMember, registers it to the info bus support

6.
If the bean has a notion of design/runtime modes (by implementing java.beans.DesignMode), initializes it to the mode of the nesting BeanContext; and finally,

7.
Sets the newly added bean to be current (in focus) and the component that represents it to be the current component.


next up previous NU-CCS-99-04.ps [ Readme | Copyright | Tutorial | Download | Feedback ]


Next: Moving Beans Up: How Are the Existing Previous: How Are the Existing

David H. Lorenz
3/17/2000