Changeset 3865


Ignore:
Timestamp:
Sep 23, 2010, 8:31:48 AM (13 years ago)
Author:
Gregory Vincic
Message:

Refs #698. Removed method getNewOMSSAParameterSetStorageForm from FormFactory.

Location:
trunk/client/servlet/src/org/proteios
Files:
1 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/client/servlet/src/org/proteios/action/omssa/AddOMSSAParameterSetStorage.java

    r3828 r3865  
    6262     * Verify parameters
    6363     */
    64     Form form = getFormFactory().getNewOMSSAParameterSetStorageForm(null);
     64    Form form = new OMSSAStorageForm();
    6565    verifyParameters(form);
    6666    // Get values
  • trunk/client/servlet/src/org/proteios/action/omssa/NewOMSSAParameterSetStorage.java

    r3828 r3865  
    113113     * OMSSAParameterSetStorage form
    114114     */
    115     Form form = getFormFactory().getNewOMSSAParameterSetStorageForm(omssaParameterSetStorage);
     115    Form form = new OMSSAStorageForm(omssaParameterSetStorage);
    116116    // Toolbar
    117117    Toolbar tb = new Toolbar();
  • trunk/client/servlet/src/org/proteios/action/omssa/SelectOMSSAParameterFileStep1a.java

    r3838 r3865  
    5454     * Verify parameters
    5555     */
    56     Form form = getFormFactory().getNewOMSSAParameterSetStorageForm(null);
     56    Form form = new OMSSAStorageForm();
    5757    verifyParameters(form);
    5858    String name = getString(NameField.VPARAM);
  • trunk/client/servlet/src/org/proteios/gui/form/FormFactory.java

    r3864 r3865  
    23072307   * @return Form A form for setting OMSSAParameterSetStorage values.
    23082308   */
    2309   public Form getNewOMSSAParameterSetStorageForm(
    2310       OMSSAParameterSetStorage omssaParameterSetStorage)
    2311   {
    2312     Form form = new Form("NewOMSSAParameterSetStorage");
    2313     form.setTitle("NewOMSSAParameterSetStorage");
    2314     Fieldset fs = new Fieldset();
    2315     fs.setTitle("NewOMSSAParameterSetStorage");
    2316     // OMSSAParameterSetStorage Name
    2317     TextField<String> nameF = new NameField();
    2318     fs.add(nameF);
    2319     nameF.setValue("OMSSA parameter set storage");
    2320     if (omssaParameterSetStorage != null)
    2321     {
    2322       nameF.setValue(omssaParameterSetStorage.getName());
    2323     }
    2324     // OMSSAParameterSetStorage Description
    2325     TextArea descF = new DescriptionField();
    2326     fs.add(descF);
    2327     descF.setValue("OMSSA parameter set storage");
    2328     if (omssaParameterSetStorage != null)
    2329     {
    2330       descF.setValue(omssaParameterSetStorage.getDescription());
    2331     }
    2332     // OMSSA Parameters Template File
    2333     TextField<String> parameterFileF = new FileNameField();
    2334     fs.add(parameterFileF);
    2335     parameterFileF.setLabel("OMSSAParameterTemplateFile");
    2336     parameterFileF.setValue(getLocale().get("NotSpecifiedDefaultUsed"));
    2337     if (omssaParameterSetStorage != null)
    2338     {
    2339       if (omssaParameterSetStorage.getParameterFile() != null)
    2340       {
    2341         parameterFileF.setValue(omssaParameterSetStorage
    2342           .getParameterFile().getPath().toString());
    2343       }
    2344     }
    2345     parameterFileF.setDisabled(true);
    2346     // OMSSA Parameters Template File id
    2347     TextField<Integer> parameterFileIdF = new TextField<Integer>(AddOMSSAParameterSetStorage.VOMSSAPARAMETERTEMPLATEFILEID);
    2348     fs.add(parameterFileIdF);
    2349     parameterFileIdF.setHidden(true);
    2350     parameterFileIdF.setLabel("OMSSAParameterTemplateFileId");
    2351     parameterFileIdF.setValue(0);
    2352     if (omssaParameterSetStorage != null)
    2353     {
    2354       if (omssaParameterSetStorage.getParameterFile() != null)
    2355       {
    2356         parameterFileIdF.setValue(omssaParameterSetStorage
    2357           .getParameterFile().getId());
    2358       }
    2359     }
    2360     // OMSSA Search Spectrum Type select box (for default parameters
    2361     // template file)
    2362     VString validStringParam = SaveOMSSAParameterSetStorage.VOMSSA_SEARCH_SPECTRUM_TYPE;
    2363     List<Option> optionList = new ArrayList<Option>();
    2364     optionList.add(new Option("iontrap", "Ion Trap"));
    2365     optionList
    2366       .add(new Option("etd", "ETD (electron transfer dissociation)"));
    2367     String selected = new String("iontrap");
    2368     Select<VString> searchSpectrumTypeSelectBox = new Select<VString>(
    2369       validStringParam, optionList);
    2370   searchSpectrumTypeSelectBox.selectOption( selected);
    2371     searchSpectrumTypeSelectBox.setLabel("OMSSASearchSpectrumTypeSelect");
    2372     if (omssaParameterSetStorage != null)
    2373     {
    2374       if (omssaParameterSetStorage.getParameterFile() != null)
    2375       {
    2376         searchSpectrumTypeSelectBox.setDisabled(true);
    2377       }
    2378     }
    2379     fs.add(searchSpectrumTypeSelectBox);
    2380     // Hidden text field for forward action id after file selection
    2381     TextField<String> forwardF = new ForwardField();
    2382     forwardF.setValue(NewOMSSAParameterSetStorage.class.getName());
    2383     fs.add(forwardF);
    2384     //
    2385     form.addFieldset(fs);
    2386     return form;
    2387   }
     2309
    23882310
    23892311
     
    24052327    Form form = new Form("SaveAsOMSSAParameterSetStorage");
    24062328    form.setTitle("SaveAsOMSSAParameterSetStorage");
    2407     Fieldset fs = new Fieldset();
    2408     fs.setTitle("SaveAsOMSSAParameterSetStorage");
     2329    Fieldset fs = new Fieldset("SaveAsOMSSAParameterSetStorage");
    24092330    // OMSSAParameterSetStorage Name
    24102331    TextField<String> nameF = new NameField();
    24112332    fs.add(nameF);
    24122333    nameF.setValue("OMSSA parameter set storage");
    2413     if (omssaParameterSetStorage != null)
    2414     {
    2415       nameF.setValue(omssaParameterSetStorage.getName());
    2416     }
     2334
    24172335    // OMSSAParameterSetStorage Description
    24182336    TextArea descF = new DescriptionField();
    24192337    fs.add(descF);
    24202338    descF.setValue("OMSSA parameter set storage");
    2421     if (omssaParameterSetStorage != null)
    2422     {
    2423       descF.setValue(omssaParameterSetStorage.getDescription());
    2424     }
     2339
    24252340    // OMSSA Parameters Template File
    24262341    TextField<String> parameterFileF = new FileNameField();
     
    24282343    parameterFileF.setLabel("OMSSAParameterTemplateFile");
    24292344    parameterFileF.setValue(getLocale().get("NotSpecifiedDefaultUsed"));
    2430     if (omssaParameterSetStorage != null)
    2431     {
    2432       if (omssaParameterSetStorage.getParameterFile() != null)
    2433       {
    2434         parameterFileF.setValue(omssaParameterSetStorage
    2435           .getParameterFile().getPath().toString());
    2436       }
    2437     }
    24382345    parameterFileF.setDisabled(true);
     2346
    24392347    // OMSSA Parameters Template File id
    24402348    TextField<Integer> parameterFileIdF = new TextField<Integer>(AddOMSSAParameterSetStorage.VOMSSAPARAMETERTEMPLATEFILEID);
     
    24432351    parameterFileIdF.setLabel("OMSSAParameterTemplateFileId");
    24442352    parameterFileIdF.setValue(0);
    2445     if (omssaParameterSetStorage != null)
    2446     {
    2447       if (omssaParameterSetStorage.getParameterFile() != null)
    2448       {
    2449         parameterFileIdF.setValue(omssaParameterSetStorage
    2450           .getParameterFile().getId());
    2451       }
    2452     }
     2353
    24532354    // Hidden text field for initial omssaParameterSetStorage id
    24542355    TextField<Integer> iniOMSSApssIdF = new TextField<Integer>(
     
    24572358    if (omssaParameterSetStorage != null)
    24582359    {
     2360      nameF.setValue(omssaParameterSetStorage.getName());
     2361      descF.setValue(omssaParameterSetStorage.getDescription());
    24592362      iniOMSSApssIdF.setValue(omssaParameterSetStorage.getId());
     2363    if (omssaParameterSetStorage.getParameterFile() != null)
     2364      {
     2365        parameterFileIdF.setValue(omssaParameterSetStorage.getParameterFile().getId());
     2366        parameterFileF.setValue(omssaParameterSetStorage.getParameterFile().getPath().toString());
     2367      }
    24602368    }
    24612369    fs.add(iniOMSSApssIdF);
  • trunk/client/servlet/src/org/proteios/gui/form/ForwardField.java

    r3846 r3865  
    4545  setValue(value);
    4646 }
     47
     48 public ForwardField(Class action)
     49 {
     50   this();
     51  setValue(action.getName());
     52 }
     53
    4754}
Note: See TracChangeset for help on using the changeset viewer.