View Javadoc

1   /*
2    *  soapUI, copyright (C) 2004-2007 eviware.com 
3    *
4    *  soapUI is free software; you can redistribute it and/or modify it under the 
5    *  terms of version 2.1 of the GNU Lesser General Public License as published by 
6    *  the Free Software Foundation.
7    *
8    *  soapUI is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without 
9    *  even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
10   *  See the GNU Lesser General Public License for more details at gnu.org.
11   */
12  
13  package com.eviware.x.form;
14  
15  import com.eviware.soapui.model.iface.Interface;
16  import com.eviware.soapui.support.action.SoapUIAction;
17  import com.eviware.soapui.support.types.StringToStringMap;
18  
19  public interface XForm
20  {
21  	public enum FieldType { TEXT, FOLDER, FILE, URL, JAVA_PACKAGE, JAVA_CLASS, PASSWORD, PROJECT_FILE, PROJECT_FOLDER, TEXTAREA }
22  
23  	public XFormTextField addTextField(String name, String description, FieldType type );
24  
25  	public XFormField addCheckBox(String name, String description);
26  
27  	public XFormComboBox addComboBox(String name, Object[] values, String description);
28  	
29     /***
30      * Create a combo box and a button that calls action with target as parameter.
31      */
32     public <T> XFormComboBox addComboBox( String name, Object [] values, String description, 
33           T target, SoapUIAction<T> action );
34  
35  	public void setOptions( String name, Object [] values );
36  
37  	public void addSeparator(String label);
38  
39  	public XFormField addComponent( String name, XFormField component );
40  	
41  	public StringToStringMap getValues();
42  	
43  	public void setValues( StringToStringMap values );
44     
45     public String getComponentValue( String name );
46  	
47  	public XFormField getComponent( String name );
48  	
49  	public enum ToolkitType { SWING, SWT }
50  
51  	public String getName();
52  
53     public void setName(String name);
54  
55     public void addNameSpaceTable(String label, Interface modelItem);
56  
57  	public void addLabel( String name, String label );
58  	
59  	public XFormField [] getFormFields();
60  
61  	public void setFormFieldProperty( String name, Object value );
62  	
63  	public void addSeparator();
64  
65  	public String[] getOptions( String name );
66  
67  	public XFormField getFormField( String name );
68  }