View Javadoc

1   /*
2    *  soapUI, copyright (C) 2004-2009 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.soapui.ui.desktop;
14  
15  import javax.swing.Icon;
16  import javax.swing.JComponent;
17  
18  import com.eviware.soapui.model.ModelItem;
19  import com.eviware.soapui.support.PropertyChangeNotifier;
20  
21  /***
22   * Behaviour for a SoapUI desktop panel
23   * 
24   * @author Ole.Matzura
25   */
26  
27  public interface DesktopPanel extends PropertyChangeNotifier
28  {
29  	public final static String TITLE_PROPERTY = DesktopPanel.class.getName() + "@title";
30  	public final static String ICON_PROPERTY = DesktopPanel.class.getName() + "@icon";
31  
32  	/***
33  	 * Gets the title for this desktop panel
34  	 */
35  
36  	public String getTitle();
37  
38  	/***
39  	 * Gets the description for this desktop panel.. may be used as tooltip,
40  	 * etc..
41  	 * 
42  	 * @return
43  	 */
44  
45  	public String getDescription();
46  
47  	/***
48  	 * Gets the model item associated with this desktop panel
49  	 */
50  
51  	public ModelItem getModelItem();
52  
53  	/***
54  	 * Called when a desktop panel is about to be closed, may be overriden
55  	 * (depending on situation) by returning false if canCancel is set to true.
56  	 */
57  
58  	public boolean onClose( boolean canCancel );
59  
60  	/***
61  	 * Gets the component used to display this desktop panel
62  	 */
63  
64  	public JComponent getComponent();
65  
66  	/***
67  	 * Checks if this desktop panel depends on the existence of the specified
68  	 * model item, used for closing relevant panels.
69  	 * 
70  	 * @param modelItem
71  	 */
72  
73  	public boolean dependsOn( ModelItem modelItem );
74  
75  	/***
76  	 * Returns the icon for this panel
77  	 */
78  
79  	public Icon getIcon();
80  }