next up previous contents
Next: Widget Values Up: Model/Framework Previous: Interface

Widget

The interface component is made up of multiple widgets. The user can manipulate these widgets which in turn manipulate the state of the application component. An abstraction for widgets is made that is used across platforms. Each widget has a graphical representation, a mediator that it notifies, and a command object. The widget is bound to a particular action at run-time by instantiating the appropriate command object. Whenever the value of the widget changes, the command object is invoked, affecting the state of the application. The widget also notifies the mediator that it has changed.

From this abstraction, concrete subclasses of Widget can be created for different platforms. Although widgets on different platforms may look quite different and interact with the user in different ways, they make use of the same commands and so affect the application in the same way. For instance, a desktop slider might be used to modify the isovalue for an isosurface that is being visualized for a particular dataset. The corresponding CAVE application might have a corresponding CAVE widget that is a 3d knob floating in space. The user can select it with a virtual beam coming out of the wand and then "twist" it to change the isovalue. Although these two widgets are quite different in their look and interaction, they can both be attached to the same command object. Each widget maintains a value and whenever that value is changed by interaction, the command for changing the isovalue is invoked. That command can get the new value from the widget that invoked it and send the appropriate message to the application component.





Paul John Rajlich
Mon May 4 16:53:57 CDT 1998