1
2
3
4
5
6
7
8
9
10
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, etc..
40 * @return
41 */
42
43 public String getDescription();
44
45 /***
46 * Gets the model item associated with this desktop panel
47 */
48
49 public ModelItem getModelItem();
50
51 /***
52 * Called when a desktop panel is about to be closed, may be overriden (depending on situation) by returning
53 * false if canCancel is set to true.
54 */
55
56 public boolean onClose( boolean canCancel );
57
58 /***
59 * Gets the component used to display this desktop panel
60 */
61
62 public JComponent getComponent();
63
64 /***
65 * Checks if this desktop panel depends on the existence of the specified model item, used
66 * for closing relevant panels.
67 *
68 * @param modelItem
69 */
70
71 public boolean dependsOn( ModelItem modelItem );
72
73 /***
74 * Returns the icon for this panel
75 */
76
77 public Icon getIcon();
78 }