This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

View | Details | Raw Unified | Return to bug 168397
Collapse All | Expand All

(-)src/org/netbeans/core/multiview/TabsComponent.java (+19 lines)
Lines 55-60 Link Here
55
import org.netbeans.core.spi.multiview.MultiViewDescription;
55
import org.netbeans.core.spi.multiview.MultiViewDescription;
56
import org.netbeans.core.spi.multiview.MultiViewElement;
56
import org.netbeans.core.spi.multiview.MultiViewElement;
57
import org.openide.awt.Mnemonics;
57
import org.openide.awt.Mnemonics;
58
import org.openide.text.CloneableEditorSupport;
59
import org.openide.text.CloneableEditorSupport.Pane;
58
import org.openide.util.Lookup;
60
import org.openide.util.Lookup;
59
import org.openide.util.NbBundle;
61
import org.openide.util.NbBundle;
60
import org.openide.util.actions.CallbackSystemAction;
62
import org.openide.util.actions.CallbackSystemAction;
Lines 85-90 Link Here
85
    public TabsComponent(boolean toolVis) {
87
    public TabsComponent(boolean toolVis) {
86
        super();
88
        super();
87
        bar = new JToolBar();
89
        bar = new JToolBar();
90
91
        setFocusTraversalPolicyProvider(true);
92
        setFocusTraversalPolicy(new DefaultFocusTraversalPolicy() {
93
            @Override
94
            public Component getDefaultComponent(Container aContainer) {
95
                final MultiViewElement elem = model.getActiveElement();
96
                final JComponent vr = elem.getVisualRepresentation();
97
                if (vr instanceof CloneableEditorSupport.Pane) {
98
                   Pane pane = (Pane)vr;
99
                   if (pane.getEditorPane().isShowing()) {
100
                     return pane.getEditorPane();
101
                  }
102
               }
103
               return super.getDefaultComponent(aContainer);
104
            }
105
        });
106
88
        Border b = (Border)UIManager.get("Nb.Editor.Toolbar.border"); //NOI18N
107
        Border b = (Border)UIManager.get("Nb.Editor.Toolbar.border"); //NOI18N
89
        bar.setBorder(b);
108
        bar.setBorder(b);
90
        bar.setFloatable(false);
109
        bar.setFloatable(false);

Return to bug 168397