Link Here
|
24 |
import javax.swing.PopupFactory; |
24 |
import javax.swing.PopupFactory; |
25 |
import javax.swing.SwingUtilities; |
25 |
import javax.swing.SwingUtilities; |
26 |
import javax.swing.Timer; |
26 |
import javax.swing.Timer; |
|
|
27 |
import org.netbeans.core.IDESettings; |
27 |
import org.netbeans.core.windows.actions.RecentViewListAction; |
28 |
import org.netbeans.core.windows.actions.RecentViewListAction; |
28 |
import org.netbeans.swing.popupswitcher.SwitcherTable; |
29 |
import org.netbeans.swing.popupswitcher.SwitcherTable; |
29 |
import org.netbeans.swing.popupswitcher.SwitcherTableItem; |
30 |
import org.netbeans.swing.popupswitcher.SwitcherTableItem; |
30 |
import org.openide.awt.StatusDisplayer; |
31 |
import org.openide.awt.StatusDisplayer; |
|
|
32 |
import org.openide.util.SharedClassObject; |
31 |
import org.openide.util.Utilities; |
33 |
import org.openide.util.Utilities; |
32 |
import org.openide.windows.WindowManager; |
34 |
import org.openide.windows.WindowManager; |
33 |
|
35 |
|
Link Here
|
93 |
/** Indicates whether an item to be selected is previous or next one. */ |
95 |
/** Indicates whether an item to be selected is previous or next one. */ |
94 |
private boolean fwd = true; |
96 |
private boolean fwd = true; |
95 |
|
97 |
|
|
|
98 |
/** Used to retrieve state about UI Mode */ |
99 |
private static IDESettings settings = |
100 |
(IDESettings) SharedClassObject.findObject (IDESettings.class, true); |
101 |
|
96 |
/** |
102 |
/** |
97 |
* Tries to process given <code>KeyEvent</code> and returns true is event |
103 |
* Tries to process given <code>KeyEvent</code> and returns true is event |
98 |
* was successfully processed/consumed. |
104 |
* was successfully processed/consumed. |
99 |
*/ |
105 |
*/ |
100 |
public static boolean processShortcut(KeyEvent kev) { |
106 |
public static boolean processShortcut(KeyEvent kev) { |
|
|
107 |
// don't perform in MDI only when main window is not focused |
108 |
if (settings.getUIMode() == 2 && |
109 |
!WindowManager.getDefault().getMainWindow().isFocused()) { |
110 |
return false; |
111 |
} |
101 |
boolean isCtrlTab = kev.getKeyCode() == KeyEvent.VK_TAB && |
112 |
boolean isCtrlTab = kev.getKeyCode() == KeyEvent.VK_TAB && |
102 |
kev.getModifiers() == InputEvent.CTRL_MASK; |
113 |
kev.getModifiers() == InputEvent.CTRL_MASK; |
103 |
boolean isCtrlShiftTab = kev.getKeyCode() == KeyEvent.VK_TAB && |
114 |
boolean isCtrlShiftTab = kev.getKeyCode() == KeyEvent.VK_TAB && |