Changeset 3841
- Timestamp:
- Sep 10, 2010, 1:24:33 PM (13 years ago)
- Location:
- trunk/client/servlet/src/org/proteios
- Files:
-
- 3 added
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/client/servlet/src/org/proteios/action/file/CreateMsInspectDetailsJobs.java
r2442 r3841 4 4 package org.proteios.action.file; 5 5 6 import java.util.List; 6 7 import org.proteios.action.ProteiosAction; 7 8 import org.proteios.action.job.ListJobs; … … 15 16 import org.proteios.core.Project; 16 17 import org.proteios.core.StringParameterType; 17 import org.proteios.gui.form.FormFactory; 18 18 import org.proteios.gui.form.*; 19 19 import se.lu.thep.waf.ActionException; 20 20 import se.lu.thep.waf.constraints.InvalidParameterValue; 21 22 import java.util.List;23 21 24 22 /** … … 38 36 */ 39 37 List<Integer> files = getValidIntegerList(FormFactory.VID); 40 String capture = getValidString( FormFactory.VDUMMY);38 String capture = getValidString(DummyField.VPARAM); 41 39 /* 42 40 * execute the plugin on the selected files -
trunk/client/servlet/src/org/proteios/action/file/MsInspectDetailsForm.java
r2451 r3841 22 22 package org.proteios.action.file; 23 23 24 import java.util.ArrayList; 25 import java.util.List; 24 26 import org.proteios.ActionLink; 25 27 import org.proteios.Context; … … 29 31 import org.proteios.gui.TitledWindow; 30 32 import org.proteios.gui.Toolbar; 31 import org.proteios.gui.form.Fieldset; 32 import org.proteios.gui.form.Form; 33 import org.proteios.gui.form.FormFactory; 34 import org.proteios.gui.form.TextField; 33 import org.proteios.gui.form.*; 35 34 import org.proteios.gui.layout.RowLayout; 36 37 35 import se.lu.thep.waf.ActionException; 38 36 import se.lu.thep.waf.constraints.InvalidParameterValue; 39 40 import java.util.ArrayList;41 import java.util.List;42 37 43 38 /** … … 99 94 instructionArea.setTitle("Grouping pattern"); 100 95 TextField<String> captureField = new TextField<String>( 101 FormFactory.VDUMMY);96 DummyField.VPARAM); 102 97 captureField.setValue(".*_(\\d)\\w\\..*"); 103 98 captureField.setLabel("Pattern"); -
trunk/client/servlet/src/org/proteios/action/hit/ImportHitsNonGelWizardStep1a.java
r3821 r3841 62 62 String selectedLocalSampleId = getString(FormFactory.VLOCALSAMPLEIDSELECTED); 63 63 Boolean useRegexPattern = getValidBoolean(ImportHitsNonGelWizardStep1b.VUSEREGEXPATTERN); 64 String regexPattern = getValidString( ImportHitsNonGelWizardStep1b.VREGEXPATTERN);64 String regexPattern = getValidString(RegexField.VPARAM); 65 65 log.debug("enteredLocalSampleId = \"" + enteredLocalSampleId + "\""); 66 66 log.debug("selectedLocalSampleId = \"" + selectedLocalSampleId + "\""); … … 85 85 saveToSession(FormFactory.VLOCALSAMPLEID); 86 86 setSessionAttribute(ImportHitsNonGelWizardStep1b.VUSEREGEXPATTERN, useRegexPattern); 87 saveToSession( ImportHitsNonGelWizardStep1b.VREGEXPATTERN);87 saveToSession(RegexField.VPARAM); 88 88 saveToSession(ForwardField.VPARAM); 89 89 saveToSession(PluginIdField.VPARAM); -
trunk/client/servlet/src/org/proteios/action/hit/ImportHitsNonGelWizardStep1b.java
r3821 r3841 54 54 { 55 55 public static final VBoolean VUSEREGEXPATTERN = new VBoolean("useRegexPattern", false); 56 public static final VString VREGEXPATTERN = new VString("regexPattern", 0, 255, false);57 56 58 57 /* … … 74 73 List<Integer> fileIds = getValidIntegerList(ItemIdField.VPARAM); 75 74 Boolean useRegexPattern = getSessionAttribute(VUSEREGEXPATTERN); 76 String regexPattern = getSessionAttribute( VREGEXPATTERN);75 String regexPattern = getSessionAttribute(RegexField.VPARAM); 77 76 // Set default value of regex pattern use flag to false 78 77 if (useRegexPattern == null) -
trunk/client/servlet/src/org/proteios/action/hit/ImportHitsWizard.java
r3840 r3841 28 28 package org.proteios.action.hit; 29 29 30 import java.util.ArrayList; 31 import java.util.List; 30 32 import org.proteios.ActionLink; 31 33 import org.proteios.Context; … … 36 38 import org.proteios.core.Hit; 37 39 import org.proteios.core.Project; 40 import org.proteios.gui.ColumnContainer; 41 import org.proteios.gui.RowContainer; 38 42 import org.proteios.gui.Title; 39 43 import org.proteios.gui.TitledWindow; 40 44 import org.proteios.gui.Toolbar; 41 import org.proteios.gui.ColumnContainer;42 import org.proteios.gui.RowContainer;43 45 import org.proteios.gui.form.*; 44 46 import org.proteios.gui.layout.RowLayout; 45 47 import se.lu.thep.waf.ActionException; 46 48 import se.lu.thep.waf.constraints.InvalidParameterValue; 47 import java.util.ArrayList;48 import java.util.List;49 49 50 50 /** … … 137 137 138 138 { // Step 3 139 step3 = getFormFactory().getImportHitsWizardStep3Form(project);139 step3 = new ImportHitsWizardStep3Form(dc, getActionFactory().getId(ImportHitsWizardStep3b.class) ); 140 140 toolbar = new Toolbar(); 141 141 step3.setToolbar(toolbar); -
trunk/client/servlet/src/org/proteios/action/hit/ImportHitsWizardStep3a.java
r3821 r3841 56 56 DbControl dc = newDbControl(); 57 57 Project project = isProjectActive(dc); 58 Form impForm = getFormFactory().getImportHitsWizardStep3Form(project);58 Form impForm = new ImportHitsWizardStep3Form(dc, getActionFactory().getId(ImportHitsWizardStep3b.class) ); 59 59 verifyParameters(impForm); 60 60 saveToSession(ForwardField.VPARAM); -
trunk/client/servlet/src/org/proteios/gui/form/Fieldset.java
r3793 r3841 43 43 44 44 private List<GUIElement> fields = null; 45 private Title legendTitle = null; 46 /** 47 * @deprecated replaced by Title legendTitle 48 */ 49 private String legend = ""; 45 private Title title = null; 50 46 51 47 52 // TODO #439 olle add a Title here, let the old legend be the Title.title and 53 // deprecate the legend field and its methods 54 48 public Fieldset() 49 { 50 } 51 52 public Fieldset(String title) 53 { 54 this.title = new Title(title); 55 } 56 55 57 /** 56 58 * Get the fieldset legend Title object. … … 68 70 public Title getLegendTitle() 69 71 { 70 if (this. legendTitle == null)72 if (this.title == null) 71 73 { 72 this. legendTitle = new Title("");74 this.title = new Title(""); 73 75 } 74 return this. legendTitle;76 return this.title; 75 77 } 76 78 … … 81 83 * @param legendTitle Title The legend Title to set. 82 84 */ 83 public void setLegendTitle(Title legendTitle)85 public void setLegendTitle(Title title) 84 86 { 85 this. legendTitle = legendTitle;87 this.title = title; 86 88 } 87 89 -
trunk/client/servlet/src/org/proteios/gui/form/FormFactory.java
r3840 r3841 145 145 public static final VString VFILTERVALUELIST = new VString("filterValueList", 0, 255, false); 146 146 public static final VString VSORTCOLUMNKEY = new VString("sortColumnKey",0, 255, false); 147 public static final VString VDUMMY = new VString("dummy", 0, 255, false);148 147 public static final VString VCOMMENT = new VString("comment", 0, 255, false); 149 148 public static final VDate VENTRYDATE = new VDate("entryDate", false,Format.DATETIME); … … 2154 2153 // Cleaning up from here 2155 2154 2156 public Form getImportHitsWizardStep3Form(Project project)2157 {2158 DbControl dc = project.getDbControl();2159 Form form = new Form("importHitsWizardStep3Form");2160 if (dc != null && dc.isConnected())2161 {2162 // Properties fieldset2163 Fieldset properties = new Fieldset();2164 properties.getLegendTitle().setTitle(2165 "ImportHitsWizardStep3FormLegend");2166 form.addFieldset(properties);2167 /*2168 * Disabled text field with info.2169 */2170 TextField<String> infoF = new TextField<String>(VDUMMY);2171 infoF.setDisabled(true);2172 infoF.setLabel("SearchResults");2173 infoF.setValue("");2174 properties.add(infoF);2175 /*2176 * Hidden text field for storing plugin id to use.2177 */2178 TextField<Integer> pluginIdF = new PluginIdField();2179 PluginDefinition pluginDef = PluginDefinition.getByClassName(2180 project.getDbControl(),2181 "org.proteios.plugins.SearchResultsImporter");2182 pluginIdF.setValue(pluginDef.getId());2183 properties.add(pluginIdF);2184 /*2185 * This hidden text field sets title to be used for file selection2186 * form.2187 */2188 TextField<String> titleF = new TitleField();2189 titleF.setValue("Step 3a. Select Search Result File[s]");2190 properties.add(titleF);2191 /*2192 * This hidden text field sets name to be used for the "Next" button2193 * in the file selection form.2194 */2195 TextField<String> buttonNameF = new NextButtonNameField();2196 buttonNameF.setValue("Import");2197 properties.add(buttonNameF);2198 /*2199 * This hidden forward field sets action id used by the file2200 * selection action called by ImportHitsWizardStep1a.2201 */2202 TextField<String> forwardF = new ForwardField();2203 forwardF2204 .setValue(actionFactory.getId(ImportHitsWizardStep3b.class));2205 properties.add(forwardF);2206 }2207 return form;2208 }2209 2210 2211 2155 public Form getImportHitsNonGelWizardStep1Form(Project project) 2212 2156 { … … 2233 2177 * form. 2234 2178 */ 2235 TextField<String> titleF = new TitleField(); 2236 titleF.setValue("Step 1a. Select PeakList File[s]"); 2179 TextField<String> titleF = new TitleField("Step 1a. Select PeakList File[s]"); 2237 2180 properties.add(titleF); 2238 2181 /* … … 2267 2210 properties.add(useRegexPatternCB); 2268 2211 // Optional regex pattern entry field 2269 TextField<String> regexPatternF = createField(ImportHitsNonGelWizardStep1b.VREGEXPATTERN);2212 TextField<String> regexPatternF = new RegexField(); 2270 2213 regexPatternF.setLabel("ImportHitsNonGelWizardRegexPattern"); 2271 2214 regexPatternF.setValue(".+\\_(.+)\\..+"); … … 2290 2233 * Disabled text field with info. 2291 2234 */ 2292 TextField<String> infoF = new TextField<String>(VDUMMY);2235 TextField<String> infoF = new DummyField(); 2293 2236 infoF.setDisabled(true); 2294 2237 infoF.setLabel("SearchResults"); … … 2682 2625 project1IdF.setValue(project1.getId()); 2683 2626 // 2684 TextField<String> project1NameF = createField(VDUMMY);2627 TextField<String> project1NameF = new DummyField(); 2685 2628 project1FilterSettingsFS.add(project1NameF); 2686 2629 project1NameF.setDisabled(true); … … 2769 2712 project2IdF.setValue(project2.getId()); 2770 2713 // 2771 TextField<String> project2NameF = createField(VDUMMY);2714 TextField<String> project2NameF = new DummyField(); 2772 2715 project2FilterSettingsFS.add(project2NameF); 2773 2716 project2NameF.setDisabled(true); … … 7659 7602 String mascotServerURLStr = pf.getProperty("mascot.server.url"); 7660 7603 // Mascot server URL string (disabled) 7661 TextField<String> mascotServerUrlF = createField(VDUMMY);7604 TextField<String> mascotServerUrlF = new DummyField(); 7662 7605 mascotServerUrlF.setDisabled(true); 7663 7606 mascotServerUrlF.setLabel("MascotServerURL"); … … 7665 7608 mascotServerUrlF.setValue(mascotServerURLStr); 7666 7609 // Mascot output directory (disabled) 7667 TextField<String> dirF = createField(VDUMMY);7610 TextField<String> dirF = new DummyField(); 7668 7611 dirF.setDisabled(true); 7669 7612 dirF.setLabel("MascotOutputDirectory"); … … 7811 7754 Fieldset fs = new Fieldset(); 7812 7755 fs.getLegendTitle().setTitle("UsedSample"); 7813 TextField<String> sampleIdF = new TextField<String>(VDUMMY);7756 TextField<String> sampleIdF = new DummyField(); 7814 7757 sampleIdF.setDisabled(true); 7815 7758 sampleIdF.setLabel("SampleExternalId"); … … 7830 7773 Fieldset fs = new Fieldset(); 7831 7774 fs.getLegendTitle().setTitle("UsedExtract"); 7832 TextField<String> extractIdF = new TextField<String>(VDUMMY);7775 TextField<String> extractIdF = new DummyField(); 7833 7776 extractIdF.setDisabled(true); 7834 7777 extractIdF.setLabel("ExtractExternalId"); … … 7849 7792 Fieldset fs = new Fieldset(); 7850 7793 fs.getLegendTitle().setTitle("UsedLabeledExtract"); 7851 TextField<String> extractIdF = new TextField<String>(VDUMMY);7794 TextField<String> extractIdF = new DummyField(); 7852 7795 extractIdF.setDisabled(true); 7853 7796 extractIdF.setLabel("ExtractExternalId"); … … 8053 7996 properties.add(filterNameF); 8054 7997 // Filter name display field (disabled - for display of value as label) 8055 TextField<String> filterNameDisplayF = new TextField<String>(VDUMMY);7998 TextField<String> filterNameDisplayF = new DummyField(); 8056 7999 filterNameDisplayF.setLabel(filterName); 8057 8000 filterNameDisplayF.setValue(""); … … 8945 8888 if (count == 0) 8946 8889 { 8947 TextField<String> itemsCount = new TextField<String>(VDUMMY);8890 TextField<String> itemsCount = new DummyField(); 8948 8891 itemsCount.setLabel("Empty"); 8949 8892 itemsCount.setValue(""); … … 9633 9576 if (obj != null) 9634 9577 { 9635 TextField<String> removedF = new TextField<String>(VDUMMY);9578 TextField<String> removedF = new DummyField(); 9636 9579 fs.add(removedF); 9637 9580 removedF.setDisabled(true);
Note: See TracChangeset
for help on using the changeset viewer.