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
Shape
must beShape.setInteractive(boolean)
to have the events forwarded.- See Also:
Shape.receiveKeyEvents(Shape)
-
-
Constructor Summary
Constructors Constructor Description ForwardKeyListener(Shape receiver)
Shape.ForwardKeyListener
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
keyPressed(KeyEvent e)
void
keyReleased(KeyEvent e)
-
-
-
Field Detail
-
receiver
public final Shape receiver
-
-
Constructor Detail
-
ForwardKeyListener
public ForwardKeyListener(Shape receiver)
Shape.ForwardKeyListener
Constructor- Parameters:
receiver
- theKeyListener
receiver
-
-
Method Detail
-
keyPressed
public void keyPressed(KeyEvent e)
Description copied from interface:KeyListener
- Specified by:
keyPressed
in interfaceKeyListener
-
keyReleased
public void keyReleased(KeyEvent e)
Description copied from interface:KeyListener
A key has beenreleased
, excludingauto-repeat
modifier
keys. 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:
keyReleased
in interfaceKeyListener
-
-