Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#616 closed (fixed)

Spectrum File Inspector should have buttons for previous and next spectrum

Reported by: olle Owned by: olle
Milestone: Proteios SE 2.9 Keywords:
Cc:

Description

Spectrum File Inspector should have buttons for actions to select previous and next spectrum.

  • The buttons should be placed near the spectrum plot, in order for them to be accessible without needing to scroll down the form (provided that a reasonably large web browser window is used).
  • The "previous spectrum" button should be disabled if the current spectrum is the first in the list, while the "next spectrum" button should be disabled if the current spectrum is the last in the list.

Change History (7)

comment:1 Changed 10 years ago by olle

Status: newassigned

Ticket accepted.

comment:2 Changed 10 years ago by olle

Traceability note:

  • This ticket was extracted from Ticket #611 (Problems with spectrum viewer when many spectra), where it was suggested that it should be possible to jump to the next spectrum in the spectrum list.
  • The extension project for SpectrumFileInspectorExtension currently includes four tickets:

    1. Ticket #1 (Extension to inspect spectra in a selected spectrum file).
    2. Ticket #2 (Extension documentation).
    3. Ticket #3 (Spectrum File Inspector Extension should display Spectrum Properties).
    4. Ticket #4 (Spectrum File Inspector Extension should display Spectrum File Info).
    5. Ticket #5 (Spectrum File Inspector Extension should forward action to InspectActiveSpectrumFile).

    Since extension SpectrumFileInspectorExtension now relies on class InspectActiveSpectrumFile for its functionality, it is only needed to update the latter class.
  • Class InspectActiveSpectrumFile was introduced in ticket #540 (Peaklist file cell in Hits table should have view action for inspecting the spectrum file).
  • Zooming of spectra was introduced in Ticket #592 (zoom in spectra).
  • Spectrum display was updated in Ticket #609 (Spectrum peaks displayed as wide).

comment:3 Changed 10 years ago by olle

Design description:

  • A new form will be created to support the tool-bar to place the spectrum iteration buttons in. It will be placed directly below the spectrum plot, above the zoom mass range selection form.
  • Two new public convenience methods String fetchPreviousListItem(String currentItem, List<String> inList) and String fetchNextListItem(String currentItem, List<String> inList) will be added to find the previous and next spectrum id string.

comment:4 Changed 10 years ago by olle

(In [3426]) Refs #616. Refs #611. Refs #540. Refs #287. Inspection of mass spectra stored in spectrum files updated with buttons to select previous or next spectrum in list:

  1. Class/file action/file/InspectActiveSpectrumFile.java in

client/servlet/ updated:

  1. Protected method void runMe() updated with new form to

support the tool-bar with two new spectrum iteration buttons in. It will be placed directly below the spectrum plot, above the zoom mass range selection form. The "Previous spectrum" and "Next spectrum" buttons will be coupled to an action link to the spectrum file inspector class, but with value of valid parameter PlotFileSpectrum.VSPECTRUMID set to the spectrum id string for the previous and next spectrum, respectively. The latter spectrum id strings are obtained by calling new convenience methods String fetchPreviousListItem(String currentItem, List<String inList) and String fetchNextListItem(String currentItem, List<String> inList). The button action is disabled if the spectrum id string to use is null, indicating that the start or end of the list is reached.

  1. New public convenience method

String fetchPreviousListItem(String currentItem, List<String> inList) added. It fetches the previous list item from the input string list. Returns null if current item is the first item in the list.

  1. New public convenience method

String fetchNextListItem(String currentItem, List<String> inList) added. It fetches the next list item from the input string list. Returns null if current item is the last item in the list.

  1. English dictionary file locale/en/dictionary in client/servlet/

updated with new entries for various string keys.

comment:5 Changed 10 years ago by olle

severity: 162

Severity set to 2, since the design could be based on previously created code.

comment:6 Changed 10 years ago by olle

Resolution: fixed
Status: assignedclosed

Ticket closed as the requested functionality has been added.

comment:7 Changed 10 years ago by olle

(In [3433]) Refs #611. Refs #616. Refs #540. Refs #592. Inspection of mass spectra stored in spectrum files updated to use a page-managed spectrum list table:

  1. Class/file action/file/InspectActiveSpectrumFile.java in

client/servlet/ updated:

  1. New private instance variable int maxResults with public

accessor methods added. It stores the max number of items to be shown in the spectrum list table. Initially set to 20.

  1. New private instance variable int itemsFrom with public

accessor methods added. It stores the index of the first item to show in the spectrum list table. Initially set to 0.

  1. New private instance variable boolean pageSelectedFromScroller

with public accessor methods added. It stores a flag indicating that page is selected by clicking a page link. Currently set to false.

  1. Protected method void runMe() updated to support page-managed

spectrum list using Scroller and ScrollTo classes. The value of valid parameters VInteger Scroller.VFROM and VInteger Scroller.VMAXRESULT are checked at an early stage to set a flag indicating if the page was selected by clicking on a page link. If so, the value of integer instance variable itemsFromwill be set to the value of Scroller.VFROM, otherwise it is set ensuring that the selected spectrum will be included in the displayed table page. A tool-bat is added to the spectrum list table, to ensure that GUConverter will add a hidden input tag specifying the action to be related to the table in the created HTML code, as this line is necessary for the page links created by the Scroller class to work. Valid parameters for other data needed to be transferred between spectrum display sessions are added, and set to current values in hidden text fields in the spectrum table.

  1. New public convenience method

Integer fetchStringListItemIndex(String currentItem, List<String> inList) added. It fetches index for an item from from string list.

  1. New private convenience method private void restoreScrollerState()

added. It restores table scroller settings stored as valid parameters.

Note: See TracTickets for help on using tickets.