Java Code Examples for javax.swing.SwingUtilities#processKeyBindings()
The following examples show how to use
javax.swing.SwingUtilities#processKeyBindings() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: LWComponentPeer.java From dragonwell8_jdk with GNU General Public License v2.0 | 6 votes |
protected void sendEventToDelegate(final AWTEvent e) { if (getDelegate() == null || !isShowing() || !isEnabled()) { return; } synchronized (getDelegateLock()) { AWTEvent delegateEvent = createDelegateEvent(e); if (delegateEvent != null) { AWTAccessor.getComponentAccessor() .processEvent((Component) delegateEvent.getSource(), delegateEvent); if (delegateEvent instanceof KeyEvent) { KeyEvent ke = (KeyEvent) delegateEvent; SwingUtilities.processKeyBindings(ke); } } } }
Example 2
Source File: LWComponentPeer.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
protected void sendEventToDelegate(final AWTEvent e) { if (getDelegate() == null || !isShowing() || !isEnabled()) { return; } synchronized (getDelegateLock()) { AWTEvent delegateEvent = createDelegateEvent(e); if (delegateEvent != null) { AWTAccessor.getComponentAccessor() .processEvent((Component) delegateEvent.getSource(), delegateEvent); if (delegateEvent instanceof KeyEvent) { KeyEvent ke = (KeyEvent) delegateEvent; SwingUtilities.processKeyBindings(ke); } } } }
Example 3
Source File: LWComponentPeer.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
protected void sendEventToDelegate(final AWTEvent e) { if (getDelegate() == null || !isShowing() || !isEnabled()) { return; } synchronized (getDelegateLock()) { AWTEvent delegateEvent = createDelegateEvent(e); if (delegateEvent != null) { AWTAccessor.getComponentAccessor() .processEvent((Component) delegateEvent.getSource(), delegateEvent); if (delegateEvent instanceof KeyEvent) { KeyEvent ke = (KeyEvent) delegateEvent; SwingUtilities.processKeyBindings(ke); } } } }
Example 4
Source File: LWComponentPeer.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
protected void sendEventToDelegate(final AWTEvent e) { if (getDelegate() == null || !isShowing() || !isEnabled()) { return; } synchronized (getDelegateLock()) { AWTEvent delegateEvent = createDelegateEvent(e); if (delegateEvent != null) { AWTAccessor.getComponentAccessor() .processEvent((Component) delegateEvent.getSource(), delegateEvent); if (delegateEvent instanceof KeyEvent) { KeyEvent ke = (KeyEvent) delegateEvent; SwingUtilities.processKeyBindings(ke); } } } }
Example 5
Source File: CodeTemplatesTest.java From netbeans with Apache License 2.0 | 6 votes |
@RandomlyFails public void testMemoryRelease() throws Exception { // Issue #147984 org.netbeans.junit.Log.enableInstances(Logger.getLogger("TIMER"), "CodeTemplateInsertHandler", Level.FINEST); JEditorPane pane = new JEditorPane(); NbEditorKit kit = new NbEditorKit(); pane.setEditorKit(kit); Document doc = pane.getDocument(); assertTrue(doc instanceof BaseDocument); CodeTemplateManager mgr = CodeTemplateManager.get(doc); String templateText = "Test with parm "; CodeTemplate ct = mgr.createTemporary(templateText + " ${a}"); ct.insert(pane); assertEquals(templateText + " a", doc.getText(0, doc.getLength())); // Send Enter to stop editing KeyEvent enterKeyEvent = new KeyEvent(pane, KeyEvent.KEY_PRESSED, EventQueue.getMostRecentEventTime(), 0, KeyEvent.VK_ENTER, KeyEvent.CHAR_UNDEFINED); SwingUtilities.processKeyBindings(enterKeyEvent); // CT editing should be finished org.netbeans.junit.Log.assertInstances("CodeTemplateInsertHandler instances not GCed"); }
Example 6
Source File: LWComponentPeer.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 6 votes |
protected void sendEventToDelegate(final AWTEvent e) { if (getDelegate() == null || !isShowing() || !isEnabled()) { return; } synchronized (getDelegateLock()) { AWTEvent delegateEvent = createDelegateEvent(e); if (delegateEvent != null) { AWTAccessor.getComponentAccessor() .processEvent((Component) delegateEvent.getSource(), delegateEvent); if (delegateEvent instanceof KeyEvent) { KeyEvent ke = (KeyEvent) delegateEvent; SwingUtilities.processKeyBindings(ke); } } } }
Example 7
Source File: LWComponentPeer.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
protected void sendEventToDelegate(final AWTEvent e) { if (getDelegate() == null || !isShowing() || !isEnabled()) { return; } synchronized (getDelegateLock()) { AWTEvent delegateEvent = createDelegateEvent(e); if (delegateEvent != null) { AWTAccessor.getComponentAccessor() .processEvent((Component) delegateEvent.getSource(), delegateEvent); if (delegateEvent instanceof KeyEvent) { KeyEvent ke = (KeyEvent) delegateEvent; SwingUtilities.processKeyBindings(ke); } } } }
Example 8
Source File: LWComponentPeer.java From jdk8u-jdk with GNU General Public License v2.0 | 6 votes |
protected void sendEventToDelegate(final AWTEvent e) { if (getDelegate() == null || !isShowing() || !isEnabled()) { return; } synchronized (getDelegateLock()) { AWTEvent delegateEvent = createDelegateEvent(e); if (delegateEvent != null) { AWTAccessor.getComponentAccessor() .processEvent((Component) delegateEvent.getSource(), delegateEvent); if (delegateEvent instanceof KeyEvent) { KeyEvent ke = (KeyEvent) delegateEvent; SwingUtilities.processKeyBindings(ke); } } } }
Example 9
Source File: LWComponentPeer.java From hottub with GNU General Public License v2.0 | 6 votes |
protected void sendEventToDelegate(final AWTEvent e) { if (getDelegate() == null || !isShowing() || !isEnabled()) { return; } synchronized (getDelegateLock()) { AWTEvent delegateEvent = createDelegateEvent(e); if (delegateEvent != null) { AWTAccessor.getComponentAccessor() .processEvent((Component) delegateEvent.getSource(), delegateEvent); if (delegateEvent instanceof KeyEvent) { KeyEvent ke = (KeyEvent) delegateEvent; SwingUtilities.processKeyBindings(ke); } } } }
Example 10
Source File: LWComponentPeer.java From openjdk-8-source with GNU General Public License v2.0 | 6 votes |
protected void sendEventToDelegate(final AWTEvent e) { if (getDelegate() == null || !isShowing() || !isEnabled()) { return; } synchronized (getDelegateLock()) { AWTEvent delegateEvent = createDelegateEvent(e); if (delegateEvent != null) { AWTAccessor.getComponentAccessor() .processEvent((Component) delegateEvent.getSource(), delegateEvent); if (delegateEvent instanceof KeyEvent) { KeyEvent ke = (KeyEvent) delegateEvent; SwingUtilities.processKeyBindings(ke); } } } }
Example 11
Source File: LWComponentPeer.java From openjdk-8 with GNU General Public License v2.0 | 6 votes |
protected void sendEventToDelegate(final AWTEvent e) { if (getDelegate() == null || !isShowing() || !isEnabled()) { return; } synchronized (getDelegateLock()) { AWTEvent delegateEvent = createDelegateEvent(e); if (delegateEvent != null) { AWTAccessor.getComponentAccessor() .processEvent((Component) delegateEvent.getSource(), delegateEvent); if (delegateEvent instanceof KeyEvent) { KeyEvent ke = (KeyEvent) delegateEvent; SwingUtilities.processKeyBindings(ke); } } } }
Example 12
Source File: LWComponentPeer.java From jdk8u_jdk with GNU General Public License v2.0 | 6 votes |
protected void sendEventToDelegate(final AWTEvent e) { if (getDelegate() == null || !isShowing() || !isEnabled()) { return; } synchronized (getDelegateLock()) { AWTEvent delegateEvent = createDelegateEvent(e); if (delegateEvent != null) { AWTAccessor.getComponentAccessor() .processEvent((Component) delegateEvent.getSource(), delegateEvent); if (delegateEvent instanceof KeyEvent) { KeyEvent ke = (KeyEvent) delegateEvent; SwingUtilities.processKeyBindings(ke); } } } }
Example 13
Source File: LWComponentPeer.java From jdk8u-jdk with GNU General Public License v2.0 | 6 votes |
protected void sendEventToDelegate(final AWTEvent e) { if (getDelegate() == null || !isShowing() || !isEnabled()) { return; } synchronized (getDelegateLock()) { AWTEvent delegateEvent = createDelegateEvent(e); if (delegateEvent != null) { AWTAccessor.getComponentAccessor() .processEvent((Component) delegateEvent.getSource(), delegateEvent); if (delegateEvent instanceof KeyEvent) { KeyEvent ke = (KeyEvent) delegateEvent; SwingUtilities.processKeyBindings(ke); } } } }
Example 14
Source File: LWComponentPeer.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 6 votes |
protected void sendEventToDelegate(final AWTEvent e) { if (getDelegate() == null || !isShowing() || !isEnabled()) { return; } synchronized (getDelegateLock()) { AWTEvent delegateEvent = createDelegateEvent(e); if (delegateEvent != null) { AWTAccessor.getComponentAccessor() .processEvent((Component) delegateEvent.getSource(), delegateEvent); if (delegateEvent instanceof KeyEvent) { KeyEvent ke = (KeyEvent) delegateEvent; SwingUtilities.processKeyBindings(ke); } } } }