Changeset 3865
- Timestamp:
- Sep 23, 2010, 8:31:48 AM (13 years ago)
- 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 62 62 * Verify parameters 63 63 */ 64 Form form = getFormFactory().getNewOMSSAParameterSetStorageForm(null);64 Form form = new OMSSAStorageForm(); 65 65 verifyParameters(form); 66 66 // Get values -
trunk/client/servlet/src/org/proteios/action/omssa/NewOMSSAParameterSetStorage.java
r3828 r3865 113 113 * OMSSAParameterSetStorage form 114 114 */ 115 Form form = getFormFactory().getNewOMSSAParameterSetStorageForm(omssaParameterSetStorage);115 Form form = new OMSSAStorageForm(omssaParameterSetStorage); 116 116 // Toolbar 117 117 Toolbar tb = new Toolbar(); -
trunk/client/servlet/src/org/proteios/action/omssa/SelectOMSSAParameterFileStep1a.java
r3838 r3865 54 54 * Verify parameters 55 55 */ 56 Form form = getFormFactory().getNewOMSSAParameterSetStorageForm(null);56 Form form = new OMSSAStorageForm(); 57 57 verifyParameters(form); 58 58 String name = getString(NameField.VPARAM); -
trunk/client/servlet/src/org/proteios/gui/form/FormFactory.java
r3864 r3865 2307 2307 * @return Form A form for setting OMSSAParameterSetStorage values. 2308 2308 */ 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 2388 2310 2389 2311 … … 2405 2327 Form form = new Form("SaveAsOMSSAParameterSetStorage"); 2406 2328 form.setTitle("SaveAsOMSSAParameterSetStorage"); 2407 Fieldset fs = new Fieldset(); 2408 fs.setTitle("SaveAsOMSSAParameterSetStorage"); 2329 Fieldset fs = new Fieldset("SaveAsOMSSAParameterSetStorage"); 2409 2330 // OMSSAParameterSetStorage Name 2410 2331 TextField<String> nameF = new NameField(); 2411 2332 fs.add(nameF); 2412 2333 nameF.setValue("OMSSA parameter set storage"); 2413 if (omssaParameterSetStorage != null) 2414 { 2415 nameF.setValue(omssaParameterSetStorage.getName()); 2416 } 2334 2417 2335 // OMSSAParameterSetStorage Description 2418 2336 TextArea descF = new DescriptionField(); 2419 2337 fs.add(descF); 2420 2338 descF.setValue("OMSSA parameter set storage"); 2421 if (omssaParameterSetStorage != null) 2422 { 2423 descF.setValue(omssaParameterSetStorage.getDescription()); 2424 } 2339 2425 2340 // OMSSA Parameters Template File 2426 2341 TextField<String> parameterFileF = new FileNameField(); … … 2428 2343 parameterFileF.setLabel("OMSSAParameterTemplateFile"); 2429 2344 parameterFileF.setValue(getLocale().get("NotSpecifiedDefaultUsed")); 2430 if (omssaParameterSetStorage != null)2431 {2432 if (omssaParameterSetStorage.getParameterFile() != null)2433 {2434 parameterFileF.setValue(omssaParameterSetStorage2435 .getParameterFile().getPath().toString());2436 }2437 }2438 2345 parameterFileF.setDisabled(true); 2346 2439 2347 // OMSSA Parameters Template File id 2440 2348 TextField<Integer> parameterFileIdF = new TextField<Integer>(AddOMSSAParameterSetStorage.VOMSSAPARAMETERTEMPLATEFILEID); … … 2443 2351 parameterFileIdF.setLabel("OMSSAParameterTemplateFileId"); 2444 2352 parameterFileIdF.setValue(0); 2445 if (omssaParameterSetStorage != null) 2446 { 2447 if (omssaParameterSetStorage.getParameterFile() != null) 2448 { 2449 parameterFileIdF.setValue(omssaParameterSetStorage 2450 .getParameterFile().getId()); 2451 } 2452 } 2353 2453 2354 // Hidden text field for initial omssaParameterSetStorage id 2454 2355 TextField<Integer> iniOMSSApssIdF = new TextField<Integer>( … … 2457 2358 if (omssaParameterSetStorage != null) 2458 2359 { 2360 nameF.setValue(omssaParameterSetStorage.getName()); 2361 descF.setValue(omssaParameterSetStorage.getDescription()); 2459 2362 iniOMSSApssIdF.setValue(omssaParameterSetStorage.getId()); 2363 if (omssaParameterSetStorage.getParameterFile() != null) 2364 { 2365 parameterFileIdF.setValue(omssaParameterSetStorage.getParameterFile().getId()); 2366 parameterFileF.setValue(omssaParameterSetStorage.getParameterFile().getPath().toString()); 2367 } 2460 2368 } 2461 2369 fs.add(iniOMSSApssIdF); -
trunk/client/servlet/src/org/proteios/gui/form/ForwardField.java
r3846 r3865 45 45 setValue(value); 46 46 } 47 48 public ForwardField(Class action) 49 { 50 this(); 51 setValue(action.getName()); 52 } 53 47 54 }
Note: See TracChangeset
for help on using the changeset viewer.