Java Reference
In-Depth Information
-> start 4
-> start 5
-> install file:../paint-example/bundles/triangle-3.0.jar
Bundle: 6
-> start 6
-> stop 4
In figure 3.2, you can see that in step 1, you first install the shape API bundle, and then
you install and start the paint program bundle. This causes an empty paint frame to
appear with no available shapes, which makes sense because you haven't installed any
other bundles yet. In step 2, you install and start the circle and square bundles. As if by
magic, the two shapes dynamically appear in the paint frame's toolbar and are avail-
able for drawing. In step 3, you install and start the triangle bundle; then, you draw
some shapes on the paint canvas. What happens if you stop a bundle? In step 4, you
stop the circle bundle, which you see is replaced on the canvas with the placeholder
icon (a construction worker) from DefaultShape .
Figure 3.2 Execution-time evolution: dynamically adding shapes to and removing shapes from the
paint program as if by magic
Search WWH ::




Custom Search