1 28 29 package org.objectweb.fractal.explorer.panel; 30 31 import org.objectweb.fractal.api.Component; 32 import org.objectweb.fractal.api.control.ContentController; 33 import org.objectweb.fractal.explorer.FcExplorer; 34 import org.objectweb.util.explorer.api.Table; 35 import org.objectweb.util.explorer.api.TreeView; 36 import org.objectweb.util.explorer.core.naming.lib.DefaultEntry; 37 38 43 public class InternalComponentsTable 44 implements Table 45 { 46 52 58 64 65 68 protected ContentController provideContentController(TreeView treeView){ 69 return (ContentController)treeView.getSelectedObject(); 70 } 71 72 78 81 public String [] getHeaders(TreeView treeView) { 82 return new String [] {"Components"}; 83 } 84 85 88 public Object [][] getRows(TreeView treeView) { 89 ContentController cc = provideContentController(treeView); 90 Component[] components = cc.getFcSubComponents(); 91 Object [][] values = new Object [components.length][1]; 92 for (int i = 0 ; i < components.length ; i++){ 93 values[i] = new Object []{ new DefaultEntry(FcExplorer.getName(components[i]), components[i])}; 94 } 95 return values; 96 } 97 } 98 | Popular Tags |