Top Fields Constructors Methods
com.jogamp.newt.opengl.util

public Class NEWTDemoListener

extends WindowAdapter
implements KeyListener, MouseListener
Class Inheritance
All Implemented Interfaces
com.jogamp.newt.event.MouseListener, com.jogamp.newt.event.NEWTEventListener, java.util.EventListener, com.jogamp.newt.event.KeyListener
Imports
java.net.URLConnection, java.util.ArrayList, .List, com.jogamp.common.util.IOUtil, com.jogamp.nativewindow.CapabilitiesImmutable, .ScalableSurface, com.jogamp.newt.Display, .Display.PointerIcon, com.jogamp.newt.event.KeyEvent, .KeyListener, .MouseEvent, .MouseListener, .WindowAdapter, .WindowEvent, com.jogamp.newt.opengl.GLWindow, com.jogamp.opengl.FPSCounter, .GL, .GLAnimatorControl, .GLAutoDrawable, .GLRunnable, com.jogamp.opengl.util.Gamma, .PNGPixelRect, jogamp.newt.driver.PNGIcon

Field Summary

Modifier and TypeField and Description
pack-priv float
pack-priv boolean
pack-priv float
pack-priv float
protected final GLWindow
pack-priv int
pack-priv final Display.PointerIcon[]
private boolean
private boolean
private boolean

Constructor Summary

AccessConstructor and Description
public
NEWTDemoListener(final GLWindow glWin, final Display.PointerIcon[] pointerIcons)

public

Method Summary

Modifier and TypeMethod and Description
public void
public static Display.PointerIcon[]
public void
public void
public void
private void
public void
public void
public void
public void
public void
public void
public void
public void
mouseWheelMoved(final MouseEvent e)

Implements com.jogamp.newt.event.MouseListener.mouseWheelMoved.

Traditional event name originally produced by a mouse pointer type.
protected void
printlnState(final String prelude)

protected void
printlnState(final String prelude, final String post)

public void
quitAdapterEnable(final boolean v)

protected void
protected void
public void
setConfinedFixedCenter(final boolean v)

public void
public static void
setTitle(final GLWindow win)

public boolean
public void
Inherited from com.jogamp.newt.event.WindowAdapter:
windowDestroyedwindowGainedFocuswindowLostFocuswindowMovedwindowRepaintwindowResized

Field Detail

brightnessback to summary
pack-priv float brightness
confinedFixedCenterback to summary
pack-priv boolean confinedFixedCenter
contrastback to summary
pack-priv float contrast
gammaback to summary
pack-priv float gamma
glWindowback to summary
protected final GLWindow glWindow
pointerIconIdxback to summary
pack-priv int pointerIconIdx
pointerIconsback to summary
pack-priv final Display.PointerIcon[] pointerIcons
quitAdapterEnabledback to summary
private boolean quitAdapterEnabled
quitAdapterEnabled2back to summary
private boolean quitAdapterEnabled2
quitAdapterShouldQuitback to summary
private boolean quitAdapterShouldQuit

Constructor Detail

NEWTDemoListenerback to summary
public NEWTDemoListener(final GLWindow glWin, final Display.PointerIcon[] pointerIcons)
NEWTDemoListenerback to summary
public NEWTDemoListener(final GLWindow glWin)

Method Detail

clearQuitAdapterback to summary
public void clearQuitAdapter()
createPointerIconsback to summary
public static Display.PointerIcon[] createPointerIcons(final Display disp)
doQuitback to summary
public void doQuit()
keyPressedback to summary
public void keyPressed(final KeyEvent e)

Implements com.jogamp.newt.event.KeyListener.keyPressed.

Doc from com.jogamp.newt.event.KeyListener.keyPressed.

A key has been pressed, excluding auto-repeat modifier keys. See KeyEvent.

Annotations
@Override
keyReleasedback to summary
public void keyReleased(final KeyEvent e)

Implements com.jogamp.newt.event.KeyListener.keyReleased.

Doc from com.jogamp.newt.event.KeyListener.keyReleased.

A key has been 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;
       }

Annotations
@Override
mouseCenterWarpback to summary
private void mouseCenterWarp(final MouseEvent e)
mouseClickedback to summary
public void mouseClicked(final MouseEvent e)

Implements com.jogamp.newt.event.MouseListener.mouseClicked.

Annotations
@Override
mouseDraggedback to summary
public void mouseDragged(final MouseEvent e)

Implements com.jogamp.newt.event.MouseListener.mouseDragged.

Annotations
@Override
mouseEnteredback to summary
public void mouseEntered(final MouseEvent e)

Implements com.jogamp.newt.event.MouseListener.mouseEntered.

Doc from com.jogamp.newt.event.MouseListener.mouseEntered.

Only generated for PointerType#Mouse

Annotations
@Override
mouseExitedback to summary
public void mouseExited(final MouseEvent e)

Implements com.jogamp.newt.event.MouseListener.mouseExited.

Doc from com.jogamp.newt.event.MouseListener.mouseExited.

Only generated for PointerType#Mouse

Annotations
@Override
mouseMovedback to summary
public void mouseMoved(final MouseEvent e)

Implements com.jogamp.newt.event.MouseListener.mouseMoved.

Annotations
@Override
mousePressedback to summary
public void mousePressed(final MouseEvent e)

Implements com.jogamp.newt.event.MouseListener.mousePressed.

Annotations
@Override
mouseReleasedback to summary
public void mouseReleased(final MouseEvent e)

Implements com.jogamp.newt.event.MouseListener.mouseReleased.

Annotations
@Override
mouseWheelMovedback to summary
public void mouseWheelMoved(final MouseEvent e)

Implements com.jogamp.newt.event.MouseListener.mouseWheelMoved.

Doc from com.jogamp.newt.event.MouseListener.mouseWheelMoved.

Traditional event name originally produced by a mouse pointer type.

Triggered for any rotational pointer events, see MouseEvent#getRotation() and MouseEvent#getRotationScale().

Annotations
@Override
printlnStateback to summary
protected void printlnState(final String prelude)
printlnStateback to summary
protected void printlnState(final String prelude, final String post)
quitAdapterEnableback to summary
public void quitAdapterEnable(final boolean v)
quitAdapterOffback to summary
protected void quitAdapterOff()
quitAdapterOnback to summary
protected void quitAdapterOn()
setConfinedFixedCenterback to summary
public void setConfinedFixedCenter(final boolean v)
setTitleback to summary
public void setTitle()
setTitleback to summary
public static void setTitle(final GLWindow win)
shouldQuitback to summary
public boolean shouldQuit()
windowDestroyNotifyback to summary
public void windowDestroyNotify(final WindowEvent e)

Overrides com.jogamp.newt.event.WindowAdapter.windowDestroyNotify.

Implements com.jogamp.newt.event.WindowListener.windowDestroyNotify.

Doc from com.jogamp.newt.event.WindowListener.windowDestroyNotify.

Window destruction has been requested.

Depending on the default close operation, the window maybe destroyed or not.

In case the window will be destroyed (see above), release of resources is recommended.