From 43dd50a8545f8fde8198091b136aece6f062cb38 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Wed, 4 Dec 2019 19:44:00 +0100 Subject: Bug 1406: demos.Launcher0: More code path reduction: useMultiplePointerIcon must be enabled via -pointerIcon --- .../com/jogamp/newt/opengl/util/NEWTDemoListener.java | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'src/newt/classes/com/jogamp') diff --git a/src/newt/classes/com/jogamp/newt/opengl/util/NEWTDemoListener.java b/src/newt/classes/com/jogamp/newt/opengl/util/NEWTDemoListener.java index 568b5d0bb..6c07b3626 100644 --- a/src/newt/classes/com/jogamp/newt/opengl/util/NEWTDemoListener.java +++ b/src/newt/classes/com/jogamp/newt/opengl/util/NEWTDemoListener.java @@ -88,16 +88,21 @@ public class NEWTDemoListener extends WindowAdapter implements KeyListener, Mous float contrast = 1f; boolean confinedFixedCenter = false; + /** + * Creates a new instance with given pointer icons, which are not used if {@code null}. + * @param glWin the GLWindow instance to use + * @param pointerIcons if {@code null} don't use multiple pointer icons + */ public NEWTDemoListener(final GLWindow glWin, final PointerIcon[] pointerIcons) { this.glWindow = glWin; - if( null != pointerIcons ) { - this.pointerIcons = pointerIcons; - } else { - this.pointerIcons = createPointerIcons(glWindow.getScreen().getDisplay()); - } + this.pointerIcons = pointerIcons; } + /** + * Creates a new instance with {@link #createPointerIcons(Display)} default pointer icons. + * @param glWin the GLWindow instance to use + */ public NEWTDemoListener(final GLWindow glWin) { - this(glWin, null); + this(glWin, createPointerIcons(glWin.getScreen().getDisplay())); } protected void printlnState(final String prelude) { -- cgit v1.2.3