Search in sources :

Example 1 with KeyReleasedEvent

use of limelight.ui.events.panel.KeyReleasedEvent in project limelight by slagyr.

the class StageKeyListenerTest method focuedPanelReceivesReleaseKeyEvents.

@Test
public void focuedPanelReceivesReleaseKeyEvents() throws Exception {
    panel.getEventHandler().add(KeyReleasedEvent.class, action);
    listener.focusOn(panel);
    final KeyEvent releasedEvent = new KeyEvent(component, 1, 2, 3, KeyEvent.VK_B, 'c');
    listener.keyReleased(releasedEvent);
    KeyReleasedEvent keyEvent1 = (KeyReleasedEvent) action.event;
    assertSame(panel, keyEvent1.getSource());
    assertEquals(limelight.ui.events.panel.KeyEvent.KEY_B, keyEvent1.getKeyCode());
}
Also used : KeyEvent(java.awt.event.KeyEvent) KeyReleasedEvent(limelight.ui.events.panel.KeyReleasedEvent) Test(org.junit.Test)

Aggregations

KeyEvent (java.awt.event.KeyEvent)1 KeyReleasedEvent (limelight.ui.events.panel.KeyReleasedEvent)1 Test (org.junit.Test)1