View Javadoc

1   /*
2    *  soapUI, copyright (C) 2006 eviware.com 
3    *
4    *  soapUI is free software; you can redistribute it and/or modify it under the 
5    *  terms of the GNU Lesser General Public License as published by the Free Software Foundation; 
6    *  either version 2.1 of the License, or (at your option) any later version.
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.soapui.impl.wsdl.panels.request.components;
14  
15  import com.eviware.soapui.impl.wsdl.panels.request.components.editor.XmlDocument;
16  import com.eviware.soapui.impl.wsdl.panels.request.components.editor.XmlEditor;
17  import com.eviware.soapui.impl.wsdl.panels.request.components.editor.views.source.XmlSourceEditorFactory;
18  import com.eviware.soapui.impl.wsdl.panels.request.components.editor.views.source.XmlSourceEditorView;
19  import com.eviware.soapui.model.ModelItem;
20  
21  public abstract class SoapMessageXmlEditor<T extends ModelItem> extends XmlEditor
22  {
23  	private final T modelItem;
24  
25  	public SoapMessageXmlEditor( XmlDocument xmlDocument, T modelItem  )
26  	{
27  		super( xmlDocument );
28  		this.modelItem = modelItem;
29  	}
30  	
31  	/*
32  	protected XmlOutlineEditorView buildOutlineEditor()
33  	{
34  		return new XmlOutlineEditorView()
35  		{
36  			protected void buildUI()
37  			{
38  				super.buildUI();
39  				
40  				getOutlineTable().addMouseListener( new MouseAdapter() 
41  				{
42  					public void mouseClicked(MouseEvent e)
43  					{
44  						if( e.getClickCount() > 1 && getOutlineTable().getSelectedColumn() == 0 )
45  						{
46  							selectView( 0 );
47  						}
48  					}} );
49  			}
50  		};
51  	}*/
52  
53  	public T getModelItem()
54  	{
55  		return modelItem;
56  	}
57  
58  	public final XmlSourceEditorView getSourceEditor()
59  	{
60  		return ( XmlSourceEditorView ) getView( XmlSourceEditorFactory.VIEW_ID );
61  	}
62  }