Package com.jogamp.graph.ui
Class Shape.ForwardKeyListener
- java.lang.Object
-
- com.jogamp.graph.ui.Shape.ForwardKeyListener
-
- All Implemented Interfaces:
KeyListener,NEWTEventListener,EventListener
- Enclosing class:
- Shape
public static class Shape.ForwardKeyListener extends Object implements KeyListener
ForwardKeyListener, to be attached to a key event source forwarded to the receiver set at constructor.This given receiver
Shapemust beShape.setInteractive(boolean)to have the events forwarded.- See Also:
Shape.receiveKeyEvents(Shape)
-
-
Constructor Summary
Constructors Constructor Description ForwardKeyListener(Shape receiver)Shape.ForwardKeyListenerConstructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidkeyPressed(KeyEvent e)voidkeyReleased(KeyEvent e)
-
-
-
Field Detail
-
receiver
public final Shape receiver
-
-
Constructor Detail
-
ForwardKeyListener
public ForwardKeyListener(Shape receiver)
Shape.ForwardKeyListenerConstructor- Parameters:
receiver- theKeyListenerreceiver
-
-
Method Detail
-
keyPressed
public void keyPressed(KeyEvent e)
Description copied from interface:KeyListener- Specified by:
keyPressedin interfaceKeyListener
-
keyReleased
public void keyReleased(KeyEvent e)
Description copied from interface:KeyListenerA key has beenreleased, excludingauto-repeatmodifierkeys. SeeKeyEvent.To simulated the removed
keyTyped(KeyEvent e)semantics, simply apply the following constraints upfront and bail out if not matched, i.e.:if( !e.isPrintableKey() || e.isAutoRepeat() ) { return; }- Specified by:
keyReleasedin interfaceKeyListener
-
-