KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > quickserver > net > qsadmin > gui > PluginPanel


1 /*
2  * This file is part of the QuickServer library
3  * Copyright (C) 2003-2005 QuickServer.org
4  *
5  * Use, modification, copying and distribution of this software is subject to
6  * the terms and conditions of the GNU Lesser General Public License.
7  * You should have received a copy of the GNU LGP License along with this
8  * library; if not, you can download a copy from <http://www.quickserver.org/>.
9  *
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>&nbsp;<br><b><code>
26 <font color="#808080">&nbsp;</font><font color="#000000">&lt;qsadmin-plugin&gt;</font><br>
27
28 <font color="#808080">&nbsp;</font><font color="#ffffff">&nbsp;&nbsp;</font><font color="#000000">&lt;name&gt;Stats&lt;/name&gt;</font><br>
29
30 <font color="#808080">&nbsp;</font><font color="#ffffff">&nbsp;&nbsp;</font><font color="#000000">&lt;desc&gt;Server&nbsp;Status&nbsp;Panel&lt;/desc&gt;</font><br>
31
32 <font color="#808080">&nbsp;</font><font color="#ffffff">&nbsp;&nbsp;</font><font color="#000000">&lt;type&gt;javax.swing.JPanel&lt;/type&gt;</font><br>
33
34 <font color="#808080">&nbsp;</font><font color="#ffffff">&nbsp;&nbsp;</font><font color="#000000">&lt;main-class</font><font color="#000000">&gt;org.quickserver.net.qsadmin.plugin.stats.StatsPanel&lt;/main-class</font><font color="#000000">&gt;</font><br>
35
36 <font color="#808080">&nbsp;</font><font color="#ffffff">&nbsp;&nbsp;</font><font color="#000000">&lt;active&gt;yes&lt;/active&gt;</font><br>
37
38 <font color="#808080">&nbsp;</font><font color="#000000">&lt;/qsadmin-plugin&gt;</font>
39 </code>
40  * </b><br>&nbsp;<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     /** This method is called before it is added to QSAdminGUI. */
51     public void init();
52
53     /** This method is called when connection status changes in QSAdminGUI. */
54     public void updateConnectionStatus(boolean connected);
55
56     /** This method is called when the tab where plugin is loaded is activated */
57     public void activated();
58
59     /** This method is called when the tab where plugin is loaded is deactivated */
60     public void deactivated();
61
62     /** This method indicate if the plugin is in active or non-active state */
63     public boolean isActivated();
64 }
65
Popular Tags