next up previous contents
Next: DTWData module detail Up: DTWMain module detail Previous: DTWMain module detail   Contents

Rough user interface layout

A rough layout of the DTW GUI Main frame is shown in figure 6.4.1

Figure 6: Rough GUI layout
\includegraphics[width=0.8\textwidth]{sds_gui_rough.eps}

Attributes
DTWData Data DTWData object containing information about DLL data structures and observation.

DTWFileIO FileIO
File IO management class.

DTWHorizontalPlotter ObsPlotter
Observation plotter

DTWVerticalPlotter TempPlotter
Template plotter

DTWPathPlotter PathPlotter
Warping path plotter.

int[][] TemplateArray
Two-column array to store template index in GUI (JList) and in DLL.

Implementation of functionalities

Load records from a text file
Triggered by selecting Load data set from the menu.

  1. Get Filename from JFileChooser dialog.
  2. Open DTWDataSelector dialog with parameters Data and Filename.
  3. Wait until DTWDataSelector dialog has finished its operations.

Save the templates to a text file
Triggered by selecting Save templates from the menu.

  1. Get Filename from JFileChooser dialog
  2. Call FileIO.saveTemplates method with parameters Filename and Data.
  3. Catch possible DTWFileIOExceptions and report them with an error dialog.

Save the observation to a text file
Triggered by selecting Save observation from the menu.

  1. Get Filename from JFileChooser dialog.
  2. Call FileIO.saveObservation method with parameters Filename and Data.
  3. Catch possible DTWFileIOExceptions and report them with a error dialog.

Load an observation from a text file
Triggered by selecting Load observation from the menu.

  1. Get Filename from JFileChooser dialog.
  2. Call FileIO.loadObservation method with Filename as a parameter.
  3. Store return value (DTWDataVector) in a temporary object.
  4. Call DTWData.setObservation method with the temporary DTWDataVector as a parameter.
  5. Call PathPlotter.setValues with an empty table to clear the plotting.
  6. Call ObsPlotter.setValues method with the temporary DTWDataVector.

Load templates from a text file
Triggered by selecting Load templates from the menu.

  1. Get Filename from JFileChooser dialog.
  2. Call FileIO.loadTemplates method with Filename as a parameter.
  3. Store return value (DTWDataVector[]) in a temporary object array.
  4. Call DTWData.addTemplates method with the temporary object array.
  5. Call UpdateList method.

Update List
This section describes UpdateList method

  1. Delete all items from the GUI JList containing templates.
  2. Get name for every Data.Templates item and add it in the JList. Add JList index to TemplateArray[i][0] and Data.Templates index to TemplateArray[i][1].

Choose parameters of the DTW algorithm
There is a listener for each of the parameter GUI components. They cause the following events to take place.

  1. Clear warping path plotter by calling PathPlotter.setValues with an empty table
  2. Set parameters by calling Data.setParameters with parameter object newParameters containing the selections.

Compare observation against one template
Triggered by Compare button.

  1. Get selected JList row.
  2. Seek the stored row number from TemplateArray and call Data.DTWCompareOne method with the TemplateArray row number where the stored number was found as a parameter.
  3. Call ShowResults.

Compare observation against all templates
Triggered by CompareAll button.

  1. Call Data.DTWCompareAll method.
  2. Data.getResults, store return value.
  3. Find the shortest warping path from getResults return values. Select the template with shortest wpath from JList.
  4. Call CompareOne.

Show Results
ShowResults method design.

  1. Call PathPlotter.setPathLength with the shortest warping path as a parameter.
  2. Data.getWarpingPath, store return value.
  3. Call PathPlotter.setValues with getWarpingPath return value as a parameter.

Save log from the last algorithm run
Triggered by Log button.

  1. Get Filename from a JFileChooser dialog.
  2. Call FileIO.saveLog with Filename and Data as parameters.

deleteTemplate
Triggered by Delete button.

  1. Get selected row number from JList.
  2. Call Data.deleteteTemplate method with row number.
  3. Call UpdateList method.

deleteAllTemplates
Triggered by DeleteAll button.

  1. Call Data.deleteAllTemplates method.
  2. Call UpdateList method.


next up previous contents
Next: DTWData module detail Up: DTWMain module detail Previous: DTWMain module detail   Contents
2002-03-19