1 19 20 package org.netbeans.modules.retouche.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 36 public class ClassMemberPanel implements NavigatorPanel { 37 38 private ClassMemberPanelUI component; 39 40 public ClassMemberPanel() { 41 } 42 43 public void panelActivated(Lookup context) { 44 assert context != null; 45 ClassMemberNavigatorSourceFactory.getInstance().setLookup(context, getClassMemberPanelUI()); 47 getClassMemberPanelUI().showWaitNode(); 48 } 49 50 public void panelDeactivated() { 51 getClassMemberPanelUI().showWaitNode(); ClassMemberNavigatorSourceFactory.getInstance().setLookup(Lookup.EMPTY, null); 53 } 54 55 public Lookup getLookup() { 56 return this.getClassMemberPanelUI().getLookup(); 57 } 58 59 public String getDisplayName() { 60 return NbBundle.getMessage(ClassMemberPanel.class,"LBL_members"); 61 } 62 63 public String getDisplayHint() { 64 return NbBundle.getMessage(ClassMemberPanel.class,"HINT_members"); 65 } 66 67 public JComponent getComponent() { 68 return getClassMemberPanelUI(); 69 } 70 71 private synchronized ClassMemberPanelUI getClassMemberPanelUI() { 72 if (this.component == null) { 73 this.component = new ClassMemberPanelUI(); 74 } 75 return this.component; 76 } 77 78 } 79 | Popular Tags |