From 5deabf720f1101b39376cb211c39f6f0c3474153 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Wed, 1 Apr 2015 16:00:20 +0200 Subject: Bug 1153 - Adopt to ArrayHashSet change, don't use deprecated ctor (gluegen commit c156343fec33ceea7f238b9766a9f4985fb92687) --- src/newt/classes/jogamp/newt/MonitorModeProps.java | 12 ++++++------ src/newt/classes/jogamp/newt/WindowImpl.java | 2 +- src/newt/classes/jogamp/newt/driver/macosx/ScreenDriver.java | 3 ++- .../classes/jogamp/newt/driver/windows/ScreenDriver.java | 5 +++-- src/newt/classes/jogamp/newt/driver/x11/ScreenDriver.java | 2 +- 5 files changed, 13 insertions(+), 11 deletions(-) (limited to 'src/newt') diff --git a/src/newt/classes/jogamp/newt/MonitorModeProps.java b/src/newt/classes/jogamp/newt/MonitorModeProps.java index 4e2806118..eabb6be01 100644 --- a/src/newt/classes/jogamp/newt/MonitorModeProps.java +++ b/src/newt/classes/jogamp/newt/MonitorModeProps.java @@ -158,11 +158,11 @@ public class MonitorModeProps { ; public static class Cache { - public final ArrayHashSet resolutions = new ArrayHashSet(); - public final ArrayHashSet surfaceSizes = new ArrayHashSet(); - public final ArrayHashSet sizeAndRates = new ArrayHashSet(); - public final ArrayHashSet monitorModes = new ArrayHashSet(); - public final ArrayHashSet monitorDevices = new ArrayHashSet(); + public final ArrayHashSet resolutions = new ArrayHashSet(false, ArrayHashSet.DEFAULT_INITIAL_CAPACITY, ArrayHashSet.DEFAULT_LOAD_FACTOR); + public final ArrayHashSet surfaceSizes = new ArrayHashSet(false, ArrayHashSet.DEFAULT_INITIAL_CAPACITY, ArrayHashSet.DEFAULT_LOAD_FACTOR); + public final ArrayHashSet sizeAndRates = new ArrayHashSet(false, ArrayHashSet.DEFAULT_INITIAL_CAPACITY, ArrayHashSet.DEFAULT_LOAD_FACTOR); + public final ArrayHashSet monitorModes = new ArrayHashSet(false, ArrayHashSet.DEFAULT_INITIAL_CAPACITY, ArrayHashSet.DEFAULT_LOAD_FACTOR); + public final ArrayHashSet monitorDevices = new ArrayHashSet(false, ArrayHashSet.DEFAULT_INITIAL_CAPACITY, ArrayHashSet.DEFAULT_LOAD_FACTOR); public final void setPrimary(final MonitorDevice p) { primary = p; } public final MonitorDevice getPrimary() { return primary;} @@ -308,7 +308,7 @@ public class MonitorModeProps { final int rotation = monitorProperties[offset++]; currentMode = getByNativeIdAndRotation(allMonitorModes, modeId, rotation); } - final ArrayHashSet supportedModes = new ArrayHashSet(); + final ArrayHashSet supportedModes = new ArrayHashSet(false, ArrayHashSet.DEFAULT_INITIAL_CAPACITY, ArrayHashSet.DEFAULT_LOAD_FACTOR); while( offset < limit ) { final int modeId = monitorProperties[offset++]; for (int i=0; i pointer ID (consecutive index, starting w/ 0) */ - private final ArrayHashSet pName2pID = new ArrayHashSet(); + private final ArrayHashSet pName2pID = new ArrayHashSet(false, ArrayHashSet.DEFAULT_INITIAL_CAPACITY, ArrayHashSet.DEFAULT_LOAD_FACTOR); private boolean defaultGestureHandlerEnabled = true; private DoubleTapScrollGesture gesture2PtrTouchScroll = null; diff --git a/src/newt/classes/jogamp/newt/driver/macosx/ScreenDriver.java b/src/newt/classes/jogamp/newt/driver/macosx/ScreenDriver.java index 1389692fc..ddeea265a 100644 --- a/src/newt/classes/jogamp/newt/driver/macosx/ScreenDriver.java +++ b/src/newt/classes/jogamp/newt/driver/macosx/ScreenDriver.java @@ -155,7 +155,8 @@ public class ScreenDriver extends ScreenImpl { // for(int crtIdx=0; crtIdx supportedModes = new ArrayHashSet(); + final ArrayHashSet supportedModes = + new ArrayHashSet(false, ArrayHashSet.DEFAULT_INITIAL_CAPACITY, ArrayHashSet.DEFAULT_LOAD_FACTOR); int modeIdx = 0; { // Get all supported modes for this monitorDevice diff --git a/src/newt/classes/jogamp/newt/driver/windows/ScreenDriver.java b/src/newt/classes/jogamp/newt/driver/windows/ScreenDriver.java index ea3e76eb3..dfdb8b155 100644 --- a/src/newt/classes/jogamp/newt/driver/windows/ScreenDriver.java +++ b/src/newt/classes/jogamp/newt/driver/windows/ScreenDriver.java @@ -101,7 +101,8 @@ public class ScreenDriver extends ScreenImpl { @Override protected void collectNativeMonitorModesAndDevicesImpl(final MonitorModeProps.Cache cache) { - ArrayHashSet supportedModes = new ArrayHashSet(); + ArrayHashSet supportedModes = + new ArrayHashSet(false, ArrayHashSet.DEFAULT_INITIAL_CAPACITY, ArrayHashSet.DEFAULT_LOAD_FACTOR); String adapterName; for(int adapterIdx=0; null != ( adapterName = getAdapterName(adapterIdx) ); adapterIdx++ ) { for(int monitorIdx=0; null != getMonitorName(adapterName, monitorIdx, true); monitorIdx++ ) { @@ -124,7 +125,7 @@ public class ScreenDriver extends ScreenImpl { MonitorModeProps.streamInMonitorDevice(cache, this, currentMode, null, supportedModes, monitorProps, 0, null); // next monitor, 1st mode - supportedModes = new ArrayHashSet(); + supportedModes = new ArrayHashSet(false, ArrayHashSet.DEFAULT_INITIAL_CAPACITY, ArrayHashSet.DEFAULT_LOAD_FACTOR); } } } diff --git a/src/newt/classes/jogamp/newt/driver/x11/ScreenDriver.java b/src/newt/classes/jogamp/newt/driver/x11/ScreenDriver.java index 2dc416063..517d229b7 100644 --- a/src/newt/classes/jogamp/newt/driver/x11/ScreenDriver.java +++ b/src/newt/classes/jogamp/newt/driver/x11/ScreenDriver.java @@ -124,7 +124,7 @@ public class ScreenDriver extends ScreenImpl { final int crtCount = crt_ids.length; // Gather all available rotations - final ArrayHashSet availableRotations = new ArrayHashSet(); + final ArrayHashSet availableRotations = new ArrayHashSet(false, ArrayHashSet.DEFAULT_INITIAL_CAPACITY, ArrayHashSet.DEFAULT_LOAD_FACTOR); for(int i = 0; i < crtCount; i++) { final int[] rotations = rAndR.getAvailableRotations(device.getHandle(), this, crt_ids[i]); if( null != rotations ) { -- cgit v1.2.3