Lines 45-50
Link Here
|
45 |
package org.netbeans.modules.openide.windows; |
45 |
package org.netbeans.modules.openide.windows; |
46 |
|
46 |
|
47 |
import java.awt.EventQueue; |
47 |
import java.awt.EventQueue; |
|
|
48 |
import java.awt.KeyboardFocusManager; |
48 |
import javax.swing.ActionMap; |
49 |
import javax.swing.ActionMap; |
49 |
import org.openide.util.Lookup; |
50 |
import org.openide.util.Lookup; |
50 |
import org.openide.util.ContextGlobalProvider; |
51 |
import org.openide.util.ContextGlobalProvider; |
Lines 69-74
Link Here
|
69 |
|
70 |
|
70 |
public GlobalActionContextImpl (TopComponent.Registry r) { |
71 |
public GlobalActionContextImpl (TopComponent.Registry r) { |
71 |
this.registry = r; |
72 |
this.registry = r; |
|
|
73 |
KeyboardFocusManager.getCurrentKeyboardFocusManager().addPropertyChangeListener(this); |
72 |
} |
74 |
} |
73 |
|
75 |
|
74 |
/** the lookup to temporarily use */ |
76 |
/** the lookup to temporarily use */ |
Lines 94-100
Link Here
|
94 |
GlobalActionContextImpl g = (GlobalActionContextImpl)obj; |
96 |
GlobalActionContextImpl g = (GlobalActionContextImpl)obj; |
95 |
|
97 |
|
96 |
Lookup[] arr = { |
98 |
Lookup[] arr = { |
97 |
Lookups.singleton (map), |
99 |
map == null ? Lookup.EMPTY : Lookups.singleton (map), |
98 |
Lookups.exclude (g.getLookup (), new Class[] { javax.swing.ActionMap.class }), |
100 |
Lookups.exclude (g.getLookup (), new Class[] { javax.swing.ActionMap.class }), |
99 |
}; |
101 |
}; |
100 |
|
102 |
|
Lines 136-141
Link Here
|
136 |
if (TopComponent.Registry.PROP_ACTIVATED.equals (evt.getPropertyName())) { |
138 |
if (TopComponent.Registry.PROP_ACTIVATED.equals (evt.getPropertyName())) { |
137 |
org.openide.util.Utilities.actionsGlobalContext ().lookup (javax.swing.ActionMap.class); |
139 |
org.openide.util.Utilities.actionsGlobalContext ().lookup (javax.swing.ActionMap.class); |
138 |
} |
140 |
} |
|
|
141 |
if ("permanentFocusOwner".equals(evt.getPropertyName())) { // NOI18N |
142 |
blickActionMap(null); |
143 |
} |
139 |
} |
144 |
} |
140 |
|
145 |
|
141 |
} |
146 |
} |