KickJava   Java API By Example, From Geeks To Geeks.

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


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 com.tc.admin.AdminClient;
7 import com.tc.admin.ConnectionContext;
8 import com.tc.admin.common.XTreeModel;
9 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     }
20     catch(Exception JavaDoc e) {
21       AdminClient.getContext().log(e);
22     }
23
24     XTreeNode rootNode = (XTreeNode)getRoot();
25
26     for(int i = 0; i < clients.length; i++) {
27       insertNodeInto(new ClientTreeNode(cc, clients[i]), rootNode, i);
28     }
29   }
30 }
31
Popular Tags