public class NEWTDemoListener extends WindowAdapter implements KeyListener, MouseListener
Constructor and Description |
---|
NEWTDemoListener(GLWindow glWin) |
NEWTDemoListener(GLWindow glWin,
Display.PointerIcon[] pointerIcons) |
Modifier and Type | Method and 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 for
MouseEvent.PointerType.Mouse |
void |
mouseExited(MouseEvent e)
Only generated for
MouseEvent.PointerType.Mouse |
void |
mouseMoved(MouseEvent e) |
void |
mousePressed(MouseEvent e) |
void |
mouseReleased(MouseEvent e) |
void |
mouseWheelMoved(MouseEvent e)
Traditional event name originally produced by a
mouse 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.
|
windowDestroyed, windowGainedFocus, windowLostFocus, windowMoved, windowRepaint, windowResized
public NEWTDemoListener(GLWindow glWin, Display.PointerIcon[] pointerIcons)
public NEWTDemoListener(GLWindow glWin)
public void keyPressed(KeyEvent e)
KeyListener
keyPressed
in interface KeyListener
public void keyReleased(KeyEvent e)
KeyListener
released
, excluding auto-repeat
modifier
keys. See KeyEvent
.
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; }
keyReleased
in interface KeyListener
public void setConfinedFixedCenter(boolean v)
public void mouseMoved(MouseEvent e)
mouseMoved
in interface MouseListener
public void mouseDragged(MouseEvent e)
mouseDragged
in interface MouseListener
public void mouseClicked(MouseEvent e)
mouseClicked
in interface MouseListener
public void mouseEntered(MouseEvent e)
MouseListener
MouseEvent.PointerType.Mouse
mouseEntered
in interface MouseListener
public void mouseExited(MouseEvent e)
MouseListener
MouseEvent.PointerType.Mouse
mouseExited
in interface MouseListener
public void mousePressed(MouseEvent e)
mousePressed
in interface MouseListener
public void mouseReleased(MouseEvent e)
mouseReleased
in interface MouseListener
public void mouseWheelMoved(MouseEvent e)
MouseListener
mouse
pointer type.
Triggered for any rotational pointer events, see
MouseEvent.getRotation()
and MouseEvent.getRotationScale()
.
mouseWheelMoved
in interface MouseListener
public void quitAdapterEnable(boolean v)
public void clearQuitAdapter()
public boolean shouldQuit()
public void doQuit()
public void windowDestroyNotify(WindowEvent e)
WindowListener
Depending on the default close operation
,
the window maybe destroyed or not.
windowDestroyNotify
in interface WindowListener
windowDestroyNotify
in class WindowAdapter
public void setTitle()
public static void setTitle(GLWindow win)
public static Display.PointerIcon[] createPointerIcons(Display disp)
Copyright 2010 JogAmp Community.