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 com.tc.admin.AdminClient;
07: import com.tc.admin.ConnectionContext;
08: import com.tc.admin.common.XTreeModel;
09: import com.tc.admin.common.XTreeNode;
10:
11: public class ClientTreeModel extends XTreeModel {
12: private DSOClient[] clients;
13:
14: public ClientTreeModel(ConnectionContext cc) {
15: super ();
16:
17: try {
18: clients = ClientsHelper.getHelper().getClients(cc);
19: } catch (Exception e) {
20: AdminClient.getContext().log(e);
21: }
22:
23: XTreeNode rootNode = (XTreeNode) getRoot();
24:
25: for (int i = 0; i < clients.length; i++) {
26: insertNodeInto(new ClientTreeNode(cc, clients[i]),
27: rootNode, i);
28: }
29: }
30: }
|