Package com.jogamp.newt.opengl.util
Class NEWTDemoListener
- java.lang.Object
-
- com.jogamp.newt.event.WindowAdapter
-
- com.jogamp.newt.opengl.util.NEWTDemoListener
-
- All Implemented Interfaces:
KeyListener
,MouseListener
,NEWTEventListener
,WindowListener
,EventListener
public class NEWTDemoListener extends WindowAdapter implements KeyListener, MouseListener
-
-
Constructor Summary
Constructors Constructor Description NEWTDemoListener(GLWindow glWin)
NEWTDemoListener(GLWindow glWin, Display.PointerIcon[] pointerIcons)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clearQuitAdapter()
static Display.PointerIcon[]
createPointerIcons(Display disp)
void
doQuit()
void
keyPressed(KeyEvent e)
void
keyReleased(KeyEvent e)
void
mouseClicked(MouseEvent e)
void
mouseDragged(MouseEvent e)
void
mouseEntered(MouseEvent e)
Only generated forMouseEvent.PointerType.Mouse
void
mouseExited(MouseEvent e)
Only generated forMouseEvent.PointerType.Mouse
void
mouseMoved(MouseEvent e)
void
mousePressed(MouseEvent e)
void
mouseReleased(MouseEvent e)
void
mouseWheelMoved(MouseEvent e)
Traditional event name originally produced by amouse
pointer type.void
quitAdapterEnable(boolean v)
void
setConfinedFixedCenter(boolean v)
void
setTitle()
static void
setTitle(GLWindow win)
boolean
shouldQuit()
void
windowDestroyNotify(WindowEvent e)
Window destruction has been requested.-
Methods inherited from class com.jogamp.newt.event.WindowAdapter
windowDestroyed, windowGainedFocus, windowLostFocus, windowMoved, windowRepaint, windowResized
-
-
-
-
Constructor Detail
-
NEWTDemoListener
public NEWTDemoListener(GLWindow glWin, Display.PointerIcon[] pointerIcons)
-
NEWTDemoListener
public NEWTDemoListener(GLWindow glWin)
-
-
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
-
setConfinedFixedCenter
public void setConfinedFixedCenter(boolean v)
-
mouseMoved
public void mouseMoved(MouseEvent e)
- Specified by:
mouseMoved
in interfaceMouseListener
-
mouseDragged
public void mouseDragged(MouseEvent e)
- Specified by:
mouseDragged
in interfaceMouseListener
-
mouseClicked
public void mouseClicked(MouseEvent e)
- Specified by:
mouseClicked
in interfaceMouseListener
-
mouseEntered
public void mouseEntered(MouseEvent e)
Description copied from interface:MouseListener
Only generated forMouseEvent.PointerType.Mouse
- Specified by:
mouseEntered
in interfaceMouseListener
-
mouseExited
public void mouseExited(MouseEvent e)
Description copied from interface:MouseListener
Only generated forMouseEvent.PointerType.Mouse
- Specified by:
mouseExited
in interfaceMouseListener
-
mousePressed
public void mousePressed(MouseEvent e)
- Specified by:
mousePressed
in interfaceMouseListener
-
mouseReleased
public void mouseReleased(MouseEvent e)
- Specified by:
mouseReleased
in interfaceMouseListener
-
mouseWheelMoved
public void mouseWheelMoved(MouseEvent e)
Description copied from interface:MouseListener
Traditional event name originally produced by amouse
pointer type.Triggered for any rotational pointer events, see
MouseEvent.getRotation()
andMouseEvent.getRotationScale()
.- Specified by:
mouseWheelMoved
in interfaceMouseListener
-
quitAdapterEnable
public void quitAdapterEnable(boolean v)
-
clearQuitAdapter
public void clearQuitAdapter()
-
shouldQuit
public boolean shouldQuit()
-
doQuit
public void doQuit()
-
windowDestroyNotify
public void windowDestroyNotify(WindowEvent e)
Description copied from interface:WindowListener
Window destruction has been requested.Depending on the
In case the window will be destroyed (see above), release of resources is recommended.default close operation
, the window maybe destroyed or not.- Specified by:
windowDestroyNotify
in interfaceWindowListener
- Overrides:
windowDestroyNotify
in classWindowAdapter
-
setTitle
public void setTitle()
-
setTitle
public static void setTitle(GLWindow win)
-
createPointerIcons
public static Display.PointerIcon[] createPointerIcons(Display disp)
-
-