This document is quick and dirty, but it describes the steps necessary
to run the Gravity prototype demonstration.
First, install and start Oscar.
Use the obr Oscar shell command to install the following bundles:
- Gravity - the Gravity application framework.
- Table Layout - a library bundle used by other bundles
(should be automatically installed with Gravity).
- Service Binder - the service binder bundle (should
be automatically installed with Gravity).
- Editor - a simple editor component for Gravity.
- Buffer Switcher - a simple plugin for the editor
- File Viewer - a file viewer component for the editor
- Tree Renderer - a tree renderer component for the file
- Panel Tree Renderer - a panel tree renderer component for
the file viewer.
Downloaded this editor.frm Gravity form
file; this defines a simple editor application for Gravity.
Start all of the install bundles except tablelayout.jar
and servicebinder.jar (these do not need to be started since they
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.
Go to the "File" menu and select "Open..."; open the editor.frm
that you downloaded.
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.
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).
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.
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.
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.
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.