next up previous contents
Next: GUI interfaces correction Up: GUI detailed design Previous: DTWPathPlotter module detail   Contents

DTWDataSelector module detail

Rough layout of DTWDataSelector UI
Layout of DTWDataSelector dialog is shown in figure 7.

Figure 7: Rough layout of DTWDataSelector UI
\includegraphics[width=1.0\textwidth]{srs_selview.eps}

Private data and data structures

DTWSelectionPlotter SelectionPlotter
Selection plotter.

javax.swing.JTextField SelStart
Selection start

javax.swing.JTextField SelEnd
Selection end.

javax.swing.JTextField RecordNumber
Record number.

EventListeners
Event listeners listen to changes in selection in DTWSelectionPlotter and SelStart and SelEnd fields. If the selection in DTWSelectionPlotter is changed, SelStart and SelEnd are adjusted accordingly. If SelStart or SelEnd is changed, DTWSelectionPlotter's selection is changed.

Implementation of methods
DTWDataSelector DataSelector setSelection
Triggered by change in SelStart or SelEnd

  1. Call SelectionPlotter.setSelection( SelStart, SelEnd ).

selectRecord
Triggered by change in RecordNumber

  1. Call FileIO.loadRecord( RecordNumber ).
  2. Store return values in a DTWDataVector, set name to ``DataVector''.
  3. Call SelectionPlotter.setValues( newDTWDataVector )

saveAsTemplate
Triggered by Save as template button click.

  1. Create newDTWDataVector object.
  2. Raise a dialog asking for the template name.
  3. newDTWDataVector.setName( Name ) and newDTWDataVector.setValues( SelectionPlotter.getSelectionValues() ).
  4. Call Data.addTemplates( newDTWDataVector ).

saveAsObservation
Triggered by Save as observation button click.

  1. Create newDTWDataVector object.
  2. Raise a dialog asking for the observation name.
  3. newDTWDataVector.setName( Name ) and newDTWDataVector.setValues( SelectionPlotter.getSelectionValues() ).
  4. Call Data.setObservation( newDTWDataVector ).


next up previous contents
Next: GUI interfaces correction Up: GUI detailed design Previous: DTWPathPlotter module detail   Contents
2002-03-19