1 28 29 package org.objectweb.util.browser.plugins.fractal.context; 30 31 import java.util.List ; 32 import java.util.Vector ; 33 34 import org.objectweb.fractal.api.Component; 35 import org.objectweb.fractal.api.Interface; 36 import org.objectweb.fractal.api.control.ContentController; 37 import org.objectweb.util.browser.api.Entry; 38 import org.objectweb.util.browser.core.naming.AbstractContext; 39 import org.objectweb.util.browser.core.naming.DefaultEntry; 40 import org.objectweb.util.browser.core.naming.DefaultName; 41 import org.objectweb.util.browser.plugins.fractal.FcBrowser; 42 43 48 public class ContentControllerContext 49 extends AbstractContext 50 { 51 57 58 private ContentController cc_ = null; 59 60 66 72 78 82 public Entry[] getEntries() { 83 Object [] ir = cc_.getFcInternalInterfaces(); 84 Component[] ci = cc_.getFcSubComponents(); 85 List l = new Vector (); 86 int cpt = 0; 87 for (int i = 0; i < ir.length; i++) { 89 Interface itf = (Interface) ir[i]; 90 l.add(new DefaultEntry(InterfaceWrapperFactory.singleton.getWrapper(itf), 91 new DefaultName(FcBrowser.getName(itf)), 92 this)); 93 cpt = cpt + 1 ; 94 } 95 96 for (int i = 0 ; i < ci.length ; i++){ 98 l.add(new DefaultEntry(ci[i], 99 new DefaultName(FcBrowser.getName(ci[i])), 100 this)); 101 cpt = cpt + 1 ; 102 } 103 return (Entry[])l.toArray(new Entry[0]); 104 } 105 106 112 116 public void setWrapped(Object object) { 117 cc_ = (ContentController) object; 118 } 119 120 124 public Object getWrapped() { 125 return cc_; 126 } 127 } 128 | Popular Tags |