01: /*
02: * This file is part of the QuickServer library
03: * Copyright (C) 2003-2005 QuickServer.org
04: *
05: * Use, modification, copying and distribution of this software is subject to
06: * the terms and conditions of the GNU Lesser General Public License.
07: * You should have received a copy of the GNU LGP License along with this
08: * library; if not, you can download a copy from <http://www.quickserver.org/>.
09: *
10: * For questions, suggestions, bug-reports, enhancement-requests etc.
11: * visit http://www.quickserver.org
12: *
13: */
14:
15: package org.quickserver.net.qsadmin.gui;
16:
17: /**
18: * PluginPanel is a template class for plug-ins written for
19: * QuickServer Admin GUI - QSAdminGUI.
20: * <p>
21: * The plug-in class implementing this interface must also extend
22: * <code>javax.swing.JPanel</code>
23: * class. The plug-in class must be made into a jar and plugin.xml needs to be
24: * written that describing the plug-in to QSAdminGUI. A sample xml is below
25: * <br> <br><b><code>
26: <font color="#808080"> </font><font color="#000000"><qsadmin-plugin></font><br>
27:
28: <font color="#808080"> </font><font color="#ffffff"> </font><font color="#000000"><name>Stats</name></font><br>
29:
30: <font color="#808080"> </font><font color="#ffffff"> </font><font color="#000000"><desc>Server Status Panel</desc></font><br>
31:
32: <font color="#808080"> </font><font color="#ffffff"> </font><font color="#000000"><type>javax.swing.JPanel</type></font><br>
33:
34: <font color="#808080"> </font><font color="#ffffff"> </font><font color="#000000"><main-class</font><font color="#000000">>org.quickserver.net.qsadmin.plugin.stats.StatsPanel</main-class</font><font color="#000000">></font><br>
35:
36: <font color="#808080"> </font><font color="#ffffff"> </font><font color="#000000"><active>yes</active></font><br>
37:
38: <font color="#808080"> </font><font color="#000000"></qsadmin-plugin></font>
39: </code>
40: * </b><br> <br> Now both the jar and the plugin.xml file needs to be places in a
41: * directory by the name of the plug-in and placed in the plugin folder of
42: * QuickServer installation.
43: * </p>
44: * @see org.quickserver.util.xmlreader.QSAdminPluginConfig
45: * @author Akshathkumar Shetty
46: */
47: public interface PluginPanel {
48: /** This method is the first method called after plugin is instanced. */
49: public void setQSAdminMain(final QSAdminMain qsAdminMain);
50:
51: /** This method is called before it is added to QSAdminGUI. */
52: public void init();
53:
54: /** This method is called when connection status changes in QSAdminGUI. */
55: public void updateConnectionStatus(boolean connected);
56:
57: /** This method is called when the tab where plugin is loaded is activated */
58: public void activated();
59:
60: /** This method is called when the tab where plugin is loaded is deactivated */
61: public void deactivated();
62:
63: /** This method indicate if the plugin is in active or non-active state */
64: public boolean isActivated();
65: }
|