01: /*
02: * soapUI, copyright (C) 2004-2007 eviware.com
03: *
04: * soapUI is free software; you can redistribute it and/or modify it under the
05: * terms of version 2.1 of the GNU Lesser General Public License as published by
06: * the Free Software Foundation.
07: *
08: * soapUI is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
09: * 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: public final static String TITLE_PROPERTY = DesktopPanel.class
29: .getName()
30: + "@title";
31: public final static String ICON_PROPERTY = DesktopPanel.class
32: .getName()
33: + "@icon";
34:
35: /**
36: * Gets the title for this desktop panel
37: */
38:
39: public String getTitle();
40:
41: /**
42: * Gets the description for this desktop panel.. may be used as tooltip, etc..
43: * @return
44: */
45:
46: public String getDescription();
47:
48: /**
49: * Gets the model item associated with this desktop panel
50: */
51:
52: public ModelItem getModelItem();
53:
54: /**
55: * Called when a desktop panel is about to be closed, may be overriden (depending on situation) by returning
56: * false if canCancel is set to true.
57: */
58:
59: public boolean onClose(boolean canCancel);
60:
61: /**
62: * Gets the component used to display this desktop panel
63: */
64:
65: public JComponent getComponent();
66:
67: /**
68: * Checks if this desktop panel depends on the existence of the specified model item, used
69: * for closing relevant panels.
70: *
71: * @param modelItem
72: */
73:
74: public boolean dependsOn(ModelItem modelItem);
75:
76: /**
77: * Returns the icon for this panel
78: */
79:
80: public Icon getIcon();
81: }
|