aboutsummaryrefslogtreecommitdiffstats
path: root/ardor3d-awt/src/main/java/com/ardor3d
diff options
context:
space:
mode:
authorJulien Gouesse <[email protected]>2016-06-30 22:36:24 +0200
committerJulien Gouesse <[email protected]>2016-06-30 22:36:24 +0200
commitced8e5e5a3439630b51a5aef53ef5dfbde69eb95 (patch)
treed09e41e49f4ad4a172a2cb4760d373aead49d4eb /ardor3d-awt/src/main/java/com/ardor3d
parent1257dbbf93986d1c2f21c0b1758efd8ffd110cf5 (diff)
Switches from Java 1.6 to Java 1.7 and fixes numerous warnings
Diffstat (limited to 'ardor3d-awt/src/main/java/com/ardor3d')
-rw-r--r--ardor3d-awt/src/main/java/com/ardor3d/image/util/awt/AWTImageLoader.java2
-rw-r--r--ardor3d-awt/src/main/java/com/ardor3d/image/util/awt/AWTImageUtil.java2
-rw-r--r--ardor3d-awt/src/main/java/com/ardor3d/image/util/awt/AWTTextureUtil.java8
-rw-r--r--ardor3d-awt/src/main/java/com/ardor3d/input/awt/AwtKeyboardWrapper.java2
-rw-r--r--ardor3d-awt/src/main/java/com/ardor3d/input/awt/AwtMouseWrapper.java4
5 files changed, 9 insertions, 9 deletions
diff --git a/ardor3d-awt/src/main/java/com/ardor3d/image/util/awt/AWTImageLoader.java b/ardor3d-awt/src/main/java/com/ardor3d/image/util/awt/AWTImageLoader.java
index 34f0991..22728ac 100644
--- a/ardor3d-awt/src/main/java/com/ardor3d/image/util/awt/AWTImageLoader.java
+++ b/ardor3d-awt/src/main/java/com/ardor3d/image/util/awt/AWTImageLoader.java
@@ -49,7 +49,7 @@ public class AWTImageLoader implements ImageLoader {
public static void registerLoader() {
if (supportedFormats == null) {
- final List<String> formats = new ArrayList<String>();
+ final List<String> formats = new ArrayList<>();
for (String format : ImageIO.getReaderFormatNames()) {
format = "." + format.toUpperCase();
if (!formats.contains(format)) {
diff --git a/ardor3d-awt/src/main/java/com/ardor3d/image/util/awt/AWTImageUtil.java b/ardor3d-awt/src/main/java/com/ardor3d/image/util/awt/AWTImageUtil.java
index 076def2..6bfac79 100644
--- a/ardor3d-awt/src/main/java/com/ardor3d/image/util/awt/AWTImageUtil.java
+++ b/ardor3d-awt/src/main/java/com/ardor3d/image/util/awt/AWTImageUtil.java
@@ -63,7 +63,7 @@ public abstract class AWTImageUtil {
final int width = input.getWidth(), height = input.getHeight();
// create our return list
- final List<BufferedImage> rVal = new ArrayList<BufferedImage>();
+ final List<BufferedImage> rVal = new ArrayList<>();
// Calculate our modulation or "tint" values per channel
final double tRed = tint != null ? tint.getRed() / 255. : 1.0;
diff --git a/ardor3d-awt/src/main/java/com/ardor3d/image/util/awt/AWTTextureUtil.java b/ardor3d-awt/src/main/java/com/ardor3d/image/util/awt/AWTTextureUtil.java
index 76f1447..2edc166 100644
--- a/ardor3d-awt/src/main/java/com/ardor3d/image/util/awt/AWTTextureUtil.java
+++ b/ardor3d-awt/src/main/java/com/ardor3d/image/util/awt/AWTTextureUtil.java
@@ -3,7 +3,7 @@
*
* This file is part of Ardor3D.
*
- * Ardor3D is free software: you can redistribute it and/or modify it
+ * Ardor3D is free software: you can redistribute it and/or modify it
* under the terms of its license which may be found in the accompanying
* LICENSE file or at <http://www.ardor3d.com/LICENSE>.
*/
@@ -22,7 +22,7 @@ public abstract class AWTTextureUtil {
/**
* Convenience Utility for loading a BufferedImage as an Ardor3D Texture.
- *
+ *
* @param image
* our buffered image
* @param minFilter
@@ -36,8 +36,8 @@ public abstract class AWTTextureUtil {
public static final Texture loadTexture(final BufferedImage image, final Texture.MinificationFilter minFilter,
final TextureStoreFormat storeFormat, final boolean flipVertically) {
final Image imageData = AWTImageLoader.makeArdor3dImage(image, flipVertically);
- final String fileType = (image != null) ? "" + image.hashCode() : null;
- final TextureKey tkey = TextureKey.getKey(null, flipVertically, storeFormat, fileType, minFilter);
+ final String imageId = (image != null) ? "" + image.hashCode() : null;
+ final TextureKey tkey = TextureKey.getKey(null, flipVertically, storeFormat, imageId, minFilter);
return TextureManager.loadFromKey(tkey, imageData, null);
}
}
diff --git a/ardor3d-awt/src/main/java/com/ardor3d/input/awt/AwtKeyboardWrapper.java b/ardor3d-awt/src/main/java/com/ardor3d/input/awt/AwtKeyboardWrapper.java
index 1b58724..964be26 100644
--- a/ardor3d-awt/src/main/java/com/ardor3d/input/awt/AwtKeyboardWrapper.java
+++ b/ardor3d-awt/src/main/java/com/ardor3d/input/awt/AwtKeyboardWrapper.java
@@ -31,7 +31,7 @@ import com.google.common.collect.PeekingIterator;
*/
public class AwtKeyboardWrapper implements KeyboardWrapper, KeyListener {
@GuardedBy("this")
- protected final LinkedList<KeyEvent> _upcomingEvents = new LinkedList<KeyEvent>();
+ protected final LinkedList<KeyEvent> _upcomingEvents = new LinkedList<>();
@GuardedBy("this")
protected AwtKeyboardIterator _currentIterator = null;
diff --git a/ardor3d-awt/src/main/java/com/ardor3d/input/awt/AwtMouseWrapper.java b/ardor3d-awt/src/main/java/com/ardor3d/input/awt/AwtMouseWrapper.java
index c158cca..d722999 100644
--- a/ardor3d-awt/src/main/java/com/ardor3d/input/awt/AwtMouseWrapper.java
+++ b/ardor3d-awt/src/main/java/com/ardor3d/input/awt/AwtMouseWrapper.java
@@ -40,7 +40,7 @@ import com.google.common.collect.PeekingIterator;
*/
public class AwtMouseWrapper implements MouseWrapper, MouseListener, MouseWheelListener, MouseMotionListener {
@GuardedBy("this")
- protected final LinkedList<MouseState> _upcomingEvents = new LinkedList<MouseState>();
+ protected final LinkedList<MouseState> _upcomingEvents = new LinkedList<>();
@GuardedBy("this")
protected AwtMouseIterator _currentIterator = null;
@@ -55,7 +55,7 @@ public class AwtMouseWrapper implements MouseWrapper, MouseListener, MouseWheelL
protected final MouseManager _manager;
protected final Multiset<MouseButton> _clicks = EnumMultiset.create(MouseButton.class);
- protected final EnumMap<MouseButton, Long> _lastClickTime = new EnumMap<MouseButton, Long>(MouseButton.class);
+ protected final EnumMap<MouseButton, Long> _lastClickTime = new EnumMap<>(MouseButton.class);
protected final EnumSet<MouseButton> _clickArmed = EnumSet.noneOf(MouseButton.class);
protected int _ignoreX = Integer.MAX_VALUE;