1 28 29 package org.objectweb.fractal.explorer.panel; 30 31 import org.objectweb.fractal.api.Interface; 32 import org.objectweb.fractal.api.type.InterfaceType; 33 import org.objectweb.fractal.explorer.context.ControllerContainer; 34 import org.objectweb.fractal.explorer.lib.SignatureWrapper; 35 import org.objectweb.util.explorer.api.Entry; 36 import org.objectweb.util.explorer.api.Table; 37 import org.objectweb.util.explorer.api.TreeView; 38 import org.objectweb.util.explorer.core.naming.lib.DefaultEntry; 39 40 45 public class ControllerContainerTable 46 implements Table 47 { 48 49 55 61 67 70 protected Object [] getValues(Entry entry){ 71 Interface itf = null; 72 75 if (Interface.class.isAssignableFrom(entry.getValue().getClass())) 76 itf = (Interface)entry.getValue(); 77 Object [] values = new Object [2]; 78 String signature = ""; 79 if(itf!=null) 80 signature = ((InterfaceType)itf.getFcItfType()).getFcItfSignature(); 81 values[0] = entry; 82 values[1] = new DefaultEntry(signature, new SignatureWrapper(signature)); 83 return values; 84 } 85 86 92 95 public String [] getHeaders(TreeView treeView) { 96 return new String [] {"Controller","Signature"}; 97 } 98 99 102 public Object [][] getRows(TreeView treeView) { 103 ControllerContainer cc = (ControllerContainer)treeView.getSelectedObject(); 104 Entry[] entries = cc.getEntries(null); 105 Object [][] values = new Object [entries.length][2]; 106 for (int i = 0 ; i < entries.length ; i++) { 107 values[i] = getValues(entries[i]); 108 } 109 return values; 110 } 111 } 112 | Popular Tags |