From 5a661f4736c6d2e42b7114004a4dcbca3fe3f7a2 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Thu, 30 Jan 2014 04:50:17 +0100 Subject: NEWT Window: Add API Doc for Custom Window Icons --- src/newt/classes/com/jogamp/newt/NewtFactory.java | 1 + src/newt/classes/com/jogamp/newt/Window.java | 15 +++++++++++++++ 2 files changed, 16 insertions(+) (limited to 'src/newt/classes/com') diff --git a/src/newt/classes/com/jogamp/newt/NewtFactory.java b/src/newt/classes/com/jogamp/newt/NewtFactory.java index 92339ea73..4fec00525 100644 --- a/src/newt/classes/com/jogamp/newt/NewtFactory.java +++ b/src/newt/classes/com/jogamp/newt/NewtFactory.java @@ -65,6 +65,7 @@ public class NewtFactory { public Object run() { NativeWindowFactory.initSingleton(); // last resort .. { + /** See API Doc in {@link Window} ! */ final String[] paths = Debug.getProperty("newt.window.icons", true, "newt/data/jogamp-16x16.png newt/data/jogamp-32x32.png").split("\\s"); if( paths.length < 2 ) { throw new IllegalArgumentException("Property 'newt.window.icons' did not specify at least two PNG icons, but "+Arrays.toString(paths)); diff --git a/src/newt/classes/com/jogamp/newt/Window.java b/src/newt/classes/com/jogamp/newt/Window.java index 8e73ba1d2..4816e62e5 100644 --- a/src/newt/classes/com/jogamp/newt/Window.java +++ b/src/newt/classes/com/jogamp/newt/Window.java @@ -63,6 +63,21 @@ import javax.media.nativewindow.util.RectangleImmutable; * window operation to an instance of this interface while providing OpenGL * functionality. *

+ *
Custom Window Icons
+ *

+ * Custom window icons can be defined via system property newt.window.icons, + * which shall contain a space separated list of PNG icon locations from low- to high-resolution. + * The location must be resolvable via classpath, i.e. shall reference a location within the jar file. + * Example (our default): + *

+ *   -Dnewt.window.icons="newt/data/jogamp-16x16.png newt/data/jogamp-32x32.png"
+ *   -Djnlp.newt.window.icons="newt/data/jogamp-16x16.png newt/data/jogamp-32x32.png"
+ * 
+ * The property can also be set programmatically, which must happen before any NEWT classes are touched: + *
+ *   System.setProperty("newt.window.icons", "newt/data/jogamp-16x16.png newt/data/jogamp-32x32.png");
+ * 
+ *

*/ public interface Window extends NativeWindow, WindowClosingProtocol { public static final boolean DEBUG_MOUSE_EVENT = Debug.debug("Window.MouseEvent"); -- cgit v1.2.3