1 28 29 package org.objectweb.fractal.explorer.panel; 30 31 import org.objectweb.fractal.api.Component; 32 import org.objectweb.fractal.api.control.SuperController; 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 SuperComponentsTable 44 implements Table 45 { 46 52 58 64 67 protected SuperController provideSuperController(TreeView treeView){ 68 return (SuperController)treeView.getSelectedObject(); 69 } 70 71 77 81 public String [] getHeaders(TreeView treeView) { 82 return new String [] {"Components"}; 83 } 84 85 89 public Object [][] getRows(TreeView treeView) { 90 SuperController sc = provideSuperController(treeView); 91 Component[] components = sc.getFcSuperComponents(); 92 Object [][] values = new Object [components.length][1]; 93 for (int i = 0 ; i < components.length ; i++){ 94 values[i] = new Object [] {new DefaultEntry(FcExplorer.getName(components[i]), components[i])}; 95 } 96 return values; 97 } 98 } 99 | Popular Tags |