1 26 27 package org.objectweb.util.browser.core.panel; 28 29 import org.objectweb.util.browser.api.Entry; 30 import org.objectweb.util.browser.api.Panel; 31 import org.objectweb.util.browser.core.common.AssociatedElementImpl; 32 import org.objectweb.util.browser.core.api.AssociatedPanel; 33 import org.objectweb.util.browser.core.api.BrowserProperty; 34 import org.objectweb.util.browser.core.api.PanelFactory; 35 36 42 public class AssociatedPanelImpl 43 extends AssociatedElementImpl 44 implements AssociatedPanel { 45 46 51 public AssociatedPanelImpl(BrowserProperty loader) { 52 super(); 53 context_ = new PanelPropertyContainer(loader); 54 } 55 56 63 public Panel getPanel(Object node) { 64 return getPanel(node, false); 65 } 66 67 74 public Panel getPanel(Object node, boolean disabledJavaLangObject) { 75 if (context_ != null) { 76 Entry entry = context_.getRecursiveProperty(node); 77 if (entry != null && !(entry.getName().toString().equals("java.lang.Object") && disabledJavaLangObject)) { 78 PanelFactory panelFactory = (PanelFactory) entry.getValue(); 79 Panel nodeViewPanel = panelFactory.newPanel(node); 80 return nodeViewPanel; 81 } 82 } 83 return null; 84 } 85 } 86 | Popular Tags |