KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > DiningPhilosophers > explorer > StatusInfoConsumerImpl


1 /*====================================================================
2
3 OpenCCM: The Open CORBA Component Model Platform
4 Copyright (C) 2000-2004 INRIA - USTL - LIFL - GOAL
5 Contact: openccm@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): Jerome Moroy.
23 Contributor(s): ___________________________________.
24
25 ====================================================================*/

26
27 package DiningPhilosophers.explorer;
28
29 import DiningPhilosophers.*;
30 import org.omg.Components.EventBase;
31 import org.omg.Components.BadEventType;
32
33 /**
34  * This is an implementation of the OMG IDL
35  * DiningPhilosophers::StatusInfoConsumer component type.
36  *
37  * @author <a HREF="mailto:Jerome.Moroy@lifl.fr">Jerome Moroy</a>
38  *
39  * @version 0.1
40  *
41  */

42 public class StatusInfoConsumerImpl
43      extends StatusInfoConsumerPOA
44 {
45     // ==================================================================
46
//
47
// Internal state.
48
//
49
// ==================================================================
50

51     /** The panel to refresh. */
52     protected DiningPhilosophers.cif.PhilosopherPanel panel_ = null;
53
54     // ==================================================================
55
//
56
// Constructor.
57
//
58
// ==================================================================
59

60     /**
61      * Default constructor.
62      * @param panel The panel to refresh.
63      */

64     public StatusInfoConsumerImpl(DiningPhilosophers.cif.PhilosopherPanel panel){
65         panel_ = panel;
66     }
67
68     // ==================================================================
69
//
70
// Methods for OMG IDL org::omg::Components::EventConsumerBase
71
//
72
// ==================================================================
73

74     //
75
// IDL:omg.org/Components/EventConsumerBase/push_event:1.0
76
//
77
/**
78      * This method does nothing.
79      */

80     public void
81     push_event(EventBase evt)
82     throws BadEventType
83     {
84         // Nothing to do
85
}
86         
87     // ==================================================================
88
//
89
// Methods for OMG IDL DiningPhilosophers::StatusInfoConsumer
90
//
91
// ==================================================================
92

93     //
94
// IDL:DiningPhilosophers/StatusInfoConsumer/push_StatusInfo:1.0
95
//
96
/**
97      * Update the panel according to the given StatusInfo.
98      */

99     public void
100     push_StatusInfo(StatusInfo the_statusinfo)
101     {
102         if(panel_!=null)
103             panel_.updatePanel(the_statusinfo);
104     }
105
106 }
Popular Tags