1 28 29 package org.objectweb.util.browser.plugins.fractal.panel; 30 31 import org.objectweb.fractal.api.Component; 32 import org.objectweb.fractal.api.control.SuperController; 33 import org.objectweb.util.browser.api.Table; 34 import org.objectweb.util.browser.api.TreeView; 35 import org.objectweb.util.browser.core.naming.DefaultEntry; 36 import org.objectweb.util.browser.core.naming.DefaultName; 37 import org.objectweb.util.browser.plugins.fractal.FcBrowser; 38 39 44 public class SuperComponentsTable 45 implements Table 46 { 47 53 59 65 68 protected SuperController provideSuperController(TreeView treeView){ 69 return (SuperController)treeView.getSelectedObject(); 70 } 71 72 78 82 public String [] getHeaders(TreeView treeView) { 83 return new String [] {"Components"}; 84 } 85 86 90 public Object [][] getRows(TreeView treeView) { 91 SuperController sc = provideSuperController(treeView); 92 Component[] components = sc.getFcSuperComponents(); 93 Object [][] values = new Object [components.length][1]; 94 for (int i = 0 ; i < components.length ; i++){ 95 values[i] = new Object [] {new DefaultEntry(components[i], 96 new DefaultName(FcBrowser.getName(components[i])))}; 97 } 98 return values; 99 } 100 } 101 | Popular Tags |