KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > tc > admin > dso > ClientPanel


1 /*
2  * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
3  */

4 package com.tc.admin.dso;
5
6 import org.dijon.ContainerResource;
7
8 import com.tc.admin.AdminClient;
9 import com.tc.admin.AdminClientContext;
10
11 import com.tc.admin.common.XContainer;
12 import com.tc.admin.common.XLabel;
13
14 public class ClientPanel extends XContainer {
15   private DSOClient m_client;
16   private XLabel m_hostLabel;
17   private XLabel m_portLabel;
18   private XLabel m_channelIDLabel;
19
20   public ClientPanel(DSOClient client) {
21     super();
22
23     AdminClientContext acc = AdminClient.getContext();
24
25     load((ContainerResource)acc.topRes.getComponent("DSOClientPanel"));
26
27     m_hostLabel = (XLabel)findComponent("HostLabel");
28     m_portLabel = (XLabel)findComponent("PortLabel");
29     m_channelIDLabel = (XLabel)findComponent("ChannelIDLabel");
30
31     setClient(client);
32   }
33
34   public void setClient(DSOClient client) {
35     m_client = client;
36
37     setHost(client.getHost());
38     setPort(client.getPort());
39     setChannelID(client.getChannelID());
40   }
41
42   public DSOClient getClient() {
43     return m_client;
44   }
45
46   public void setHost(String JavaDoc host) {
47     m_hostLabel.setText(host);
48   }
49
50   public void setPort(int port) {
51     m_portLabel.setText(port+"");
52   }
53
54   public void setChannelID(String JavaDoc channelID) {
55     m_channelIDLabel.setText(channelID);
56   }
57 }
58
Popular Tags