1 26 27 package org.objectweb.openccm.explorer.DCI; 28 29 import org.ist.coach.DCI.DCIManager; 30 import org.ist.coach.DCI.ExtHomeFinder; 31 import org.ist.coach.DCI.HomeInfo; 32 import org.objectweb.util.explorer.api.Table; 33 import org.objectweb.util.explorer.api.TreeView; 34 import org.objectweb.util.explorer.core.naming.lib.DefaultEntry; 35 36 43 public class DCIAvailableHomesTable 44 implements Table 45 { 46 47 53 59 65 71 74 public String [] getHeaders(TreeView treeView) { 75 return new String []{"Homes"}; 76 } 77 78 81 public Object [][] getRows(TreeView treeView) { 82 DCIManager DCIManager_ = (DCIManager)treeView.getSelectedObject(); 83 ExtHomeFinder homeFinder = DCIManager_.provide_home_finder(); 84 HomeInfo[] homes = homeFinder.get_all_homes(); 85 86 Object [][] contenu = new Object [homes.length][1]; 87 for (int i = 0; i < homes.length; i++) { 88 contenu[i][0] = new DefaultEntry(homes[i].uid, homes[i].home_ref); 89 } 90 91 return contenu; 92 } 93 } 94 | Popular Tags |