Gravity Demo

This document is quick and dirty, but it describes the steps necessary to run the Gravity prototype demonstration.

  1. First, install and start Oscar.
  2. Use the obr Oscar shell command to install the following bundles:
  3. Downloaded this editor.frm Gravity form file; this defines a simple editor application for Gravity.
  4. Start all of the install bundles except tablelayout.jar and servicebinder.jar (these do not need to be started since they are libraries).
  5. After starting all of the components, you should see the Gravity application framework window; switch Gravity into "design mode" by moving your mouse pointer over the little black dot in the upper left corner of the Gravity window -- you should see a visual change in Gravity, specifically a list control containing components and a menu bar will appear.
  6. Go to the "File" menu and select "Open..."; open the editor.frm that you downloaded.
  7. After opening the file (which will generate a lot of debug output), you should see a simple text editor application; the application consists of a split pane with the editor on top and a file viewer on the bottom. Switch into "run-time mode" by clicking on the "Design time" check box; feel free to try to open a Java source file or two.
  8. Notice the file viewer, determine if it is a tree renderer (i.e., using JTree) or if it is a panel tree renderer (i.e., using a custom component for rendering the tree).
  9. Keep the editor window visible, but go to the Oscar shell. Depending on whether the application is using a tree renderer or a panel tree renderer, stop the corresponding bundle, either Tree Renderer or Panel Tree Renderer, respectively.
  10. You should notice that the editor application automatically switches to the other remaining tree renderer component. Try the file viewer, it still works as before, but with a new rendering component.
  11. Now go back to the Oscar shell and stop the remaining tree renderer component, either Tree Renderer or Panel Tree Renderer. You should notice that the file viewer component has become invalid and an "under construction" icon is placed in its absence; this results because instances of the file viewer have a dynamic one-to-one dependency on a tree renderer service and now none exist.
  12. In the Oscar shell still, start either one of the tree renderer bundles again and you will see that the file viewer component automatically binds with the available tree renderer service and is placed back into the running editor application.

That's the demo in a nutshell. When you shutdown the Oscar shell you may see some errors...please forgive me.