1 4 package com.tc.admin.dso; 5 6 import com.tc.admin.ConnectionContext; 7 import com.tc.admin.common.XTreeModel; 8 import com.tc.admin.common.XTreeNode; 9 10 import com.tc.objectserver.lockmanager.api.LockMBean; 11 12 public class LockTreeModel extends XTreeModel { 13 private ConnectionContext m_cc; 14 15 public LockTreeModel(ConnectionContext cc) { 16 super(); 17 m_cc = cc; 18 } 19 20 public void setLocks(LockMBean[] locks) { 21 XTreeNode rootNode = (XTreeNode)getRoot(); 22 23 rootNode.tearDownChildren(); 24 25 for(int i = 0; i < locks.length; i++) { 26 insertNodeInto(new LockTreeNode(m_cc, locks[i]), rootNode, i); 27 } 28 29 nodeStructureChanged(rootNode); 30 } 31 } 32 | Popular Tags |