Changeset 3863
- Timestamp:
- Sep 20, 2010, 11:05:42 AM (13 years ago)
- Location:
- trunk/client/servlet/src/org/proteios
- Files:
-
- 1 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/client/servlet/src/org/proteios/action/mascot/ViewActiveMascotParameterSetStorage.java
r3825 r3863 197 197 reportTopOptionList = stringListToOptionList(reportTopStringList); 198 198 // Mascot parameter set form 199 mascotParameterSetForm = getFormFactory().getMascotParameterSetForm(mascotParameterSet,199 mascotParameterSetForm = new MascotStorageForm(mascotParameterSet, 200 200 enzymeOptionList, 201 201 missedCleavagesOptionList, -
trunk/client/servlet/src/org/proteios/gui/form/FormFactory.java
r3862 r3863 2287 2287 2288 2288 2289 /**2290 * Returns a select box for selecting a list of string values.2291 *2292 * @param validParam VString Valid VString parameter coupled to select box.2293 * @param optionList List<Option> Option list of options.2294 * @param selected List<String> List with values of selected options.2295 * @return Select<VString> A select box for selecting a string value.2296 */2297 private Select<VString> newStringMultipleSelectBox(VString validParam,2298 List<Option> optionList, List<String> selectedList)2299 {2300 Select<VString> select = new Select<VString>(validParam);2301 select.setLabel(validParam.getName());2302 // Add options in list order2303 if (optionList != null)2304 {2305 for (int i = 0; i < optionList.size(); i++)2306 {2307 if (optionList.get(i) != null)2308 {2309 select.addOption(optionList.get(i));2310 }2311 }2312 }2313 // Set selected options2314 if (selectedList != null)2315 {2316 if (select.getOptions() != null)2317 {2318 for (int i = 0; i < select.getOptions().size(); i++)2319 {2320 // Check all selected options in list2321 for (int j = 0; j < selectedList.size(); j++)2322 {2323 if (select.getOptions().get(i).getValue().equals(2324 selectedList.get(j)))2325 {2326 select.getOptions().get(i).setSelected(true);2327 }2328 }2329 }2330 }2331 }2332 // Set default visible number of options2333 select.setMaxSize(5);2334 return select;2335 }2336 2337 2289 //Cleaning up from here 2338 2339 2340 public Form getMascotParameterSetForm(2341 MascotParameterSet mascotParameterSet,2342 List<Option> enzymeOptionList,2343 List<Option> missedCleavagesOptionList,2344 List<Option> sequenceLibraryOptionList,2345 List<Option> speciesOptionList, List<Option> fixedModsOptionList,2346 List<Option> variableModsOptionList,2347 List<Option> quantitationOptionList,2348 List<Option> peptideTolUnitOptionList,2349 List<Option> peptideIsotopeErrorOptionList,2350 List<Option> msMsTolUnitOptionList,2351 List<Option> peptideChargeOptionList,2352 List<Option> dataFormatOptionList,2353 List<Option> instrumentOptionList, List<Option> reportTopOptionList)2354 {2355 //2356 MascotParameterFileUtil mascotParameterFileUtil = new MascotParameterFileUtil();2357 // String delimRegex = new String(",\\ ");2358 String delimRegex = new String(",");2359 // Fetch help hash tables to find attribute strings2360 Hashtable<String, String> searchTypeHT = mascotParameterFileUtil2361 .fetchSearchTypeAttributeHashtable();2362 Hashtable<String, String> massIonTypeHT = mascotParameterFileUtil2363 .fetchMassIonTypeAttributeHashtable();2364 List<String> searchTypeL = mascotParameterFileUtil2365 .fetchSearchTypeAlternativesList();2366 List<String> enzymeL = mascotParameterFileUtil2367 .fetchEnzymeAlternativesList();2368 List<String> missedCleavagesL = mascotParameterFileUtil2369 .fetchMissedCleavagesAlternativesList();2370 List<String> sequenceLibraryL = mascotParameterFileUtil2371 .fetchSequenceLibraryAlternativesList();2372 List<String> speciesL = mascotParameterFileUtil2373 .fetchSpeciesAlternativesList();2374 List<String> modificationL = mascotParameterFileUtil2375 .fetchModificationAlternativesList();2376 List<String> quantitationL = mascotParameterFileUtil2377 .fetchQuantitationAlternativesList();2378 List<String> peptideTolUnitL = mascotParameterFileUtil2379 .fetchPeptideTolUnitAlternativesList();2380 List<String> peptideIsotopeErrorL = mascotParameterFileUtil2381 .fetchPeptideIsotopeErrorAlternativesList();2382 List<String> msMsTolUnitL = mascotParameterFileUtil2383 .fetchMsMsTolUnitAlternativesList();2384 List<String> peptideChargeL = mascotParameterFileUtil2385 .fetchPeptideChargeAlternativesList();2386 List<String> massIonTypeL = mascotParameterFileUtil2387 .fetchMassIonTypeAlternativesList();2388 List<String> massTypeL = mascotParameterFileUtil2389 .fetchMassTypeAlternativesList();2390 List<String> dataFormatL = mascotParameterFileUtil2391 .fetchDataFormatAlternativesList();2392 List<String> instrumentL = mascotParameterFileUtil2393 .fetchInstrumentAlternativesList();2394 List<String> reportTopL = mascotParameterFileUtil2395 .fetchReportTopAlternativesList();2396 // DbControl dc = project.getDbControl();2397 Form form = new Form("MascotParameterSetForm");2398 /*2399 * String select box variables2400 */2401 VString validStringParam = null;2402 List<String> stringList = null;2403 List<Option> optionList = null;2404 String selected = null;2405 List<String> selectedList = null;2406 /*2407 * General field set2408 */2409 Fieldset generalFS = new Fieldset();2410 // Make sure that search type is one of "MIS" (default), "SQ", "PMF"2411 String searchTypeInput = mascotParameterSet.getSearchType();2412 if (searchTypeInput == null)2413 {2414 searchTypeInput = new String("MIS");2415 }2416 else if (!searchTypeInput.equals("MIS") && !searchTypeInput2417 .equals("SQ") && !searchTypeInput.equals("PMF"))2418 {2419 searchTypeInput = new String("MIS");2420 }2421 // Get field set legend title2422 String generalFSTitle = new String("MascotParameterSetGeneral");2423 if (searchTypeInput.equals("MIS"))2424 {2425 generalFSTitle = new String("MascotParameterSetGeneralMIS");2426 }2427 else if (searchTypeInput.equals("SQ"))2428 {2429 generalFSTitle = new String("MascotParameterSetGeneralSQ");2430 }2431 else if (searchTypeInput.equals("PMF"))2432 {2433 generalFSTitle = new String("MascotParameterSetGeneralPMF");2434 }2435 2436 generalFS.setTitle(generalFSTitle);2437 form.addFieldset(generalFS);2438 //2439 // General, search type2440 // Parameter value fixed and only shown via field set title,2441 // but transmitted via hidden field.2442 TextField<String> searchTypeF = new TextField<String>(SaveMascotParameterSetStorage.VMASCOT_SEARCH_TYPE);2443 searchTypeF.setValue(searchTypeInput);2444 searchTypeF.setHidden(true);2445 generalFS.add(searchTypeF);2446 //2447 // General, search title2448 TextField<String> searchTitleF = new TextField<String>(SaveMascotParameterSetStorage.VMASCOT_SEARCH_TITLE);2449 searchTitleF.setValue(mascotParameterSet.getSearchTitle());2450 searchTitleF.setLabel("MascotSearchTitle");2451 generalFS.add(searchTitleF);2452 //2453 // General, sequence library2454 validStringParam = SaveMascotParameterSetStorage.VMASCOT_DB;2455 optionList = new ArrayList<Option>();2456 for (String key : sequenceLibraryL)2457 {2458 optionList.add(new Option(key, key));2459 }2460 // Use input sequence library option list if present2461 if (sequenceLibraryOptionList != null && sequenceLibraryOptionList2462 .size() > 0)2463 {2464 optionList = sequenceLibraryOptionList;2465 }2466 selected = mascotParameterSet.getDb();2467 Select<VString> sequenceLibrarySelectBox = new Select<VString>(validStringParam, optionList);2468 sequenceLibrarySelectBox.selectOption(selected);2469 sequenceLibrarySelectBox.setLabel("MascotSequenceLibrarySelect");2470 generalFS.add(sequenceLibrarySelectBox);2471 //2472 // General, species2473 validStringParam = SaveMascotParameterSetStorage.VMASCOT_SPECIES;2474 optionList = new ArrayList<Option>();2475 for (String key : speciesL)2476 {2477 // optionList.add(new Option(key, speciesHT.get(key)));2478 optionList.add(new Option(key, key));2479 }2480 // Use input species option list if present2481 if (speciesOptionList != null && speciesOptionList.size() > 0)2482 {2483 optionList = speciesOptionList;2484 }2485 selected = mascotParameterSet.getSpecies();2486 Select<VString> speciesSelectBox = new Select<VString>(validStringParam, optionList);2487 speciesSelectBox.selectOption(selected);2488 speciesSelectBox.setLabel("MascotSpecies");2489 generalFS.add(speciesSelectBox);2490 //2491 // General, enzyme2492 validStringParam = SaveMascotParameterSetStorage.VMASCOT_ENZYME;2493 optionList = new ArrayList<Option>();2494 for (String key : enzymeL)2495 {2496 // optionList.add(new Option(key, enzymeHT.get(key)));2497 optionList.add(new Option(key, key));2498 }2499 // Use input enzyme option list if present2500 if (enzymeOptionList != null && enzymeOptionList.size() > 0)2501 {2502 optionList = enzymeOptionList;2503 }2504 selected = mascotParameterSet.getEnzyme();2505 Select<VString> enzymeSelectBox = new Select<VString>(validStringParam, optionList);2506 enzymeSelectBox.selectOption(selected);2507 enzymeSelectBox.setLabel("MascotEnzymeSelect");2508 generalFS.add(enzymeSelectBox);2509 //2510 // General, missed cleavages2511 validStringParam = SaveMascotParameterSetStorage.VMASCOT_MISSED_CLEAVAGES;2512 optionList = new ArrayList<Option>();2513 for (String key : missedCleavagesL)2514 {2515 optionList.add(new Option(key, key));2516 }2517 // Use input missed cleavages option list if present2518 if (missedCleavagesOptionList != null && missedCleavagesOptionList2519 .size() > 0)2520 {2521 optionList = missedCleavagesOptionList;2522 }2523 selected = mascotParameterSet.getMissedCleavages();2524 Select<VString> missedCleavagesSelectBox = new Select<VString>(validStringParam, optionList);2525 missedCleavagesSelectBox.selectOption(selected);2526 missedCleavagesSelectBox.setLabel("MascotMissedCleavagesSelect");2527 generalFS.add(missedCleavagesSelectBox);2528 // Fixed mods2529 validStringParam = SaveMascotParameterSetStorage.VMASCOT_FIXED;2530 optionList = new ArrayList<Option>();2531 for (String key : modificationL)2532 {2533 // optionList.add(new Option(key, modificationHT.get(key)));2534 optionList.add(new Option(key, key));2535 }2536 // Use input fixed mods option list if present2537 if (fixedModsOptionList != null && fixedModsOptionList.size() > 0)2538 {2539 optionList = fixedModsOptionList;2540 }2541 selected = mascotParameterSet.getFixed();2542 selectedList = listStringToStringList(selected, delimRegex);2543 Select<VString> fixedMods = newStringMultipleSelectBox(validStringParam, optionList, selectedList);2544 fixedMods.setLabel("MascotFixedMods");2545 fixedMods.setMultiple(true);2546 fixedMods.setSize(5);2547 generalFS.add(fixedMods);2548 // Variable mods2549 validStringParam = SaveMascotParameterSetStorage.VMASCOT_VARIABLE;2550 optionList = new ArrayList<Option>();2551 for (String key : modificationL)2552 {2553 // optionList.add(new Option(key, modificationHT.get(key)));2554 optionList.add(new Option(key, key));2555 }2556 // Use input varible mods option list if present2557 if (variableModsOptionList != null && variableModsOptionList.size() > 0)2558 {2559 optionList = variableModsOptionList;2560 }2561 selected = mascotParameterSet.getVariable();2562 selectedList = listStringToStringList(selected, delimRegex);2563 Select<VString> variableMods = newStringMultipleSelectBox(2564 validStringParam, optionList, selectedList);2565 variableMods.setLabel("MascotVariableMods");2566 variableMods.setMultiple(true);2567 variableMods.setSize(5);2568 generalFS.add(variableMods);2569 if (searchTypeInput.equals("MIS") || searchTypeInput.equals("SQ"))2570 {2571 // General, quantitation2572 validStringParam = SaveMascotParameterSetStorage.VMASCOT_QUANTITATION;2573 optionList = new ArrayList<Option>();2574 for (String key : quantitationL)2575 {2576 optionList.add(new Option(key, key));2577 }2578 // Use input quantitation option list if present2579 if (quantitationOptionList != null && quantitationOptionList.size() > 0)2580 {2581 optionList = quantitationOptionList;2582 }2583 selected = mascotParameterSet.getQuantitation();2584 Select<VString> quantitationSelectBox = new Select<VString>(validStringParam, optionList);2585 quantitationSelectBox.selectOption(selected);2586 quantitationSelectBox.setLabel("MascotQuantitationSelect");2587 generalFS.add(quantitationSelectBox);2588 }2589 if (searchTypeInput.equals("PMF"))2590 {2591 // General, protein mass (kDa)2592 TextField<String> proteinMassF = new TextField<String>(SaveMascotParameterSetStorage.VMASCOT_PROTEIN_MASS);2593 proteinMassF.setValue(mascotParameterSet.getProteinMass());2594 generalFS.add(proteinMassF);2595 }2596 2597 // General, peptide mass tolerance2598 TextField<String> peptideMassToleranceF = new TextField<String>(SaveMascotParameterSetStorage.VMASCOT_PEP_TOL);2599 peptideMassToleranceF.setValue(mascotParameterSet.getPepTol());2600 generalFS.add(peptideMassToleranceF);2601 2602 // General, peptide mass tolerance unit2603 validStringParam = SaveMascotParameterSetStorage.VMASCOT_PEP_TOL_UNIT;2604 optionList = new ArrayList<Option>();2605 for (String key : peptideTolUnitL)2606 {2607 optionList.add(new Option(key, key));2608 }2609 // Use input peptide tolerance unit option list if present2610 if (peptideTolUnitOptionList != null && peptideTolUnitOptionList.size() > 0)2611 {2612 optionList = peptideTolUnitOptionList;2613 }2614 selected = mascotParameterSet.getPepTolUnit();2615 Select<VString> peptideTolUnitSelectBox = new Select<VString>(validStringParam, optionList);2616 peptideTolUnitSelectBox.selectOption(selected);2617 peptideTolUnitSelectBox.setLabel("MascotPeptideToleranceUnitSelect");2618 generalFS.add(peptideTolUnitSelectBox);2619 if (searchTypeInput.equals("MIS"))2620 {2621 2622 // General, peptide isotope error2623 validStringParam = SaveMascotParameterSetStorage.VMASCOT_PEPTIDE_ISOTOPE_ERROR;2624 optionList = new ArrayList<Option>();2625 for (String key : peptideIsotopeErrorL)2626 {2627 optionList.add(new Option(key, key));2628 }2629 // Use input peptide isotope error option list if present2630 if (peptideIsotopeErrorOptionList != null && peptideIsotopeErrorOptionList2631 .size() > 0)2632 {2633 optionList = peptideIsotopeErrorOptionList;2634 }2635 selected = mascotParameterSet.getPeptideIsotopeError();2636 Select<VString> peptideIsotopeErrorSelectBox = new Select<VString>(2637 validStringParam, optionList);2638 peptideIsotopeErrorSelectBox.selectOption( selected);2639 peptideIsotopeErrorSelectBox2640 .setLabel("MascotPeptideIsotopeErrorSelect");2641 generalFS.add(peptideIsotopeErrorSelectBox);2642 }2643 if (searchTypeInput.equals("MIS") || searchTypeInput.equals("SQ"))2644 {2645 // General, MS/MS mass tolerance2646 TextField<String> msMsMassToleranceF = new TextField<String>(SaveMascotParameterSetStorage.VMASCOT_MSMS_TOL);2647 msMsMassToleranceF.setValue(mascotParameterSet.getMsMsTol());2648 generalFS.add(msMsMassToleranceF);2649 // General, MS/MS mass tolerance unit2650 validStringParam = SaveMascotParameterSetStorage.VMASCOT_MSMS_TOL_UNIT;2651 optionList = new ArrayList<Option>();2652 for (String key : msMsTolUnitL)2653 {2654 optionList.add(new Option(key, key));2655 }2656 // Use input MS/MS tolerance unit option list if present2657 if (msMsTolUnitOptionList != null && msMsTolUnitOptionList.size() > 0)2658 {2659 optionList = msMsTolUnitOptionList;2660 }2661 selected = mascotParameterSet.getMsMsTolUnit();2662 Select<VString> msMsTolUnitSelectBox = new Select<VString>(2663 validStringParam, optionList);2664 msMsTolUnitSelectBox.selectOption( selected);2665 msMsTolUnitSelectBox.setLabel("MascotMsMsToleranceUnitSelect");2666 generalFS.add(msMsTolUnitSelectBox);2667 //2668 // General, peptide charge2669 validStringParam = SaveMascotParameterSetStorage.VMASCOT_PEPTIDE_CHARGE;2670 optionList = new ArrayList<Option>();2671 for (String key : peptideChargeL)2672 {2673 optionList.add(new Option(key, key));2674 }2675 // Use input peptide charge option list if present2676 if (peptideChargeOptionList != null && peptideChargeOptionList2677 .size() > 0)2678 {2679 optionList = peptideChargeOptionList;2680 }2681 selected = mascotParameterSet.getPeptideCharge();2682 Select<VString> peptideChargeSelectBox = new Select<VString>(2683 validStringParam, optionList);2684 peptideChargeSelectBox.selectOption( selected);2685 peptideChargeSelectBox.setLabel("MascotPeptideChargeSelect");2686 generalFS.add(peptideChargeSelectBox);2687 }2688 if (searchTypeInput.equals("PMF"))2689 {2690 //2691 // General, mass ion type2692 validStringParam = SaveMascotParameterSetStorage.VMASCOT_MASS_ION_TYPE;2693 optionList = new ArrayList<Option>();2694 for (String key : massIonTypeL)2695 {2696 optionList.add(new Option(key, massIonTypeHT.get(key)));2697 }2698 selected = mascotParameterSet.getMassIonType();2699 Select<VString> massIonTypeSelectBox = new Select<VString>(2700 validStringParam, optionList);2701 massIonTypeSelectBox.selectOption( selected);2702 massIonTypeSelectBox.setLabel("MascotMassIonTypeSelect");2703 generalFS.add(massIonTypeSelectBox);2704 }2705 //2706 // General, mass type2707 validStringParam = SaveMascotParameterSetStorage.VMASCOT_MASS_TYPE;2708 optionList = new ArrayList<Option>();2709 for (String key : massTypeL)2710 {2711 optionList.add(new Option(key, key));2712 }2713 selected = mascotParameterSet.getMassType();2714 Select<VString> massTypeSelectBox = new Select<VString>(2715 validStringParam, optionList);2716 massTypeSelectBox.selectOption( selected);2717 massTypeSelectBox.setLabel("MascotMassTypeSelect");2718 generalFS.add(massTypeSelectBox);2719 if (searchTypeInput.equals("MIS"))2720 {2721 // General, data format2722 validStringParam = SaveMascotParameterSetStorage.VMASCOT_DATA_FORMAT;2723 optionList = new ArrayList<Option>();2724 for (String key : dataFormatL)2725 {2726 optionList.add(new Option(key, key));2727 }2728 // Use input data format list if present2729 if (dataFormatOptionList != null && dataFormatOptionList.size() > 0)2730 {2731 optionList = dataFormatOptionList;2732 }2733 selected = mascotParameterSet.getDataFormat();2734 Select<VString> dataFormatSelectBox = new Select<VString>(2735 validStringParam, optionList);2736 dataFormatSelectBox.selectOption( selected);2737 dataFormatSelectBox.setLabel("MascotDataFormatSelect");2738 generalFS.add(dataFormatSelectBox);2739 //2740 // General, precursor2741 TextField<String> precursorF = new TextField<String>(SaveMascotParameterSetStorage.VMASCOT_PRECURSOR);2742 precursorF.setValue(mascotParameterSet.getPrecursor());2743 precursorF.setLabel("MascotPrecursor");2744 generalFS.add(precursorF);2745 }2746 if (searchTypeInput.equals("SQ") || searchTypeInput.equals("PMF"))2747 {2748 // General, Mascot query2749 TextArea mascotQueryF = new TextArea(2750 SaveMascotParameterSetStorage.VMASCOT_MASCOT_QUERY);2751 mascotQueryF.setValue(mascotParameterSet.getMascotQuery());2752 mascotQueryF.setLabel("MascotMascotQuery");2753 generalFS.add(mascotQueryF);2754 }2755 if (searchTypeInput.equals("MIS") || searchTypeInput.equals("SQ"))2756 {2757 // General, instrument2758 validStringParam = SaveMascotParameterSetStorage.VMASCOT_INSTRUMENT;2759 optionList = new ArrayList<Option>();2760 for (String key : instrumentL)2761 {2762 optionList.add(new Option(key, key));2763 }2764 // Use input instrument list if present2765 if (instrumentOptionList != null && instrumentOptionList.size() > 0)2766 {2767 optionList = instrumentOptionList;2768 }2769 selected = mascotParameterSet.getInstrument();2770 Select<VString> instrumentSelectBox = new Select<VString>(validStringParam, optionList);2771 instrumentSelectBox.selectOption( selected);2772 instrumentSelectBox.setLabel("MascotInstrumentSelect");2773 generalFS.add(instrumentSelectBox);2774 }2775 if (searchTypeInput.equals("MIS"))2776 {2777 // General, error tolerant2778 Checkbox<VString> errorTolerantCB = new Checkbox<VString>(2779 SaveMascotParameterSetStorage.VMASCOT_ERROR_TOLERANT);2780 errorTolerantCB.setLabel("MascotErrorTolerantSelect");2781 errorTolerantCB.setValue("1");2782 selected = mascotParameterSet.getErrorTolerant();2783 errorTolerantCB.isChecked(false);2784 if (selected != null && selected.equals("1"))2785 {2786 errorTolerantCB.isChecked(true);2787 }2788 generalFS.add(errorTolerantCB);2789 }2790 // General, decoy2791 Checkbox<VString> decoyCB = new Checkbox<VString>(2792 SaveMascotParameterSetStorage.VMASCOT_DECOY);2793 decoyCB.setLabel("MascotDecoySelect");2794 decoyCB.setValue("1");2795 selected = mascotParameterSet.getDecoy();2796 decoyCB.isChecked(false);2797 if (selected != null && selected.equals("1"))2798 {2799 decoyCB.isChecked(true);2800 }2801 generalFS.add(decoyCB);2802 // General, report top2803 validStringParam = SaveMascotParameterSetStorage.VMASCOT_REPORT_TOP;2804 optionList = new ArrayList<Option>();2805 for (String key : reportTopL)2806 {2807 optionList.add(new Option(key, key));2808 }2809 // Use input report top list if present2810 if (reportTopOptionList != null && reportTopOptionList.size() > 0)2811 {2812 optionList = reportTopOptionList;2813 }2814 selected = mascotParameterSet.getReportTop();2815 Select<VString> reportTopSelectBox = new Select<VString>(validStringParam, optionList);2816 reportTopSelectBox.selectOption( selected);2817 reportTopSelectBox.setLabel("MascotReportTopSelect");2818 generalFS.add(reportTopSelectBox);2819 return form;2820 }2821 2290 2822 2291 … … 3223 2692 selected = omssaParameterSet.getSpecies(); 3224 2693 selectedList = listStringToStringList(selected, delimRegex); 3225 Select<VString> species = new StringMultipleSelectBox(validStringParam,2694 Select<VString> species = new Select<VString>(validStringParam, 3226 2695 optionList, selectedList); 3227 2696 species.setLabel("OMSSASpecies"); … … 3258 2727 selected = omssaParameterSet.getFixed(); 3259 2728 selectedList = listStringToStringList(selected, delimRegex); 3260 Select<VString> fixedMods = new StringMultipleSelectBox(validStringParam, optionList, selectedList);2729 Select<VString> fixedMods = new Select<VString>(validStringParam, optionList, selectedList); 3261 2730 fixedMods.setLabel("OMSSAFixedMods"); 3262 2731 fixedMods.setMultiple(true); … … 3283 2752 selected = omssaParameterSet.getVariable(); 3284 2753 selectedList = listStringToStringList(selected, delimRegex); 3285 Select<VString> variableMods = new StringMultipleSelectBox(2754 Select<VString> variableMods = new Select<VString>( 3286 2755 validStringParam, optionList, selectedList); 3287 2756 variableMods.setLabel("OMSSAVariableMods"); … … 4622 4091 log 4623 4092 .debug("residue potential modification mass selectedList = " + selectedList); 4624 Select<VString> residuePotentialModificationMassSelectBox = new StringMultipleSelectBox(4093 Select<VString> residuePotentialModificationMassSelectBox = new Select<VString>( 4625 4094 validStringParam, optionList, selectedList); 4626 4095 residuePotentialModificationMassSelectBox … … 4701 4170 selected = xTandemParameterSet.getProteinTaxon(); 4702 4171 selectedList = listStringToStringList(selected, ",\\ "); 4703 Select<VString> taxon = new StringMultipleSelectBox(validStringParam,4172 Select<VString> taxon = new Select<VString>(validStringParam, 4704 4173 optionList, selectedList); 4705 4174 taxon.setLabel("XTandemProteinTaxonEukaryotes"); … … 4745 4214 } 4746 4215 // Same selection list as for Eukaryotes taxon is used for Prokaryotes 4747 Select<VString> taxon1 = new StringMultipleSelectBox(validStringParam,4216 Select<VString> taxon1 = new Select<VString>(validStringParam, 4748 4217 optionList, selectedList); 4749 4218 taxon1.setLabel("XTandemProteinTaxonProkaryotes"); … … 4928 4397 log 4929 4398 .debug("refine potential modification mass selectedList = " + selectedList); 4930 Select<VString> refinePotentialModificationMassSelectBox = new StringMultipleSelectBox(4399 Select<VString> refinePotentialModificationMassSelectBox = new Select<VString>( 4931 4400 validStringParam, optionList, selectedList); 4932 4401 refinePotentialModificationMassSelectBox … … 5267 4736 } 5268 4737 selectedList = pikeFieldSelectList; 5269 Select<VString> fieldSelect = new StringMultipleSelectBox(4738 Select<VString> fieldSelect = new Select<VString>( 5270 4739 validStringParam, optionList, selectedList); 5271 4740 fieldSelect.setLabel("PIKEFieldSelect"); … … 5327 4796 } 5328 4797 selectedList = pikeOutputFileTypeList; 5329 Select<VString> outputFileTypeSelect = new StringMultipleSelectBox(4798 Select<VString> outputFileTypeSelect = new Select<VString>( 5330 4799 validStringParam, optionList, selectedList); 5331 4800 outputFileTypeSelect.setLabel("PIKEOutputFileTypeSelect"); -
trunk/client/servlet/src/org/proteios/gui/form/Select.java
r3856 r3863 33 33 34 34 /** 35 * Cell within a table.36 *37 35 * @author gregory 38 36 */ … … 59 57 { 60 58 this(param); 61 this.options = options;59 this.options.addAll(options); 62 60 } 63 61 … … 67 65 for(String str : options) 68 66 { 69 Option opt = new Option(str);70 addOption(opt);67 Option o = new Option(str); 68 addOption(o); 71 69 } 72 70 selectOption(selected); 73 71 } 72 73 public Select(D param , List<Option> optionList, List<String> selected) 74 { 75 this(param); 76 this.options.addAll(options); 77 for(String str : selected) 78 { 79 selectOption(str); 80 } 81 setMaxSize(5); 82 } 74 83 75 84 public String getName()
Note: See TracChangeset
for help on using the changeset viewer.