# This patch file was generated by NetBeans IDE # Following Index: paths are relative to: /home/hmichel/projetos/netbeans/main/core.multiview # This patch can be applied using context Tools: Patch action on respective folder. # It uses platform neutral UTF-8 encoding and \n newlines. # Above lines and this line are ignored by the patching process. Index: src/org/netbeans/core/multiview/TabsComponent.java --- src/org/netbeans/core/multiview/TabsComponent.java Base (BASE) +++ src/org/netbeans/core/multiview/TabsComponent.java Locally Modified (Based On LOCAL) @@ -55,6 +55,8 @@ import org.netbeans.core.spi.multiview.MultiViewDescription; import org.netbeans.core.spi.multiview.MultiViewElement; import org.openide.awt.Mnemonics; +import org.openide.text.CloneableEditorSupport; +import org.openide.text.CloneableEditorSupport.Pane; import org.openide.util.Lookup; import org.openide.util.NbBundle; import org.openide.util.actions.CallbackSystemAction; @@ -85,6 +87,23 @@ public TabsComponent(boolean toolVis) { super(); bar = new JToolBar(); + + setFocusTraversalPolicyProvider(true); + setFocusTraversalPolicy(new DefaultFocusTraversalPolicy() { + @Override + public Component getDefaultComponent(Container aContainer) { + final MultiViewElement elem = model.getActiveElement(); + final JComponent vr = elem.getVisualRepresentation(); + if (vr instanceof CloneableEditorSupport.Pane) { + Pane pane = (Pane)vr; + if (pane.getEditorPane().isShowing()) { + return pane.getEditorPane(); + } + } + return super.getDefaultComponent(aContainer); + } + }); + Border b = (Border)UIManager.get("Nb.Editor.Toolbar.border"); //NOI18N bar.setBorder(b); bar.setFloatable(false);