Wolfram Library Archive

Courseware Demos MathSource Technical Notes
All Collections Articles Books Conference Proceedings
Title Downloads

The Super Widget Package

David Bailey
Organization: David Bailey Consultancy
URL: http://www.dbaileyconsultancy.co.uk

2005 Wolfram Technology Conference
Conference location

Champaign IL

This talk will describe the Super Widget Package (SWP), which offers an extremely high-level interface to GUIKit—making it easy for beginners and students to construct GUI applications in Mathematica. In particular, the SWP requires no knowledge of Java, J/Link, or GUIKit to access the bulk of its facilities.

First, one of the basic super widgets, the SuperWidgetRealBox, which creates a GUI box specialized for machine-precision real numbers and binds a Mathematica variable to it, is described. The compactness and simplicity of the super widget notation compared to raw GUIKit notation is emphasized. The talk will illustrate the fact that the SWP uses very traditional Mathematica notation to great advantage. Thus, for example, colors are specified using traditional syntax (RGBColor, and so on) rather than introducing Java equivalents.

It will also be demonstrated how the simple idea of associating each super widget with a Mathematica variable can streamline GUI construction in many different ways. In particular, no code is required to move data between a widget and its associated variable. This variable also forms a handle that can be used, for example, to specify the enabled/disabled status of a widget even before it has been created.

The talk will then move on to some of the more advanced super widgets, such as SuperWidgetGraphicsPanel. Using this, it is possible to write 2D interactive graphics applications using traditional Mathematica graphics. Feedback from the mouse uses the normal graphics coordinate system rather than pixels. This opens up a wealth of applications and will be illustrated by a graph in which the data points can be adjusted using the mouse.

Another super widget, SuperWidgetLiveGraphics3D, embeds a LiveGraphics3D applet in a GUI so that it can be controlled using the other widgets. The talk will illustrate how a 3D graphic can be rotated to a particular position using a button or the independent variables (introduced at Version 1.8 of LiveGraphics3D) can be controlled from a SuperWidgetRealBox widget.

If time permits, there will also be an opportunity to go under the hood of SWP to discover some of the secrets of its implementation.

*Wolfram Technology > Application Packages > Wolfram Research Applications > GUIKit
Downloads Download Wolfram CDF Player

superwidget.nb (2.2 MB) - Mathematica Notebook