1 19 20 package org.netbeans.modules.openide.explorer; 21 22 import javax.swing.JComponent ; 23 import javax.swing.event.ChangeListener ; 24 import org.openide.util.Lookup; 25 26 37 public abstract class TabbedContainerBridge { 38 39 protected TabbedContainerBridge(){}; 40 41 public static TabbedContainerBridge getDefault() { 42 TabbedContainerBridge result = Lookup.getDefault().lookup (TabbedContainerBridge.class); 43 if (result == null) { 44 return new TrivialTabbedContainerBridgeImpl(); 46 } 47 return result; 48 } 49 50 public abstract JComponent createTabbedContainer(); 51 52 public abstract void setInnerComponent (JComponent container, JComponent inner); 53 54 public abstract JComponent getInnerComponent(JComponent jc); 55 56 public abstract Object [] getItems(JComponent jc); 57 58 public abstract void setItems (JComponent jc, Object [] objects, String [] titles); 59 60 public abstract void attachSelectionListener (JComponent jc, ChangeListener listener); 61 62 public abstract void detachSelectionListener (JComponent jc, ChangeListener listener); 63 64 public abstract Object getSelectedItem(JComponent jc); 65 66 public abstract void setSelectedItem (JComponent jc, Object selection); 67 68 public abstract boolean setSelectionByName(JComponent jc, String tabname); 69 70 public abstract String getCurrentSelectedTabName(JComponent jc); 71 72 } 73 | Popular Tags |