aboutsummaryrefslogtreecommitdiffstats
path: root/src/newt/classes/com/jogamp
diff options
context:
space:
mode:
authorHarvey Harrison <[email protected]>2013-10-17 22:51:47 -0700
committerHarvey Harrison <[email protected]>2013-10-17 23:01:22 -0700
commitf1ae8ddb87c88a57dce4593f006881ef6a7f0932 (patch)
tree0c25dff44d3781dadecc8234a9bc70e18e50cbc2 /src/newt/classes/com/jogamp
parent5e9c02bce7b241a0bf95c8abca9a91cd25e51ed3 (diff)
jogl: add missing @Override annotations
Signed-off-by: Harvey Harrison <[email protected]>
Diffstat (limited to 'src/newt/classes/com/jogamp')
-rw-r--r--src/newt/classes/com/jogamp/newt/Display.java2
-rw-r--r--src/newt/classes/com/jogamp/newt/MonitorDevice.java3
-rw-r--r--src/newt/classes/com/jogamp/newt/MonitorMode.java8
-rw-r--r--src/newt/classes/com/jogamp/newt/NewtFactory.java1
-rw-r--r--src/newt/classes/com/jogamp/newt/Screen.java2
-rw-r--r--src/newt/classes/com/jogamp/newt/awt/NewtCanvasAWT.java13
-rw-r--r--src/newt/classes/com/jogamp/newt/awt/applet/JOGLNewtApplet1Run.java4
-rw-r--r--src/newt/classes/com/jogamp/newt/awt/applet/JOGLNewtAppletBase.java6
-rw-r--r--src/newt/classes/com/jogamp/newt/event/DoubleTapScrollGesture.java1
-rw-r--r--src/newt/classes/com/jogamp/newt/event/InputEvent.java2
-rw-r--r--src/newt/classes/com/jogamp/newt/event/KeyAdapter.java2
-rw-r--r--src/newt/classes/com/jogamp/newt/event/KeyEvent.java2
-rw-r--r--src/newt/classes/com/jogamp/newt/event/MonitorEvent.java2
-rw-r--r--src/newt/classes/com/jogamp/newt/event/MouseAdapter.java8
-rw-r--r--src/newt/classes/com/jogamp/newt/event/MouseEvent.java2
-rw-r--r--src/newt/classes/com/jogamp/newt/event/NEWTEvent.java1
-rw-r--r--src/newt/classes/com/jogamp/newt/event/PinchToZoomGesture.java1
-rw-r--r--src/newt/classes/com/jogamp/newt/event/TraceKeyAdapter.java2
-rw-r--r--src/newt/classes/com/jogamp/newt/event/TraceMouseAdapter.java8
-rw-r--r--src/newt/classes/com/jogamp/newt/event/TraceWindowAdapter.java7
-rw-r--r--src/newt/classes/com/jogamp/newt/event/WindowAdapter.java7
-rw-r--r--src/newt/classes/com/jogamp/newt/event/WindowEvent.java2
-rw-r--r--src/newt/classes/com/jogamp/newt/event/WindowUpdateEvent.java2
-rw-r--r--src/newt/classes/com/jogamp/newt/event/awt/AWTKeyAdapter.java2
-rw-r--r--src/newt/classes/com/jogamp/newt/event/awt/AWTMouseAdapter.java10
-rw-r--r--src/newt/classes/com/jogamp/newt/event/awt/AWTWindowAdapter.java22
-rw-r--r--src/newt/classes/com/jogamp/newt/opengl/GLWindow.java2
-rw-r--r--src/newt/classes/com/jogamp/newt/swt/NewtCanvasSWT.java3
28 files changed, 127 insertions, 0 deletions
diff --git a/src/newt/classes/com/jogamp/newt/Display.java b/src/newt/classes/com/jogamp/newt/Display.java
index 83383d23c..a0a098481 100644
--- a/src/newt/classes/com/jogamp/newt/Display.java
+++ b/src/newt/classes/com/jogamp/newt/Display.java
@@ -41,9 +41,11 @@ public abstract class Display {
public static final boolean DEBUG = Debug.debug("Display");
/** return precomputed hashCode from FQN {@link #getFQName()} */
+ @Override
public abstract int hashCode();
/** return true if obj is of type Display and both FQN {@link #getFQName()} equals */
+ @Override
public boolean equals(Object obj) {
if (this == obj) { return true; }
if (obj instanceof Display) {
diff --git a/src/newt/classes/com/jogamp/newt/MonitorDevice.java b/src/newt/classes/com/jogamp/newt/MonitorDevice.java
index 625a7b39f..28d9f53a1 100644
--- a/src/newt/classes/com/jogamp/newt/MonitorDevice.java
+++ b/src/newt/classes/com/jogamp/newt/MonitorDevice.java
@@ -87,6 +87,7 @@ public abstract class MonitorDevice {
* </ul>
* <br>
*/
+ @Override
public final boolean equals(Object obj) {
if (this == obj) { return true; }
if (obj instanceof MonitorDevice) {
@@ -102,6 +103,7 @@ public abstract class MonitorDevice {
* <li><code>nativeID</code></li>
* </ul>
*/
+ @Override
public final int hashCode() {
return nativeId;
}
@@ -228,6 +230,7 @@ public abstract class MonitorDevice {
*/
public abstract boolean setCurrentMode(MonitorMode mode);
+ @Override
public String toString() {
return "Monitor[Id "+Display.toHexString(nativeId)+", "+sizeMM+" mm, viewport "+viewport+ ", orig "+originalMode+", curr "+currentMode+
", modeChanged "+modeChanged+", modeCount "+supportedModes.size()+"]";
diff --git a/src/newt/classes/com/jogamp/newt/MonitorMode.java b/src/newt/classes/com/jogamp/newt/MonitorMode.java
index 175d6e5f2..59f28e791 100644
--- a/src/newt/classes/com/jogamp/newt/MonitorMode.java
+++ b/src/newt/classes/com/jogamp/newt/MonitorMode.java
@@ -114,12 +114,14 @@ public class MonitorMode implements Comparable<MonitorMode> {
/** Comparator for 2 {@link MonitorMode}s, following comparison order as described in {@link MonitorMode#compareTo(MonitorMode)}, returning the ascending order. */
public static final Comparator<MonitorMode> monitorModeComparator = new Comparator<MonitorMode>() {
+ @Override
public int compare(MonitorMode mm1, MonitorMode mm2) {
return mm1.compareTo(mm2);
} };
/** Comparator for 2 {@link MonitorMode}s, following comparison order as described in {@link MonitorMode#compareTo(MonitorMode)}, returning the descending order. */
public static final Comparator<MonitorMode> monitorModeComparatorInv = new Comparator<MonitorMode>() {
+ @Override
public int compare(MonitorMode mm1, MonitorMode mm2) {
return mm2.compareTo(mm1);
} };
@@ -172,6 +174,7 @@ public class MonitorMode implements Comparable<MonitorMode> {
}
return sb;
}
+ @Override
public final String toString() {
return new String(surfaceSize+" @ "+refreshRate+" Hz, flags ["+flags2String(flags).toString()+"]");
}
@@ -228,6 +231,7 @@ public class MonitorMode implements Comparable<MonitorMode> {
* <li><code>flags</code></li>
* </ul>
*/
+ @Override
public final boolean equals(Object obj) {
if (this == obj) { return true; }
if (obj instanceof SizeAndRRate) {
@@ -247,6 +251,7 @@ public class MonitorMode implements Comparable<MonitorMode> {
* <li><code>refreshRate</code></li>
* </ul>
*/
+ @Override
public final int hashCode() {
return hashCode;
}
@@ -360,6 +365,7 @@ public class MonitorMode implements Comparable<MonitorMode> {
return getRotatedWH(false);
}
+ @Override
public final String toString() {
return "[Id "+Display.toHexString(nativeId)+", " + sizeAndRRate + ", " + rotation + " degr]";
}
@@ -409,6 +415,7 @@ public class MonitorMode implements Comparable<MonitorMode> {
* <li><code>rotation</code></li>
* </ul>
*/
+ @Override
public final boolean equals(Object obj) {
if (this == obj) { return true; }
if (obj instanceof MonitorMode) {
@@ -428,6 +435,7 @@ public class MonitorMode implements Comparable<MonitorMode> {
* <li><code>rotation</code></li>
* </ul>
*/
+ @Override
public final int hashCode() {
return hashCode;
}
diff --git a/src/newt/classes/com/jogamp/newt/NewtFactory.java b/src/newt/classes/com/jogamp/newt/NewtFactory.java
index 7116877a3..5ae3f3692 100644
--- a/src/newt/classes/com/jogamp/newt/NewtFactory.java
+++ b/src/newt/classes/com/jogamp/newt/NewtFactory.java
@@ -56,6 +56,7 @@ public class NewtFactory {
static {
AccessController.doPrivileged(new PrivilegedAction<Object>() {
+ @Override
public Object run() {
NativeWindowFactory.initSingleton(); // last resort ..
diff --git a/src/newt/classes/com/jogamp/newt/Screen.java b/src/newt/classes/com/jogamp/newt/Screen.java
index 1274b3459..ef62ec95d 100644
--- a/src/newt/classes/com/jogamp/newt/Screen.java
+++ b/src/newt/classes/com/jogamp/newt/Screen.java
@@ -53,9 +53,11 @@ public abstract class Screen {
public static final boolean DEBUG = Debug.debug("Screen");
/** return precomputed hashCode from FQN {@link #getFQName()} */
+ @Override
public abstract int hashCode();
/** return true if obj is of type Display and both FQN {@link #getFQName()} equals */
+ @Override
public boolean equals(Object obj) {
if (this == obj) { return true; }
if (obj instanceof Screen) {
diff --git a/src/newt/classes/com/jogamp/newt/awt/NewtCanvasAWT.java b/src/newt/classes/com/jogamp/newt/awt/NewtCanvasAWT.java
index de1b7224f..1f5c26f27 100644
--- a/src/newt/classes/com/jogamp/newt/awt/NewtCanvasAWT.java
+++ b/src/newt/classes/com/jogamp/newt/awt/NewtCanvasAWT.java
@@ -107,10 +107,12 @@ public class NewtCanvasAWT extends java.awt.Canvas implements WindowClosingProto
private AWTWindowClosingProtocol awtWindowClosingProtocol =
new AWTWindowClosingProtocol(this, new Runnable() {
+ @Override
public void run() {
NewtCanvasAWT.this.destroyImpl(false /* removeNotify */, true /* windowClosing */);
}
}, new Runnable() {
+ @Override
public void run() {
if( newtChild != null ) {
newtChild.sendWindowEvent(WindowEvent.EVENT_WINDOW_DESTROY_NOTIFY);
@@ -148,14 +150,17 @@ public class NewtCanvasAWT extends java.awt.Canvas implements WindowClosingProto
setNEWTChild(child);
}
+ @Override
public void setShallUseOffscreenLayer(boolean v) {
shallUseOffscreenLayer = v;
}
+ @Override
public final boolean getShallUseOffscreenLayer() {
return shallUseOffscreenLayer;
}
+ @Override
public final boolean isOffscreenLayerSurfaceEnabled() {
return jawtWindow.isOffscreenLayerSurfaceEnabled();
}
@@ -178,6 +183,7 @@ public class NewtCanvasAWT extends java.awt.Canvas implements WindowClosingProto
}
class FocusAction implements Window.FocusRunnable {
+ @Override
public boolean run() {
final boolean isParent = isParent();
final boolean isFullscreen = isFullscreen();
@@ -214,11 +220,13 @@ public class NewtCanvasAWT extends java.awt.Canvas implements WindowClosingProto
};
class FocusTraversalKeyListener implements KeyListener {
+ @Override
public void keyPressed(KeyEvent e) {
if( isParent() && !isFullscreen() ) {
handleKey(e, false);
}
}
+ @Override
public void keyReleased(KeyEvent e) {
if( isParent() && !isFullscreen() ) {
handleKey(e, true);
@@ -263,6 +271,7 @@ public class NewtCanvasAWT extends java.awt.Canvas implements WindowClosingProto
private final FocusTraversalKeyListener newtFocusTraversalKeyListener = new FocusTraversalKeyListener();
class FocusPropertyChangeListener implements PropertyChangeListener {
+ @Override
public void propertyChange(PropertyChangeEvent evt) {
final Object oldF = evt.getOldValue();
final Object newF = evt.getNewValue();
@@ -358,10 +367,12 @@ public class NewtCanvasAWT extends java.awt.Canvas implements WindowClosingProto
* or {@link #addNotify()} hasn't been called yet.*/
public NativeWindow getNativeWindow() { return jawtWindow; }
+ @Override
public WindowClosingMode getDefaultCloseOperation() {
return awtWindowClosingProtocol.getDefaultCloseOperation();
}
+ @Override
public WindowClosingMode setDefaultCloseOperation(WindowClosingMode op) {
return awtWindowClosingProtocol.setDefaultCloseOperation(op);
}
@@ -745,6 +756,7 @@ public class NewtCanvasAWT extends java.awt.Canvas implements WindowClosingProto
}
}
private final Runnable forceRelayout = new Runnable() {
+ @Override
public void run() {
if(DEBUG) {
System.err.println("NewtCanvasAWT.forceRelayout.0");
@@ -797,6 +809,7 @@ public class NewtCanvasAWT extends java.awt.Canvas implements WindowClosingProto
if (!disableBackgroundEraseInitialized) {
try {
AccessController.doPrivileged(new PrivilegedAction<Object>() {
+ @Override
public Object run() {
try {
Class<?> clazz = getToolkit().getClass();
diff --git a/src/newt/classes/com/jogamp/newt/awt/applet/JOGLNewtApplet1Run.java b/src/newt/classes/com/jogamp/newt/awt/applet/JOGLNewtApplet1Run.java
index 9b1b82297..409f78307 100644
--- a/src/newt/classes/com/jogamp/newt/awt/applet/JOGLNewtApplet1Run.java
+++ b/src/newt/classes/com/jogamp/newt/awt/applet/JOGLNewtApplet1Run.java
@@ -102,6 +102,7 @@ public class JOGLNewtApplet1Run extends Applet {
/** if valid glStandalone:=true (own window) ! */
int glXd=Integer.MAX_VALUE, glYd=Integer.MAX_VALUE, glWidth=Integer.MAX_VALUE, glHeight=Integer.MAX_VALUE;
+ @Override
public void init() {
if(DEBUG) {
System.err.println("JOGLNewtApplet1Run.init() START");
@@ -223,6 +224,7 @@ public class JOGLNewtApplet1Run extends Applet {
}
}
+ @Override
public void start() {
if(DEBUG) {
System.err.println("JOGLNewtApplet1Run.start() START (isVisible "+isVisible()+", isDisplayable "+isDisplayable()+")");
@@ -266,6 +268,7 @@ public class JOGLNewtApplet1Run extends Applet {
}
}
+ @Override
public void stop() {
if(DEBUG) {
System.err.println("JOGLNewtApplet1Run.stop() START");
@@ -276,6 +279,7 @@ public class JOGLNewtApplet1Run extends Applet {
}
}
+ @Override
public void destroy() {
if(DEBUG) {
System.err.println("JOGLNewtApplet1Run.destroy() START");
diff --git a/src/newt/classes/com/jogamp/newt/awt/applet/JOGLNewtAppletBase.java b/src/newt/classes/com/jogamp/newt/awt/applet/JOGLNewtAppletBase.java
index a6a30a8bf..d17d2e77c 100644
--- a/src/newt/classes/com/jogamp/newt/awt/applet/JOGLNewtAppletBase.java
+++ b/src/newt/classes/com/jogamp/newt/awt/applet/JOGLNewtAppletBase.java
@@ -112,6 +112,7 @@ public class JOGLNewtAppletBase implements KeyListener, GLEventListener {
try {
final Class<?> clazz = AccessController.doPrivileged(new PrivilegedAction<Class<?>>() {
+ @Override
public Class<?> run() {
final ClassLoader cl = Thread.currentThread().getContextClassLoader();
Class<?> clazz = null;
@@ -169,6 +170,7 @@ public class JOGLNewtAppletBase implements KeyListener, GLEventListener {
if(null == glWindow.getParent()) {
// we may be called directly by the native EDT
new Thread(new Runnable() {
+ @Override
public void run() {
if( glWindow.isNativeValid() ) {
glWindow.reparentWindow(awtParent);
@@ -256,6 +258,7 @@ public class JOGLNewtAppletBase implements KeyListener, GLEventListener {
// ***********************************************************************************
// ***********************************************************************************
+ @Override
public void init(GLAutoDrawable drawable) {
GL _gl = drawable.getGL();
@@ -276,10 +279,13 @@ public class JOGLNewtAppletBase implements KeyListener, GLEventListener {
_gl.setSwapInterval(glSwapInterval);
}
}
+ @Override
public void reshape(GLAutoDrawable drawable, int x, int y, int width, int height) {
}
+ @Override
public void display(GLAutoDrawable drawable) {
}
+ @Override
public void dispose(GLAutoDrawable drawable) {
}
diff --git a/src/newt/classes/com/jogamp/newt/event/DoubleTapScrollGesture.java b/src/newt/classes/com/jogamp/newt/event/DoubleTapScrollGesture.java
index 7dda47534..edb2429bb 100644
--- a/src/newt/classes/com/jogamp/newt/event/DoubleTapScrollGesture.java
+++ b/src/newt/classes/com/jogamp/newt/event/DoubleTapScrollGesture.java
@@ -142,6 +142,7 @@ public class DoubleTapScrollGesture implements GestureHandler {
}
}
+ @Override
public String toString() {
return "DoubleTapScroll[state "+gestureState+", in "+isWithinGesture()+", has "+(null!=hitGestureEvent)+", pc "+pointerDownCount+"]";
}
diff --git a/src/newt/classes/com/jogamp/newt/event/InputEvent.java b/src/newt/classes/com/jogamp/newt/event/InputEvent.java
index 6520dafcf..f29b632e8 100644
--- a/src/newt/classes/com/jogamp/newt/event/InputEvent.java
+++ b/src/newt/classes/com/jogamp/newt/event/InputEvent.java
@@ -210,10 +210,12 @@ public abstract class InputEvent extends NEWTEvent
return 0 != ( modifiers & BUTTONALL_MASK );
}
+ @Override
public String toString() {
return toString(null).toString();
}
+ @Override
public StringBuilder toString(StringBuilder sb) {
if(null == sb) {
sb = new StringBuilder();
diff --git a/src/newt/classes/com/jogamp/newt/event/KeyAdapter.java b/src/newt/classes/com/jogamp/newt/event/KeyAdapter.java
index a89148574..5cef734bb 100644
--- a/src/newt/classes/com/jogamp/newt/event/KeyAdapter.java
+++ b/src/newt/classes/com/jogamp/newt/event/KeyAdapter.java
@@ -31,8 +31,10 @@ package com.jogamp.newt.event;
public abstract class KeyAdapter implements KeyListener
{
+ @Override
public void keyPressed(KeyEvent e) {
}
+ @Override
public void keyReleased(KeyEvent e) {
}
}
diff --git a/src/newt/classes/com/jogamp/newt/event/KeyEvent.java b/src/newt/classes/com/jogamp/newt/event/KeyEvent.java
index 81680bf32..49aa4e054 100644
--- a/src/newt/classes/com/jogamp/newt/event/KeyEvent.java
+++ b/src/newt/classes/com/jogamp/newt/event/KeyEvent.java
@@ -196,10 +196,12 @@ public class KeyEvent extends InputEvent
return keyCode;
}
+ @Override
public final String toString() {
return toString(null).toString();
}
+ @Override
public final StringBuilder toString(StringBuilder sb) {
if(null == sb) {
sb = new StringBuilder();
diff --git a/src/newt/classes/com/jogamp/newt/event/MonitorEvent.java b/src/newt/classes/com/jogamp/newt/event/MonitorEvent.java
index 77c66a2da..03242e147 100644
--- a/src/newt/classes/com/jogamp/newt/event/MonitorEvent.java
+++ b/src/newt/classes/com/jogamp/newt/event/MonitorEvent.java
@@ -56,10 +56,12 @@ public class MonitorEvent extends OutputEvent {
}
}
+ @Override
public final String toString() {
return toString(null).toString();
}
+ @Override
public final StringBuilder toString(StringBuilder sb) {
if(null == sb) {
sb = new StringBuilder();
diff --git a/src/newt/classes/com/jogamp/newt/event/MouseAdapter.java b/src/newt/classes/com/jogamp/newt/event/MouseAdapter.java
index 652f87d5b..98252fe14 100644
--- a/src/newt/classes/com/jogamp/newt/event/MouseAdapter.java
+++ b/src/newt/classes/com/jogamp/newt/event/MouseAdapter.java
@@ -30,20 +30,28 @@ package com.jogamp.newt.event;
public abstract class MouseAdapter implements MouseListener
{
+ @Override
public void mouseClicked(MouseEvent e) {
}
+ @Override
public void mouseEntered(MouseEvent e) {
}
+ @Override
public void mouseExited(MouseEvent e) {
}
+ @Override
public void mousePressed(MouseEvent e) {
}
+ @Override
public void mouseReleased(MouseEvent e) {
}
+ @Override
public void mouseMoved(MouseEvent e) {
}
+ @Override
public void mouseDragged(MouseEvent e) {
}
+ @Override
public void mouseWheelMoved(MouseEvent e) {
}
}
diff --git a/src/newt/classes/com/jogamp/newt/event/MouseEvent.java b/src/newt/classes/com/jogamp/newt/event/MouseEvent.java
index 4d7cc3b36..635bdba52 100644
--- a/src/newt/classes/com/jogamp/newt/event/MouseEvent.java
+++ b/src/newt/classes/com/jogamp/newt/event/MouseEvent.java
@@ -510,10 +510,12 @@ public class MouseEvent extends InputEvent
return rotationScale;
}
+ @Override
public final String toString() {
return toString(null).toString();
}
+ @Override
public final StringBuilder toString(StringBuilder sb) {
if(null == sb) {
sb = new StringBuilder();
diff --git a/src/newt/classes/com/jogamp/newt/event/NEWTEvent.java b/src/newt/classes/com/jogamp/newt/event/NEWTEvent.java
index 022e2d0e1..af800e61e 100644
--- a/src/newt/classes/com/jogamp/newt/event/NEWTEvent.java
+++ b/src/newt/classes/com/jogamp/newt/event/NEWTEvent.java
@@ -131,6 +131,7 @@ public class NEWTEvent extends java.util.EventObject {
}
}
+ @Override
public String toString() {
return toString(null).toString();
}
diff --git a/src/newt/classes/com/jogamp/newt/event/PinchToZoomGesture.java b/src/newt/classes/com/jogamp/newt/event/PinchToZoomGesture.java
index d275eab46..b4e1341da 100644
--- a/src/newt/classes/com/jogamp/newt/event/PinchToZoomGesture.java
+++ b/src/newt/classes/com/jogamp/newt/event/PinchToZoomGesture.java
@@ -75,6 +75,7 @@ public class PinchToZoomGesture implements GestureHandler {
this.zoom = 1f;
}
+ @Override
public String toString() {
return "PinchZoom[1stTouch "+zoomFirstTouch+", in "+isWithinGesture()+", has "+(null!=zoomEvent)+", zoom "+zoom+"]";
}
diff --git a/src/newt/classes/com/jogamp/newt/event/TraceKeyAdapter.java b/src/newt/classes/com/jogamp/newt/event/TraceKeyAdapter.java
index e826f4a6a..bbc170958 100644
--- a/src/newt/classes/com/jogamp/newt/event/TraceKeyAdapter.java
+++ b/src/newt/classes/com/jogamp/newt/event/TraceKeyAdapter.java
@@ -40,10 +40,12 @@ public class TraceKeyAdapter implements KeyListener {
this.downstream = downstream;
}
+ @Override
public void keyPressed(KeyEvent e) {
System.err.println(e);
if(null!=downstream) { downstream.keyPressed(e); }
}
+ @Override
public void keyReleased(KeyEvent e) {
System.err.println(e);
if(null!=downstream) { downstream.keyReleased(e); }
diff --git a/src/newt/classes/com/jogamp/newt/event/TraceMouseAdapter.java b/src/newt/classes/com/jogamp/newt/event/TraceMouseAdapter.java
index d035091c4..db8376034 100644
--- a/src/newt/classes/com/jogamp/newt/event/TraceMouseAdapter.java
+++ b/src/newt/classes/com/jogamp/newt/event/TraceMouseAdapter.java
@@ -40,34 +40,42 @@ public class TraceMouseAdapter implements MouseListener {
this.downstream = downstream;
}
+ @Override
public void mouseClicked(MouseEvent e) {
System.err.println(e);
if(null!=downstream) { downstream.mouseClicked(e); }
}
+ @Override
public void mouseEntered(MouseEvent e) {
System.err.println(e);
if(null!=downstream) { downstream.mouseEntered(e); }
}
+ @Override
public void mouseExited(MouseEvent e) {
System.err.println(e);
if(null!=downstream) { downstream.mouseExited(e); }
}
+ @Override
public void mousePressed(MouseEvent e) {
System.err.println(e);
if(null!=downstream) { downstream.mousePressed(e); }
}
+ @Override
public void mouseReleased(MouseEvent e) {
System.err.println(e);
if(null!=downstream) { downstream.mouseReleased(e); }
}
+ @Override
public void mouseMoved(MouseEvent e) {
System.err.println(e);
if(null!=downstream) { downstream.mouseMoved(e); }
}
+ @Override
public void mouseDragged(MouseEvent e) {
System.err.println(e);
if(null!=downstream) { downstream.mouseDragged(e); }
}
+ @Override
public void mouseWheelMoved(MouseEvent e) {
System.err.println(e);
if(null!=downstream) { downstream.mouseWheelMoved(e); }
diff --git a/src/newt/classes/com/jogamp/newt/event/TraceWindowAdapter.java b/src/newt/classes/com/jogamp/newt/event/TraceWindowAdapter.java
index 630e85303..7b844f059 100644
--- a/src/newt/classes/com/jogamp/newt/event/TraceWindowAdapter.java
+++ b/src/newt/classes/com/jogamp/newt/event/TraceWindowAdapter.java
@@ -40,30 +40,37 @@ public class TraceWindowAdapter implements WindowListener {
this.downstream = downstream;
}
+ @Override
public void windowResized(WindowEvent e) {
System.err.println(e);
if(null!=downstream) { downstream.windowResized(e); }
}
+ @Override
public void windowMoved(WindowEvent e) {
System.err.println(e);
if(null!=downstream) { downstream.windowMoved(e); }
}
+ @Override
public void windowDestroyNotify(WindowEvent e) {
System.err.println(e);
if(null!=downstream) { downstream.windowDestroyNotify(e); }
}
+ @Override
public void windowDestroyed(WindowEvent e) {
System.err.println(e);
if(null!=downstream) { downstream.windowDestroyed(e); }
}
+ @Override
public void windowGainedFocus(WindowEvent e) {
System.err.println(e);
if(null!=downstream) { downstream.windowGainedFocus(e); }
}
+ @Override
public void windowLostFocus(WindowEvent e) {
System.err.println(e);
if(null!=downstream) { downstream.windowLostFocus(e); }
}
+ @Override
public void windowRepaint(WindowUpdateEvent e) {
System.err.println(e);
if(null!=downstream) { downstream.windowRepaint(e); }
diff --git a/src/newt/classes/com/jogamp/newt/event/WindowAdapter.java b/src/newt/classes/com/jogamp/newt/event/WindowAdapter.java
index e237c0d80..ccc627444 100644
--- a/src/newt/classes/com/jogamp/newt/event/WindowAdapter.java
+++ b/src/newt/classes/com/jogamp/newt/event/WindowAdapter.java
@@ -30,18 +30,25 @@ package com.jogamp.newt.event;
public abstract class WindowAdapter implements WindowListener
{
+ @Override
public void windowResized(WindowEvent e) {
}
+ @Override
public void windowMoved(WindowEvent e) {
}
+ @Override
public void windowDestroyNotify(WindowEvent e) {
}
+ @Override
public void windowDestroyed(WindowEvent e) {
}
+ @Override
public void windowGainedFocus(WindowEvent e) {
}
+ @Override
public void windowLostFocus(WindowEvent e) {
}
+ @Override
public void windowRepaint(WindowUpdateEvent e) {
}
}
diff --git a/src/newt/classes/com/jogamp/newt/event/WindowEvent.java b/src/newt/classes/com/jogamp/newt/event/WindowEvent.java
index 8c7abfe99..2841fd0f6 100644
--- a/src/newt/classes/com/jogamp/newt/event/WindowEvent.java
+++ b/src/newt/classes/com/jogamp/newt/event/WindowEvent.java
@@ -66,10 +66,12 @@ public class WindowEvent extends NEWTEvent {
}
}
+ @Override
public String toString() {
return toString(null).toString();
}
+ @Override
public StringBuilder toString(StringBuilder sb) {
if(null == sb) {
sb = new StringBuilder();
diff --git a/src/newt/classes/com/jogamp/newt/event/WindowUpdateEvent.java b/src/newt/classes/com/jogamp/newt/event/WindowUpdateEvent.java
index 8a204d234..9044517b5 100644
--- a/src/newt/classes/com/jogamp/newt/event/WindowUpdateEvent.java
+++ b/src/newt/classes/com/jogamp/newt/event/WindowUpdateEvent.java
@@ -44,10 +44,12 @@ public class WindowUpdateEvent extends WindowEvent {
return bounds;
}
+ @Override
public String toString() {
return toString(null).toString();
}
+ @Override
public StringBuilder toString(StringBuilder sb) {
if(null == sb) {
sb = new StringBuilder();
diff --git a/src/newt/classes/com/jogamp/newt/event/awt/AWTKeyAdapter.java b/src/newt/classes/com/jogamp/newt/event/awt/AWTKeyAdapter.java
index 1b53671ba..f6f11b81f 100644
--- a/src/newt/classes/com/jogamp/newt/event/awt/AWTKeyAdapter.java
+++ b/src/newt/classes/com/jogamp/newt/event/awt/AWTKeyAdapter.java
@@ -49,11 +49,13 @@ public class AWTKeyAdapter extends AWTAdapter implements java.awt.event.KeyListe
super(downstream);
}
+ @Override
public AWTAdapter addTo(java.awt.Component awtComponent) {
awtComponent.addKeyListener(this);
return this;
}
+ @Override
public AWTAdapter removeFrom(java.awt.Component awtComponent) {
awtComponent.removeKeyListener(this);
return this;
diff --git a/src/newt/classes/com/jogamp/newt/event/awt/AWTMouseAdapter.java b/src/newt/classes/com/jogamp/newt/event/awt/AWTMouseAdapter.java
index ab4bf7a3f..73a02c9fc 100644
--- a/src/newt/classes/com/jogamp/newt/event/awt/AWTMouseAdapter.java
+++ b/src/newt/classes/com/jogamp/newt/event/awt/AWTMouseAdapter.java
@@ -46,6 +46,7 @@ public class AWTMouseAdapter extends AWTAdapter implements java.awt.event.MouseL
super(downstream);
}
+ @Override
public AWTAdapter addTo(java.awt.Component awtComponent) {
awtComponent.addMouseListener(this);
awtComponent.addMouseMotionListener(this);
@@ -53,6 +54,7 @@ public class AWTMouseAdapter extends AWTAdapter implements java.awt.event.MouseL
return this;
}
+ @Override
public AWTAdapter removeFrom(java.awt.Component awtComponent) {
awtComponent.removeMouseListener(this);
awtComponent.removeMouseMotionListener(this);
@@ -60,6 +62,7 @@ public class AWTMouseAdapter extends AWTAdapter implements java.awt.event.MouseL
return this;
}
+ @Override
public void mouseClicked(java.awt.event.MouseEvent e) {
com.jogamp.newt.event.MouseEvent event = AWTNewtEventFactory.createMouseEvent(e, newtWindow);
if(null!=newtListener) {
@@ -69,6 +72,7 @@ public class AWTMouseAdapter extends AWTAdapter implements java.awt.event.MouseL
}
}
+ @Override
public void mouseEntered(java.awt.event.MouseEvent e) {
com.jogamp.newt.event.MouseEvent event = AWTNewtEventFactory.createMouseEvent(e, newtWindow);
if(null!=newtListener) {
@@ -78,6 +82,7 @@ public class AWTMouseAdapter extends AWTAdapter implements java.awt.event.MouseL
}
}
+ @Override
public void mouseExited(java.awt.event.MouseEvent e) {
com.jogamp.newt.event.MouseEvent event = AWTNewtEventFactory.createMouseEvent(e, newtWindow);
if(null!=newtListener) {
@@ -87,6 +92,7 @@ public class AWTMouseAdapter extends AWTAdapter implements java.awt.event.MouseL
}
}
+ @Override
public void mousePressed(java.awt.event.MouseEvent e) {
com.jogamp.newt.event.MouseEvent event = AWTNewtEventFactory.createMouseEvent(e, newtWindow);
if(null!=newtListener) {
@@ -96,6 +102,7 @@ public class AWTMouseAdapter extends AWTAdapter implements java.awt.event.MouseL
}
}
+ @Override
public void mouseReleased(java.awt.event.MouseEvent e) {
com.jogamp.newt.event.MouseEvent event = AWTNewtEventFactory.createMouseEvent(e, newtWindow);
if(null!=newtListener) {
@@ -105,6 +112,7 @@ public class AWTMouseAdapter extends AWTAdapter implements java.awt.event.MouseL
}
}
+ @Override
public void mouseDragged(java.awt.event.MouseEvent e) {
com.jogamp.newt.event.MouseEvent event = AWTNewtEventFactory.createMouseEvent(e, newtWindow);
if(null!=newtListener) {
@@ -114,6 +122,7 @@ public class AWTMouseAdapter extends AWTAdapter implements java.awt.event.MouseL
}
}
+ @Override
public void mouseMoved(java.awt.event.MouseEvent e) {
com.jogamp.newt.event.MouseEvent event = AWTNewtEventFactory.createMouseEvent(e, newtWindow);
if(null!=newtListener) {
@@ -123,6 +132,7 @@ public class AWTMouseAdapter extends AWTAdapter implements java.awt.event.MouseL
}
}
+ @Override
public void mouseWheelMoved(java.awt.event.MouseWheelEvent e) {
com.jogamp.newt.event.MouseEvent event = AWTNewtEventFactory.createMouseEvent(e, newtWindow);
if(null!=newtListener) {
diff --git a/src/newt/classes/com/jogamp/newt/event/awt/AWTWindowAdapter.java b/src/newt/classes/com/jogamp/newt/event/awt/AWTWindowAdapter.java
index 8c9781b77..8a9a2a49f 100644
--- a/src/newt/classes/com/jogamp/newt/event/awt/AWTWindowAdapter.java
+++ b/src/newt/classes/com/jogamp/newt/event/awt/AWTWindowAdapter.java
@@ -50,6 +50,7 @@ public class AWTWindowAdapter
super(downstream);
}
+ @Override
public AWTAdapter addTo(java.awt.Component awtComponent) {
java.awt.Window win = getWindow(awtComponent);
awtComponent.addComponentListener(this);
@@ -74,6 +75,7 @@ public class AWTWindowAdapter
return this;
}
+ @Override
public AWTAdapter removeFrom(java.awt.Component awtComponent) {
awtComponent.removeFocusListener(this);
awtComponent.removeComponentListener(this);
@@ -94,6 +96,7 @@ public class AWTWindowAdapter
return null;
}
+ @Override
public void focusGained(java.awt.event.FocusEvent e) {
com.jogamp.newt.event.WindowEvent event = AWTNewtEventFactory.createWindowEvent(e, newtWindow);
if(DEBUG_IMPLEMENTATION) {
@@ -106,6 +109,7 @@ public class AWTWindowAdapter
}
}
+ @Override
public void focusLost(java.awt.event.FocusEvent e) {
com.jogamp.newt.event.WindowEvent event = AWTNewtEventFactory.createWindowEvent(e, newtWindow);
if(DEBUG_IMPLEMENTATION) {
@@ -118,6 +122,7 @@ public class AWTWindowAdapter
}
}
+ @Override
public void componentResized(java.awt.event.ComponentEvent e) {
com.jogamp.newt.event.WindowEvent event = AWTNewtEventFactory.createWindowEvent(e, newtWindow);
if(DEBUG_IMPLEMENTATION) {
@@ -142,6 +147,7 @@ public class AWTWindowAdapter
}
}
+ @Override
public void componentMoved(java.awt.event.ComponentEvent e) {
com.jogamp.newt.event.WindowEvent event = AWTNewtEventFactory.createWindowEvent(e, newtWindow);
if(DEBUG_IMPLEMENTATION) {
@@ -154,6 +160,7 @@ public class AWTWindowAdapter
}
}
+ @Override
public void componentShown(java.awt.event.ComponentEvent e) {
final java.awt.Component comp = e.getComponent();
if(DEBUG_IMPLEMENTATION) {
@@ -171,6 +178,7 @@ public class AWTWindowAdapter
}*/
}
+ @Override
public void componentHidden(java.awt.event.ComponentEvent e) {
final java.awt.Component comp = e.getComponent();
if(DEBUG_IMPLEMENTATION) {
@@ -188,6 +196,7 @@ public class AWTWindowAdapter
}*/
}
+ @Override
public void windowActivated(java.awt.event.WindowEvent e) {
com.jogamp.newt.event.WindowEvent event = AWTNewtEventFactory.createWindowEvent(e, newtWindow);
if(null!=newtListener) {
@@ -197,10 +206,13 @@ public class AWTWindowAdapter
}
}
+ @Override
public void windowClosed(java.awt.event.WindowEvent e) { }
+ @Override
public void windowClosing(java.awt.event.WindowEvent e) { }
+ @Override
public void windowDeactivated(java.awt.event.WindowEvent e) {
com.jogamp.newt.event.WindowEvent event = AWTNewtEventFactory.createWindowEvent(e, newtWindow);
if(null!=newtListener) {
@@ -210,13 +222,17 @@ public class AWTWindowAdapter
}
}
+ @Override
public void windowDeiconified(java.awt.event.WindowEvent e) { }
+ @Override
public void windowIconified(java.awt.event.WindowEvent e) { }
+ @Override
public void windowOpened(java.awt.event.WindowEvent e) { }
class WindowClosingListener implements java.awt.event.WindowListener {
+ @Override
public void windowClosing(java.awt.event.WindowEvent e) {
com.jogamp.newt.event.WindowEvent event = AWTNewtEventFactory.createWindowEvent(e, newtWindow);
if(null!=newtListener) {
@@ -225,6 +241,7 @@ public class AWTWindowAdapter
enqueueEvent(true, event);
}
}
+ @Override
public void windowClosed(java.awt.event.WindowEvent e) {
com.jogamp.newt.event.WindowEvent event = AWTNewtEventFactory.createWindowEvent(e, newtWindow);
if(null!=newtListener) {
@@ -234,10 +251,15 @@ public class AWTWindowAdapter
}
}
+ @Override
public void windowActivated(java.awt.event.WindowEvent e) { }
+ @Override
public void windowDeactivated(java.awt.event.WindowEvent e) { }
+ @Override
public void windowDeiconified(java.awt.event.WindowEvent e) { }
+ @Override
public void windowIconified(java.awt.event.WindowEvent e) { }
+ @Override
public void windowOpened(java.awt.event.WindowEvent e) { }
}
}
diff --git a/src/newt/classes/com/jogamp/newt/opengl/GLWindow.java b/src/newt/classes/com/jogamp/newt/opengl/GLWindow.java
index ac81e8469..8c1110ed3 100644
--- a/src/newt/classes/com/jogamp/newt/opengl/GLWindow.java
+++ b/src/newt/classes/com/jogamp/newt/opengl/GLWindow.java
@@ -117,6 +117,7 @@ public class GLWindow extends GLAutoDrawableBase implements GLAutoDrawable, Wind
super(null, null, false /* always handle device lifecycle ourselves */);
this.window = (WindowImpl) window;
this.window.setWindowDestroyNotifyAction( new Runnable() {
+ @Override
public void run() {
defaultWindowDestroyNotifyOp();
} } );
@@ -549,6 +550,7 @@ public class GLWindow extends GLAutoDrawableBase implements GLAutoDrawable, Wind
anim.stop(); // on anim thread, non-blocking
} else {
AccessController.doPrivileged(new PrivilegedAction<Object>() {
+ @Override
public Object run() {
if( anim.isAnimating() && null != animThread ) {
try {
diff --git a/src/newt/classes/com/jogamp/newt/swt/NewtCanvasSWT.java b/src/newt/classes/com/jogamp/newt/swt/NewtCanvasSWT.java
index a25b43777..e63a53524 100644
--- a/src/newt/classes/com/jogamp/newt/swt/NewtCanvasSWT.java
+++ b/src/newt/classes/com/jogamp/newt/swt/NewtCanvasSWT.java
@@ -99,6 +99,7 @@ public class NewtCanvasSWT extends Canvas implements WindowClosingProtocol {
public static NewtCanvasSWT create(final Composite parent, final int style, final Window child) {
final NewtCanvasSWT[] res = new NewtCanvasSWT[] { null };
parent.getDisplay().syncExec( new Runnable() {
+ @Override
public void run() {
res[0] = new NewtCanvasSWT( parent, style, child);
}
@@ -254,10 +255,12 @@ public class NewtCanvasSWT extends Canvas implements WindowClosingProtocol {
/** @return this SWT Canvas NativeWindow representation, may be null in case it has not been realized. */
public NativeWindow getNativeWindow() { return nativeWindow; }
+ @Override
public WindowClosingMode getDefaultCloseOperation() {
return newtChildCloseOp; // TODO: implement ?!
}
+ @Override
public WindowClosingMode setDefaultCloseOperation(WindowClosingMode op) {
return newtChildCloseOp = op; // TODO: implement ?!
}