From 56bd8f3007005ecbf31a19b6a02788b33910c90b Mon Sep 17 00:00:00 2001
From: Sven Gothel
vKey
is a {@link #isModifierKey() modifier key}, method returns the corresponding modifier mask,
* otherwise 0.
*/
- public static int getModifierMask(short vKey) {
+ public static int getModifierMask(final short vKey) {
switch (vKey) {
case VK_SHIFT:
return InputEvent.SHIFT_MASK;
diff --git a/src/newt/classes/com/jogamp/newt/event/MonitorEvent.java b/src/newt/classes/com/jogamp/newt/event/MonitorEvent.java
index 03242e147..2e42f3392 100644
--- a/src/newt/classes/com/jogamp/newt/event/MonitorEvent.java
+++ b/src/newt/classes/com/jogamp/newt/event/MonitorEvent.java
@@ -38,7 +38,7 @@ public class MonitorEvent extends OutputEvent {
private final MonitorMode mode;
- public MonitorEvent (short eventType, MonitorDevice source, long when, MonitorMode mode) {
+ public MonitorEvent (final short eventType, final MonitorDevice source, final long when, final MonitorMode mode) {
super(eventType, source, when);
this.mode = mode;
}
@@ -48,7 +48,7 @@ public class MonitorEvent extends OutputEvent {
public final MonitorMode getMode() { return mode; }
- public static String getEventTypeString(short type) {
+ public static String getEventTypeString(final short type) {
switch(type) {
case EVENT_MONITOR_MODE_CHANGE_NOTIFY: return "EVENT_MONITOR_MODE_CHANGE_NOTIFY";
case EVENT_MONITOR_MODE_CHANGED: return "EVENT_MONITOR_MODE_CHANGED";
diff --git a/src/newt/classes/com/jogamp/newt/event/MouseEvent.java b/src/newt/classes/com/jogamp/newt/event/MouseEvent.java
index 272e4beb0..84c78727e 100644
--- a/src/newt/classes/com/jogamp/newt/event/MouseEvent.java
+++ b/src/newt/classes/com/jogamp/newt/event/MouseEvent.java
@@ -101,7 +101,7 @@ public class MouseEvent extends InputEvent
*
* @throws IllegalArgumentException if the given ordinal is out of range, i.e. not within [ 0 .. PointerType.values().length-1 ]
*/
- public static PointerType valueOf(int ordinal) throws IllegalArgumentException {
+ public static PointerType valueOf(final int ordinal) throws IllegalArgumentException {
final PointerType[] all = PointerType.values();
if( 0 <= ordinal && ordinal < all.length ) {
return all[ordinal];
@@ -116,7 +116,7 @@ public class MouseEvent extends InputEvent
*
* @throws IllegalArgumentException if one of the given ordinal values is out of range, i.e. not within [ 0 .. PointerType.values().length-1 ]
*/
- public static PointerType[] valuesOf(int[] ordinals) throws IllegalArgumentException {
+ public static PointerType[] valuesOf(final int[] ordinals) throws IllegalArgumentException {
final int count = ordinals.length;
final PointerType[] types = new PointerType[count];
for(int i=count-1; i>=0; i--) {
@@ -189,9 +189,9 @@ public class MouseEvent extends InputEvent
* @param rotationXYZ Rotation of all axis
* @param rotationScale Rotation scale
*/
- public MouseEvent(short eventType, Object source, long when,
- int modifiers, int x, int y, short clickCount, short button,
- float[] rotationXYZ, float rotationScale)
+ public MouseEvent(final short eventType, final Object source, final long when,
+ final int modifiers, final int x, final int y, final short clickCount, final short button,
+ final float[] rotationXYZ, final float rotationScale)
{
super(eventType, source, when, modifiers);
this.x = new int[]{x};
@@ -239,10 +239,10 @@ public class MouseEvent extends InputEvent
* @param rotationXYZ Rotation of all axis
* @param rotationScale Rotation scale
*/
- public MouseEvent(short eventType, Object source, long when, int modifiers,
- PointerType pointerType[], short[] pointerID,
- int[] x, int[] y, float[] pressure, float maxPressure,
- short button, short clickCount, float[] rotationXYZ, float rotationScale)
+ public MouseEvent(final short eventType, final Object source, final long when, final int modifiers,
+ final PointerType pointerType[], final short[] pointerID,
+ final int[] x, final int[] y, final float[] pressure, final float maxPressure,
+ final short button, final short clickCount, final float[] rotationXYZ, final float rotationScale)
{
super(eventType, source, when, modifiers);
this.x = x;
@@ -267,7 +267,7 @@ public class MouseEvent extends InputEvent
this.pointerType = pointerType;
}
- public MouseEvent createVariant(short newEventType) {
+ public final MouseEvent createVariant(final short newEventType) {
return new MouseEvent(newEventType, source, getWhen(), getModifiers(), pointerType, pointerID,
x, y, pressure, maxPressure, button, clickCount, rotationXYZ, rotationScale);
}
@@ -284,7 +284,7 @@ public class MouseEvent extends InputEvent
* See details for multiple-pointer events.
* @return the {@link PointerType} for the data at index or null if index not available.
*/
- public final PointerType getPointerType(int index) {
+ public final PointerType getPointerType(final int index) {
if(0 > index || index >= pointerType.length) {
return null;
}
@@ -311,7 +311,7 @@ public class MouseEvent extends InputEvent
* See details for multiple-pointer events.
*
*/
- public final short getPointerId(int index) {
+ public final short getPointerId(final int index) {
if(0 > index || index >= pointerID.length) {
return -1;
}
@@ -322,7 +322,7 @@ public class MouseEvent extends InputEvent
* See details for multiple-pointer events.
* @return the pointer index for the given pointer id or -1 if id not available.
*/
- public final int getPointerIdx(short id) {
+ public final int getPointerIdx(final short id) {
if( id >= 0 ) {
for(int i=pointerID.length-1; i>=0; i--) {
if( pointerID[i] == id ) {
@@ -372,7 +372,7 @@ public class MouseEvent extends InputEvent
* @return X-Coord associated with the pointer-index.
* @see getPointerId(index)
*/
- public final int getX(int index) {
+ public final int getX(final int index) {
return x[index];
}
@@ -382,7 +382,7 @@ public class MouseEvent extends InputEvent
* @return Y-Coord associated with the pointer-index.
* @see getPointerId(index)
*/
- public final int getY(int index) {
+ public final int getY(final int index) {
return y[index];
}
@@ -408,7 +408,7 @@ public class MouseEvent extends InputEvent
* The value of zero is return if not available.
* @see #getMaxPressure()
*/
- public final float getPressure(boolean normalized){
+ public final float getPressure(final boolean normalized){
return normalized ? pressure[0] / maxPressure : pressure[0];
}
@@ -420,7 +420,7 @@ public class MouseEvent extends InputEvent
* The value of zero is return if not available.
* @see #getMaxPressure()
*/
- public final float getPressure(int index, boolean normalized){
+ public final float getPressure(final int index, final boolean normalized){
return normalized ? pressure[index] / maxPressure : pressure[index];
}
@@ -540,7 +540,7 @@ public class MouseEvent extends InputEvent
return super.toString(sb).append("]");
}
- public static String getEventTypeString(short type) {
+ public static String getEventTypeString(final short type) {
switch(type) {
case EVENT_MOUSE_CLICKED: return "EVENT_MOUSE_CLICKED";
case EVENT_MOUSE_ENTERED: return "EVENT_MOUSE_ENTERED";
diff --git a/src/newt/classes/com/jogamp/newt/event/NEWTEvent.java b/src/newt/classes/com/jogamp/newt/event/NEWTEvent.java
index af800e61e..78bb7420a 100644
--- a/src/newt/classes/com/jogamp/newt/event/NEWTEvent.java
+++ b/src/newt/classes/com/jogamp/newt/event/NEWTEvent.java
@@ -61,7 +61,7 @@ public class NEWTEvent extends java.util.EventObject {
static final boolean DEBUG = false;
- protected NEWTEvent(short eventType, Object source, long when) {
+ protected NEWTEvent(final short eventType, final Object source, final long when) {
super(source);
this.eventType = eventType;
this.when = when;
@@ -86,7 +86,7 @@ public class NEWTEvent extends java.util.EventObject {
* communication.
* @param attachment User application specific object
*/
- public final void setAttachment(Object attachment) {
+ public final void setAttachment(final Object attachment) {
this.attachment = attachment;
}
@@ -123,7 +123,7 @@ public class NEWTEvent extends java.util.EventObject {
*
*
*/
- public final void setConsumed(boolean consumed) {
+ public final void setConsumed(final boolean consumed) {
if( consumed ) {
setAttachment( consumedTag );
} else if( consumedTag == attachment ) {
@@ -144,6 +144,6 @@ public class NEWTEvent extends java.util.EventObject {
}
public static String toHexString(short hex) {
- return "0x" + Integer.toHexString( (int)hex & 0x0000FFFF );
+ return "0x" + Integer.toHexString( hex & 0x0000FFFF );
}
}
diff --git a/src/newt/classes/com/jogamp/newt/event/OutputEvent.java b/src/newt/classes/com/jogamp/newt/event/OutputEvent.java
index 80c7780f8..bd3a11a13 100644
--- a/src/newt/classes/com/jogamp/newt/event/OutputEvent.java
+++ b/src/newt/classes/com/jogamp/newt/event/OutputEvent.java
@@ -31,7 +31,7 @@ package com.jogamp.newt.event;
@SuppressWarnings("serial")
public abstract class OutputEvent extends NEWTEvent
{
- protected OutputEvent(short eventType, Object source, long when) {
+ protected OutputEvent(final short eventType, final Object source, final long when) {
super(eventType, source, when);
}
diff --git a/src/newt/classes/com/jogamp/newt/event/WindowEvent.java b/src/newt/classes/com/jogamp/newt/event/WindowEvent.java
index 2841fd0f6..021bd6cae 100644
--- a/src/newt/classes/com/jogamp/newt/event/WindowEvent.java
+++ b/src/newt/classes/com/jogamp/newt/event/WindowEvent.java
@@ -49,11 +49,11 @@ public class WindowEvent extends NEWTEvent {
public static final short EVENT_WINDOW_REPAINT = 105;
public static final short EVENT_WINDOW_DESTROYED = 106;
- public WindowEvent(short eventType, Object source, long when) {
+ public WindowEvent(final short eventType, final Object source, final long when) {
super(eventType, source, when);
}
- public static String getEventTypeString(short type) {
+ public static String getEventTypeString(final short type) {
switch(type) {
case EVENT_WINDOW_RESIZED: return "WINDOW_RESIZED";
case EVENT_WINDOW_MOVED: return "WINDOW_MOVED";
diff --git a/src/newt/classes/com/jogamp/newt/event/WindowUpdateEvent.java b/src/newt/classes/com/jogamp/newt/event/WindowUpdateEvent.java
index 9044517b5..4a5fecd83 100644
--- a/src/newt/classes/com/jogamp/newt/event/WindowUpdateEvent.java
+++ b/src/newt/classes/com/jogamp/newt/event/WindowUpdateEvent.java
@@ -34,7 +34,7 @@ import javax.media.nativewindow.util.Rectangle;
public class WindowUpdateEvent extends WindowEvent {
final Rectangle bounds;
- public WindowUpdateEvent(short eventType, Object source, long when, Rectangle bounds)
+ public WindowUpdateEvent(final short eventType, final Object source, final long when, final Rectangle bounds)
{
super(eventType, source, when);
this.bounds = bounds;
--
cgit v1.2.3