next up previous index
Next: Scenarios Up: Visualisation clients Previous: Viewlets   Index

Subsections

Viewers

The Java VC currently contains three different methods for rendering an entire viewable. Each of these methods can be thought of as a window looking onto the viewable and is referred to as a viewer.

Upon a viewable being created, the user is presented with a dialog box asking which of the available viewers they wish to view the viewable with.

The currently available viewers are

TextTable
Renders any type of 1D and 2D viewables as a grid of textual descriptions of the elements.
BoundsTable
Renders numeric_bounds 1D and 2D viewables as a grid of rectangles representing the size of the numeric domains.
Desktop
Allows the user to place both Text and Bounds representations of the viewable elements anywhere on a desktop window.

Figure 3.4: The VC showing all three viewers for the SEND+MORE=MONEY example.
\includegraphics[width=10cm]{vcallviewers}

Common to all viewers are the three menus Options, Select and View.

Options menu

The options menu contains controls for viewer-wide properties.
Hold at expansions
Determines whether this viewer will hold control when the viewable is expanded.
Hold at contractions
Determines whether this viewer will hold control when the viewable is contracted.
Hold at destruction
Determines whether this viewer will hold control when the viewable is destroyed. This option is useful for examining the state of the viewable immediately before the creation is backtracked over.
View propagation steps
Controls how frequently the visualisation client is informed of forward update events.

fine
Events are sent as soon as they occur.
coarse
Events are sent at priority 8 in the ECLiPSe program. Typically this means that all the propagation that occurs as a result of a single user level search step are sent together.
timed
Events are collected and sent at regular timed intervals.

Track updates
When set, the viewer will attempt to ensure that all updates are visible within the window. This can be important when visualising large viewables which may not easily fit into the window.

Figure 3.5 shows the default settings for the Options menu. Note that the View propagation steps options are disabled because ECLiPSe has control and the update granularity can only be changed when the Java VC is holding control.

Figure 3.5: The options menu, common to all viewers.
\includegraphics[width=5cm]{vcoptionsmenu}

Select menu

Contains convenience commands for dealing with the currently selected set of viewlets.

Selecting individual viewlets can be done clicking on them with the left mouse button, whilst selecting ranges can be done by dragging the mouse across a range of viewlets.

Select all viewlets
Sets the selection to the entire viewable.
Select updating viewlets(s)
Sets the selection to only those viewlets which have been marked as updating (either forward or backward). This option is only enabled when the Java VC has control, since it requires the state of the viewables to remain constant during the selection process.
Clear selection
Clears the selection.

Figure 3.6: The select menu, common to all viewers.
\includegraphics[width=5cm]{vcselectmenu}

View menu

So as to facilitate visualisation of large viewables, all viewers have the ability to zoom in and out. All the options are self explanatory and will not be expanded further upon except to mention that the Zoom to fit width and Zoom to fit height options operate on the whole viewer and not just the selected viewlets.

Figure 3.7: The view menu, common to all viewers.
\includegraphics[width=5cm]{vcviewmenu}

Viewlet actions

Within a viewer, as previously mentioned, any number of viewlets may be selected. These viewlets, once selected can have actions performed on them. The actions are selected by pressing the right mouse button in order to bring up the context sensitive actions menu. If all viewlets in the selection are of the same type, then the full action menu for that type will be displayed, however if the viewlets differ then only the common actions will be displayed.

Hold on update

The most common action, which can be performed on any type of viewlet is the Hold on updates action which, when set, indicates that the Java VC should hold control whenever any sort of update event is issued for the corresponding viewable element. The Hold on updates property of a viewlet is indicated by a small ``pause'' icon in the bottom right hand corner.

Figure 3.8 shows the graphical effect of setting the Hold on update property of a text viewlet.

Figure 3.8: The sequence of actions required to select Hold on update for a viewlet
\includegraphics[width=5cm]{vcviewlethold}

Table 3.2 lists the available viewlet actions and indicates for which type (and how many must be selected of that type) the actions are valid.


Table 3.2: The available viewlet actions and associated types.
Name Description Text Bound
Hold on updates Causes the VC to hold control on forward or backward update events for the selected viewlets. 0+ 0+
Fit to text Resizes the selected viewlets to exactly fit the width of the widest textual representation. If performed on all elements in a column of a TextTable then the whole column will resize. 1+ 0
View bounds in detail Pops up a window detailing the original bounds and the current bounds for the single selected viewlet. 0 1
Align bounds Causes the selected viewlets to use the same underlying scale when displaying the bounds. This allows variables whose initial bounds were different to be visually compared. 0 2+
Toggle horizontal/vertical range bar Toggles the rotation of the bar for all bounds viewlets 0 1+

Desktop viewer

Both the TextTable and BoundsTable viewers have essentially the same functionality in that they do not allow flexible placement of viewables and both only deal with 1 or 2 dimensional viewables. A more flexible viewer is provided in the Desktop viewer.

This viewer aims to implement the common desktop metaphor by providing the user with a rectangular region of the screen upon which viewlets can be dropped, stacked and moved around as though they were pieces of paper on a desk.

Adding viewlets

Typically, viewlets will be added to a desktop immediately after the viewer has been created. To minimise the overhead of having to layout the viewlets each time the user's program is run (a potentially time consuming task), the Java VC provides an automatic recording and repeat mechanism which is triggered every time a viewer is created. Section 3.4 explains this feature in more detail.

Adding viewlets to a Desktop viewer is done by selecting the required viewlet type from the Insert menu. This menu will contain only those viewlet type which are appropriate to the type of the viewable.

Once an appropriate viewlet type has been selected, the range selection dialog will pop up, from which any combination of dimension ranges may be selected.

Figure 3.9 shows the range select dialog for the on going SEND+MORE=MONEY example.

Figure 3.9: The range selection dialog for the SEND+MORE=MONEY example
\includegraphics[width=5cm]{vcrangeselect}

At least one selection must be made from each of the dimensions, though it is possible to select multiple values in each dimension.

Figures 3.10 and 3.11 illustrate the default layout of viewlets when 1 and 2 dimensional ranges are selected. Should some part of the inserted range fall ``outside'' the desktop are, they can still be selected by resizing the window until they are visible and moving them on to the desktop.

Figure 3.10: The result of selecting a 1D range
\includegraphics[width=10cm]{vcrangeselect1d}

Figure 3.11: The result of selecting a 2D range
\includegraphics[width=10cm]{vcrangeselect2d}

Higher dimension range selections result in a stacked 2D grid, with progressive dimensions appearing underneath the initially visible grid.

Background images

In keeping with the computer GUI desktop metaphor, the user may set the background image for the desktop viewer. Aside from making the viewer look pretty this feature is intended to allow graphical context to be associated with the visualisation of a program. For example the background image could be a diagram representing the network topology and the values being visualised could be the flows through various parts of the network. By placing the viewlets near the appropriate nodes on the background image the user could more easily visualise the network flow problem.

Background images are loaded by selecting the Import background image option from the Background menu. Currently only GIF format images can be loaded.

In keeping with our SEND+MORE=MONEY example, figure 3.12 shows the problem visualised on a desktop viewer, placed over a background image.

Figure 3.12: The SEND+MORE=MONEY example displayed on a Desktop viewer with a background image
\includegraphics[width=10cm]{vcsendmoremoney}


next up previous index
Next: Scenarios Up: Visualisation clients Previous: Viewlets   Index
Warwick Harvey
2002-05-15