next up previous contents
Next: 7.2 Logger Up: 7 SAM Graphical User Previous: 7 SAM Graphical User   Contents

Subsections

7.1 Controller

7.1.1 MainWindow class

SAM's MainWindow class follows a typical GNOME application layout as shown in figure 10. A top menubar provides standard File, Edit, Settings and Help menus (see figures 11, 12, 13 and 14), which are accessible by keyboard shortcuts, and stock menu items are used wherever possible (e.g. for Open and Exit menu items, see [1] section 4.1). The title for the window also changes to include the filename of any log file which is opened.

A toolbar provides alternate access to the three main operations which can be performed by the user: creating a network log, opening a network log, and performing some analysis and output on a subset of that log information.

The File menu (see figure 11) contains items for creating a network log, opening a network log and exiting the program, each with a shortcut key.

The Edit menu (see figure 12) provides two items that allow the user to quickly select all the streams in the streams list, or to deselect all the streams in the streams list. This means with a single click, the user can select all the streams (as opposed to manually going through and selecting each list item in the list, which, if there were many streams, would be tedious and slow). Also, these items can be accessed by shortcut keys, to allow even faster access.

The Settings menu (see figure 13) contains a check box that allows the user to change the stream names from domain names to IP addresses and vice versa. This allows the user to customise the view on screen. When a new file is opened, the resolving setting remains as it was last set, to avoid confusion and the user having to keep on selecting the resolve domain names item every time he/she loads a file.

The Help menu (see figure 14) contains two items, ``Online Help'' and ``About''. ``Online Help'' opens the SAM User Manual in a browser so that users can easily access documentation for SAM, and ``About'' brings up a standard about dialog so that users can find out more about the developers.

The central pane contains four lists, from which the user can select to determine the TCP streams analyse data from, the data to select, the analysis to perform and the output format (see figure 15).

The Streams list is situated above the other three lists, and is therefore much wider, since entries in this column are typically much longer than in the other columns. Also, since the stream list is the only one that allows multiple selections, this makes it easier for the user to distinguish between the two types of lists. This layout makes it easy for the user to fully see the details of the loaded file. Also, if there are no streams in a particular log file loaded (for example, a log file created by running the FCM Logger), ``No Streams'' is displayed in the Streams list, and is also automatically selected, thus making it faster for the user to make their selection (having to select only three items instead of four).

When certain fields are recognised in the log file, they are given friendlier names than those used in the file. These names also include units when appropriate. These names are also used by the analysis and output plugins. As an example of the style, tcpwindow becomes ``TCP Window (Bytes)''.

The column headers have each been numbered, so as to give novice users a clear sequence of actions to perform. This order is not enforced however; once a log file has been opened, the user may select analysis parameters in any order, allowing experienced users a more flexible approach.

Beneath the central pane is the progress bar, in its typical position at the bottom of the window. The progress bar has been added to give the user feedback as to what SAM is doing, and in doing so give the user hints as to what they should or could be doing.

Functionality that is not available is shown but made insensitive instead of being hidden (see [1] section 6.3). This allows the user to see what functions may be performed at a later time, e.g. clicking on the Run button or selecting from the Analysis and Output lists, even though those functions may not be currently available. Once a file has been loaded, and a selection is made, any further selections which are incompatible are greyed out so that the user is unable to make an invalid set of selections.

Figure 10: The widgets used in SAM's MainWindow class
\includegraphics[width=13cm]{diagrams/mainwindow}

Figure 11: The widgets used for the file menu of SAM's MainWindow class
\includegraphics[width=13cm]{diagrams/mainwindow-menu1}

Figure 12: The widgets used for the edit menu of SAM's MainWindow class
\includegraphics[width=13cm]{diagrams/mainwindow-menu3}

Figure 13: The widgets used for the settings menu of SAM's MainWindow class
\includegraphics[width=13cm]{diagrams/mainwindow-menu4}

Figure 14: The widgets used for the help menu of SAM's MainWindow class
\includegraphics[width=13cm]{diagrams/mainwindow-menu2}

Figure 15: The widget tree for SAM's MainWindow class
\includegraphics[width=5.71cm]{diagrams/wtree-main-window}

Table: Custom handlers for the MainWindow class


Widget Name Widget Class Signals Handlers
about1 GtkPixmapMenuItem activate self.about()
analysis_list GtkList select_child self.handleSelected()
    unselect_child self.handleSelected()
clear_all_streams1 GtkMenuItem activate self.clearStreams()
data_list GtkList select_child self.handleSelected()
    unselect_child handleSelected()
exit1 GtkPixmapMenuItem activate self.handleQuit()
graph_button1 GtkButton clicked self.handleAnalysis()
mainwindow GnomeApp destroy gtk.mainquit()
log_button1 GtkButton clicked self.loadLogger()
log1 GtkPixmapMenuItem activate self.loadLogger()
online_help1 GtkPixmapMenuItem activate self.loadHelp()
open_button1 GtkButton clicked self.fileOpen()
open1 GtkPixmapMenuItem activate self.fileOpen()
output_list GtkList select_child self.handleSelected()
    unselect_child self.handleSelected()
resolve_domain_names1 GtkCheckMenuItem toggled self.toggleResolving()
select_all_streams1 GtkMenuItem activate self.selectAllStreams()
stream_list GtkList select_child self.handleSelected()
    unselect_child self.handleSelected()

7.1.2 FileSelection class

The widget tree consists of a single GtkFileSelection object and its default members. It thus follows the standard of all file open dialog boxes written using the Gtk widget set, and has good usability because all expected users will be familiar with its functionality.

Figure 16: The widgets used in SAM's FileSelection class
\includegraphics[width=9.62cm]{diagrams/fileselection}

Figure 17: The widget tree for SAM's FileSelection class
\includegraphics[width=2.87cm]{diagrams/wtree-file-selection}

Widget Name Widget Class Signals Handlers
fileselection GtkFileSelection destroy gtk.mainquit()
ok_button1 GtkButton clicked self.fileOpen()
cancel_button1 GtkButton clicked self.handleCancel()

7.1.3 AboutDialog class

Similarly, the About dialog box (shown in figure 18) consists of a single GnomeAbout object, created with parameters including the displayed message. It is hence already optimised for usability.

Figure 18: The widgets used in SAM's AboutDialog class
\includegraphics[width=5.16cm]{diagrams/about}

Figure 19: The widget tree for SAM's AboutDialog class
\includegraphics[width=3.78cm]{diagrams/wtree-about}

Widget Name Widget Class Signals Handlers
about GnomeAbout destroy self.hide()
    clicked self.hide()


next up previous contents
Next: 7.2 Logger Up: 7 SAM Graphical User Previous: 7 SAM Graphical User   Contents