From 35ce176152b7d1e6d4eb52f203882fdce4b465c3 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Wed, 6 Nov 2013 07:09:01 +0100 Subject: NativeWindow *GraphicsDevice: Align constructors to simplify call hierarchy for analysis. --- .../media/nativewindow/DefaultGraphicsDevice.java | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) (limited to 'src/nativewindow/classes/javax') diff --git a/src/nativewindow/classes/javax/media/nativewindow/DefaultGraphicsDevice.java b/src/nativewindow/classes/javax/media/nativewindow/DefaultGraphicsDevice.java index d74954a0d..f916a8ef3 100644 --- a/src/nativewindow/classes/javax/media/nativewindow/DefaultGraphicsDevice.java +++ b/src/nativewindow/classes/javax/media/nativewindow/DefaultGraphicsDevice.java @@ -50,12 +50,7 @@ public class DefaultGraphicsDevice implements Cloneable, AbstractGraphicsDevice * @param type */ public DefaultGraphicsDevice(String type, String connection, int unitID) { - this.type = type; - this.connection = connection; - this.unitID = unitID; - this.uniqueID = getUniqueID(type, connection, unitID); - this.handle = 0; - this.toolkitLock = NativeWindowFactory.getDefaultToolkitLock(type); + this(type, connection, unitID, 0, NativeWindowFactory.getDefaultToolkitLock(type)); } /** @@ -65,19 +60,14 @@ public class DefaultGraphicsDevice implements Cloneable, AbstractGraphicsDevice * @param handle */ public DefaultGraphicsDevice(String type, String connection, int unitID, long handle) { - this.type = type; - this.connection = connection; - this.unitID = unitID; - this.uniqueID = getUniqueID(type, connection, unitID); - this.handle = handle; - this.toolkitLock = NativeWindowFactory.getDefaultToolkitLock(type, handle); + this(type, connection, unitID, handle, NativeWindowFactory.getDefaultToolkitLock(type, handle)); } /** - * Create an instance with the given {@link ToolkitLock} instance. + * Create an instance with the given {@link ToolkitLock} instance, or null {@link ToolkitLock} if null. * @param type * @param handle - * @param locker + * @param locker if null, a non blocking null lock is used. */ public DefaultGraphicsDevice(String type, String connection, int unitID, long handle, ToolkitLock locker) { this.type = type; -- cgit v1.2.3