1 19 20 package org.netbeans.modules.java.navigation; 21 22 import javax.swing.JComponent ; 23 import org.netbeans.spi.navigator.NavigatorPanel; 24 import org.openide.util.Lookup; 25 import org.openide.util.NbBundle; 26 27 31 public class ClassMemberPanel implements NavigatorPanel { 32 33 private ClassMemberPanelUI component; 34 35 public ClassMemberPanel() { 36 } 37 38 public void panelActivated(Lookup context) { 39 assert context != null; 40 ClassMemberNavigatorJavaSourceFactory.getInstance().setLookup(context, getClassMemberPanelUI()); 42 getClassMemberPanelUI().showWaitNode(); 43 } 44 45 public void panelDeactivated() { 46 getClassMemberPanelUI().showWaitNode(); ClassMemberNavigatorJavaSourceFactory.getInstance().setLookup(Lookup.EMPTY, null); 48 } 49 50 public Lookup getLookup() { 51 return this.getClassMemberPanelUI().getLookup(); 52 } 53 54 public String getDisplayName() { 55 return NbBundle.getMessage(ClassMemberPanel.class,"LBL_members"); 56 } 57 58 public String getDisplayHint() { 59 return NbBundle.getMessage(ClassMemberPanel.class,"HINT_members"); 60 } 61 62 public JComponent getComponent() { 63 return getClassMemberPanelUI(); 64 } 65 66 private synchronized ClassMemberPanelUI getClassMemberPanelUI() { 67 if (this.component == null) { 68 this.component = new ClassMemberPanelUI(); 69 } 70 return this.component; 71 } 72 73 } 74 | Popular Tags |