Changeset 3839
- Timestamp:
- Sep 9, 2010, 1:22:49 PM (13 years ago)
- Location:
- trunk/client/servlet/src/org/proteios
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/client/servlet/src/org/proteios/action/hit/ImportHitsWizard.java
r3711 r3839 41 41 import org.proteios.gui.ColumnContainer; 42 42 import org.proteios.gui.RowContainer; 43 import org.proteios.gui.form. Form;43 import org.proteios.gui.form.*; 44 44 import org.proteios.gui.layout.RowLayout; 45 45 import se.lu.thep.waf.ActionException; … … 83 83 toolbar.add(next); 84 84 85 step1 = getFormFactory().getImportHitsWizardStep1Form(project);85 step1 = new ImportHitsWizardStep1Form(dc, ImportHitsWizardStep1b.class.getName()); 86 86 step1.setToolbar(toolbar); 87 87 -
trunk/client/servlet/src/org/proteios/action/hit/ImportHitsWizardStep1a.java
r3821 r3839 57 57 DbControl dc = newDbControl(); 58 58 Project project = isProjectActive(dc); 59 Form impForm = getFormFactory().getImportHitsWizardStep1Form(project);59 Form impForm = new ImportHitsWizardStep1Form(dc,ImportHitsWizardStep1b.class.getName()); 60 60 verifyParameters(impForm); 61 61 saveToSession(ExternalGelIdField.VPARAM); -
trunk/client/servlet/src/org/proteios/gui/form/FormFactory.java
r3838 r3839 2153 2153 2154 2154 // Cleaning up from here 2155 2156 public Form getImportHitsWizardStep1Form(Project project)2157 {2158 DbControl dc = project.getDbControl();2159 Form form = new Form("importHitsWizardStep1Form");2160 if (dc != null && dc.isConnected())2161 {2162 // Properties fieldset2163 Fieldset properties = new Fieldset();2164 properties.getLegendTitle().setTitle("ImportHitsWizardStep1FormLegend");2165 form.addFieldset(properties);2166 /*2167 * Hidden text field for storing plugin id to use.2168 */2169 TextField<Integer> pluginIdF = new PluginIdField();2170 PluginDefinition pluginDef = PluginDefinition.getByClassName(2171 project.getDbControl(),2172 "org.proteios.plugins.GelSpotPlatePosToHitPlugin");2173 pluginIdF.setValue(pluginDef.getId());2174 properties.add(pluginIdF);2175 /*2176 * This hidden text field sets title to be used for file selection2177 * form.2178 */2179 TextField<String> titleF = new TitleField();2180 titleF.setValue("Step 1a. Select Robot Result File[s]");2181 properties.add(titleF);2182 /*2183 * This hidden text field sets name to be used for the "Next" button2184 * in the file selection form.2185 */2186 TextField<String> buttonNameF = new NextButtonNameField();2187 buttonNameF.setValue("Import");2188 properties.add(buttonNameF);2189 /*2190 * This hidden forward field sets action id used by the file2191 * selection action called by ImportHitsWizardStep1a.2192 */2193 TextField<String> forwardF = new ForwardField();2194 forwardF.setValue(actionFactory.getId(ImportHitsWizardStep1b.class));2195 properties.add(forwardF);2196 // Gel id (optional)2197 properties.add(new ExternalGelIdField(false));2198 }2199 return form;2200 }2201 2202 2155 2203 2156 public Form getImportHitsWizardStep2Form(Project project) -
trunk/client/servlet/src/org/proteios/gui/form/ImportHitsWizardStep1Form.java
r3838 r3839 1 1 /* 2 $Id$3 4 Copyright (C) 2010 Gregory Vincic5 6 Files are copyright by their respective authors. The contributions to7 files where copyright is not explicitly stated can be traced with the8 source code revision system.9 10 This file is part of Proteios.11 Available at http://www.proteios.org/12 13 Proteios is free software; you can redistribute it and/or14 modify it under the terms of the GNU General Public License15 as published by the Free Software Foundation; either version 216 of the License, or (at your option) any later version.17 18 Proteios is distributed in the hope that it will be useful,19 but WITHOUT ANY WARRANTY; without even the implied warranty of20 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the21 GNU General Public License for more details.22 23 You should have received a copy of the GNU General Public License24 along with this program; if not, write to the Free Software25 Foundation, Inc., 59 Temple Place - Suite 339.26 Boston, MA 02111-1307, USA.2 $Id$ 3 4 Copyright (C) 2010 Gregory Vincic 5 6 Files are copyright by their respective authors. The contributions to 7 files where copyright is not explicitly stated can be traced with the 8 source code revision system. 9 10 This file is part of Proteios. 11 Available at http://www.proteios.org/ 12 13 Proteios is free software; you can redistribute it and/or 14 modify it under the terms of the GNU General Public License 15 as published by the Free Software Foundation; either version 2 16 of the License, or (at your option) any later version. 17 18 Proteios is distributed in the hope that it will be useful, 19 but WITHOUT ANY WARRANTY; without even the implied warranty of 20 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 GNU General Public License for more details. 22 23 You should have received a copy of the GNU General Public License 24 along with this program; if not, write to the Free Software 25 Foundation, Inc., 59 Temple Place - Suite 339. 26 Boston, MA 02111-1307, USA. 27 27 */ 28 28 29 29 package org.proteios.gui.form; 30 31 import org.proteios.core.PluginDefinition; 32 import org.proteios.core.DbControl; 33 30 34 /** 31 35 */ 32 36 public class ImportHitsWizardStep1Form extends Form 33 37 { 38 public final Fieldset properties; 39 public final TextField<Integer> pluginIdF; 40 public final PluginDefinition pluginDef; 41 public final TextField<String> titleF, buttonNameF, forwardF; 42 43 /** 44 @param dc DbControl used to get a plugin definition, must not be null nor disconnected 45 */ 46 public ImportHitsWizardStep1Form(DbControl dc, String nextAction) 47 { 48 super("importHitsWizardStep1Form"); 49 /* 50 * Hidden text field for storing plugin id to use. 51 */ 52 pluginIdF = new PluginIdField(); 53 pluginDef = PluginDefinition.getByClassName( 54 dc, 55 "org.proteios.plugins.GelSpotPlatePosToHitPlugin"); 56 pluginIdF.setValue(pluginDef.getId()); 57 /* 58 * This hidden text field sets title to be used for file selection 59 * form. 60 */ 61 titleF = new TitleField("Step 1a. Select Robot Result File[s]"); 62 63 /* 64 * This hidden text field sets name to be used for the "Next" button 65 * in the file selection form. 66 */ 67 buttonNameF = new NextButtonNameField(); 68 buttonNameF.setValue("Import"); 69 70 /* 71 * This hidden forward field sets action id used by the file 72 * selection action called by ImportHitsWizardStep1a. 73 */ 74 forwardF = new ForwardField(); 75 forwardF.setValue(nextAction); 76 77 properties = new Fieldset(); 78 properties.getLegendTitle().setTitle("ImportHitsWizardStep1FormLegend"); 79 addFieldset(properties); 80 properties.add(pluginIdF); 81 properties.add(titleF); 82 properties.add(buttonNameF); 83 properties.add(forwardF); 84 // Gel id (optional) 85 properties.add(new ExternalGelIdField(false)); 86 } 34 87 } -
trunk/client/servlet/src/org/proteios/gui/form/TitleField.java
r3823 r3839 43 43 setHidden(true); 44 44 } 45 46 public TitleField(String title) 47 { 48 this(); 49 setValue(title); 50 } 51 45 52 }
Note: See TracChangeset
for help on using the changeset viewer.