01: /*
02: * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
03: */
04: package com.tc.admin.dso;
05:
06: import org.dijon.ContainerResource;
07:
08: import com.tc.admin.AdminClient;
09: 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
26: .getComponent("DSOClientPanel"));
27:
28: m_hostLabel = (XLabel) findComponent("HostLabel");
29: m_portLabel = (XLabel) findComponent("PortLabel");
30: m_channelIDLabel = (XLabel) findComponent("ChannelIDLabel");
31:
32: setClient(client);
33: }
34:
35: public void setClient(DSOClient client) {
36: m_client = client;
37:
38: setHost(client.getHost());
39: setPort(client.getPort());
40: setChannelID(client.getChannelID());
41: }
42:
43: public DSOClient getClient() {
44: return m_client;
45: }
46:
47: public void setHost(String host) {
48: m_hostLabel.setText(host);
49: }
50:
51: public void setPort(int port) {
52: m_portLabel.setText(port + "");
53: }
54:
55: public void setChannelID(String channelID) {
56: m_channelIDLabel.setText(channelID);
57: }
58: }
|