Changeset 3870


Ignore:
Timestamp:
Sep 29, 2010, 10:04:46 AM (13 years ago)
Author:
Gregory Vincic
Message:

Refs #698. Removing method getSaveAsXTandemParameterSetStorageForm from FormFactory.

Location:
trunk/client/servlet/src/org/proteios
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/client/servlet/src/org/proteios/action/xTandemInput/SaveXTandemParameterSetStorage.java

    r3828 r3870  
    290290        log.debug("xtpss.getParameterFile() = \"" + xtpss.getParameterFile() + "\"");
    291291        // XTandemParameterSetStorage form
    292         //Form form = getFormFactory().getSaveAsXTandemParameterSetStorageForm(xTandemParameterSetStorage, xTandemParameterSet);
    293         Form form = getFormFactory().getSaveAsXTandemParameterSetStorageForm(xtpss, xTandemParameterSet);
     292        Form form = new SaveAsXTandemStorageForm(xtpss, xTandemParameterSet);
    294293        // Toolbar
    295294        Toolbar tb = new Toolbar();
  • trunk/client/servlet/src/org/proteios/gui/form/FormFactory.java

    r3869 r3870  
    22882288
    22892289 //Cleaning up from here
    2290 
    2291 
    2292  
    2293   /**
    2294    * Form for saving an XTandemParameterSetStorage item under a new name. This
    2295    * method only uses the xTandemParameterSet argument as a convenient place
    2296    * holder for default values for the XTandemParameterSet form fields.
    2297    *
    2298    * @param xTandemParameterSetStorage XTandemParameterSetStorage object with
    2299    *        default field values for name and parameter template file.
    2300    * @param xTandemParameterSet XTandemParameterSet object (need not be stored
    2301    *        in database) with default field values.
    2302    * @return Form A form for setting XTandemParameterSetStorage values.
    2303    */
    2304   public Form getSaveAsXTandemParameterSetStorageForm(
    2305       XTandemParameterSetStorage xTandemParameterSetStorage,
    2306       XTandemParameterSet xTandemParameterSet)
    2307   {
    2308     Form form = new Form("SaveAsXTandemParameterSetStorage");
    2309     form.setTitle("SaveAsXTandemParameterSetStorage");
    2310     Fieldset fs = new Fieldset();
    2311     fs.setTitle("SaveAsXTandemParameterSetStorage");
    2312     // XTandemParameterSetStorage Name
    2313     TextField<String> nameF = new NameField();
    2314     fs.add(nameF);
    2315     nameF.setValue("X!Tandem parameter set storage");
    2316     if (xTandemParameterSetStorage != null)
    2317     {
    2318       nameF.setValue(xTandemParameterSetStorage.getName());
    2319     }
    2320     // XTandemParameterSetStorage Description
    2321     TextArea descF = new DescriptionField();
    2322     fs.add(descF);
    2323     descF.setValue("X!Tandem parameter set storage");
    2324     if (xTandemParameterSetStorage != null)
    2325     {
    2326       descF.setValue(xTandemParameterSetStorage.getDescription());
    2327     }
    2328     // XTandem Parameters Template File
    2329     TextField<String> parameterFileF = new FileNameField();
    2330     fs.add(parameterFileF);
    2331     parameterFileF.setLabel("XTandemParameterTemplateFile");
    2332     parameterFileF.setValue(getLocale().get("NotSpecifiedDefaultUsed"));
    2333     if (xTandemParameterSetStorage != null)
    2334     {
    2335       if (xTandemParameterSetStorage.getParameterFile() != null)
    2336       {
    2337         parameterFileF.setValue(xTandemParameterSetStorage
    2338           .getParameterFile().getPath().toString());
    2339       }
    2340     }
    2341     parameterFileF.setDisabled(true);
    2342     // XTandem Parameters Template File id
    2343     TextField<Integer> parameterFileIdF = new TextField<Integer>(AddXTandemParameterSetStorage.VXTANDEMPARAMETERTEMPLATEFILEID);
    2344     fs.add(parameterFileIdF);
    2345     parameterFileIdF.setHidden(true);
    2346     parameterFileIdF.setLabel("XTandemParameterTemplateFileId");
    2347     parameterFileIdF.setValue(0);
    2348     if (xTandemParameterSetStorage != null)
    2349     {
    2350       if (xTandemParameterSetStorage.getParameterFile() != null)
    2351       {
    2352         parameterFileIdF.setValue(xTandemParameterSetStorage
    2353           .getParameterFile().getId());
    2354       }
    2355     }
    2356     // Hidden text field for initial XTandemParameterSetStorage id
    2357     TextField<Integer> iniXtpssIdF = new TextField<Integer>(
    2358       ViewActiveXTandemParameterSetStorage.VXTANDEMPARAMETERSETSTORAGEID);
    2359     iniXtpssIdF.setHidden(true);
    2360     if (xTandemParameterSetStorage != null)
    2361     {
    2362       iniXtpssIdF.setValue(xTandemParameterSetStorage.getId());
    2363     }
    2364     fs.add(iniXtpssIdF);
    2365     // Hidden text fields for transferring values of XTandem parameter set
    2366     boolean fieldsHidden = true;
    2367     boolean fieldsDisabled = false;
    2368     fs = addXTandemParameterSetToFieldset(xTandemParameterSet, fs,
    2369       fieldsHidden, fieldsDisabled);
    2370     //
    2371     form.addFieldset(fs);
    2372     return form;
    2373   }
    2374 
    23752290
    23762291  /**
  • trunk/client/servlet/src/org/proteios/gui/form/XTandemStorageForm.java

    r3869 r3870  
    3636public class XTandemStorageForm extends Form
    3737{
    38   TextField<String> nameF;
    39   TextArea descF;
    40   TextField<String> parameterFileF;
    41   TextField<Integer> parameterFileIdF;
    42   TextField<String> forwardF;
    43   Fieldset fs;
    44   // Define
     38  public final TextField<String> nameF;
     39  public final TextArea descF;
     40  public final TextField<String> parameterFileF;
     41  public final TextField<Integer> parameterFileIdF;
     42  public final TextField<String> forwardF;
     43  public final Fieldset fs;
     44
    4545  public XTandemStorageForm()
    4646  {
Note: See TracChangeset for help on using the changeset viewer.