KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > openccm > explorer > DCI > NodeManagerPanel


1 /*===========================================================================
2
3 ObjectWeb Naming Context Framework
4 Copyright (C) 2002 USTL - LIFL - GOAL
5 Contact: architecture@objectweb.org
6
7 This library is free software; you can redistribute it and/or
8 modify it under the terms of the GNU Lesser General Public
9 License as published by the Free Software Foundation; either
10 version 2.1 of the License, or any later version.
11
12 This library is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 Lesser General Public License for more details.
16
17 You should have received a copy of the GNU Lesser General Public
18 License along with this library; if not, write to the Free Software
19 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
20 USA
21
22 Initial developer(s): Briclet Frederic.
23 Contributor(s): ______________________________________.
24
25 ===========================================================================*/

26
27
28 package org.objectweb.openccm.explorer.DCI;
29
30 import java.awt.Color JavaDoc;
31
32 import javax.swing.JPanel JavaDoc;
33
34 import org.objectweb.util.explorer.api.Panel;
35 import org.objectweb.util.explorer.api.TreeView;
36
37 /**
38  * NodeManagerModel panel
39  *
40  * @author <a HREF="mailto:Frederic.Briclet@lifl.fr">Frederic Briclet</a>
41  * @version 0.1
42  */

43 public class NodeManagerPanel
44     implements Panel JavaDoc {
45
46     private JPanel JavaDoc panel_;
47
48     public NodeManagerPanel(){
49         panel_ = new JPanel JavaDoc();
50         panel_.setBackground(Color.white);
51     }
52
53     /* (non-Javadoc)
54      * @see org.objectweb.util.explorer.api.Panel#selected(org.objectweb.util.explorer.api.TreeView)
55      */

56     public void selected(TreeView treeView) {
57         org.objectweb.openccm.OpenCCM_DCI.NodeManager
58             node=(org.objectweb.openccm.OpenCCM_DCI.NodeManager)
59             treeView.getSelectedObject();
60         org.ist.coach.DCI.DCIDescriptor[] desc=
61             node.provide_node_information().get_node_properties();
62
63         panel_.add(new javax.swing.JTextArea JavaDoc(desc[0].descriptor));
64     }
65
66     /* (non-Javadoc)
67      * @see org.objectweb.util.explorer.api.Panel#getPanel()
68      */

69     public Object JavaDoc getPanel() {
70         return panel_;
71     }
72
73     /* (non-Javadoc)
74      * @see org.objectweb.util.explorer.api.Panel#unselected(org.objectweb.util.explorer.api.TreeView)
75      */

76     public void unselected(TreeView treeView) {
77         // Nothing to do !
78
}
79
80
81 }
82
Popular Tags