If Applet is out of browser window, it is closeable.
diff --git a/jnlp-files/jogl-applet-runner-newt-gears-normal.html b/jnlp-files/jogl-applet-runner-newt-gears-normal.html
index a6dd16a0c..310e659ba 100644
--- a/jnlp-files/jogl-applet-runner-newt-gears-normal.html
+++ b/jnlp-files/jogl-applet-runner-newt-gears-normal.html
@@ -26,6 +26,9 @@ JOGL NEWT JNLP Applet Runner Special Keys:
Normal webpage text - Normal webpage text - Normal webpage text - Normal webpage text
Normal webpage text - Normal webpage text - Normal webpage text - Normal webpage text
diff --git a/jnlp-files/jogl-applet-runner-newt-gears-special.html b/jnlp-files/jogl-applet-runner-newt-gears-special.html
index 0f5911414..01f37d6c7 100644
--- a/jnlp-files/jogl-applet-runner-newt-gears-special.html
+++ b/jnlp-files/jogl-applet-runner-newt-gears-special.html
@@ -75,6 +75,9 @@ JOGL NEWT JNLP Applet Runner Special Keys:
f - toggle fullscreen
r - in/out browser window
a - on/off always-on-top
+
c - change mouse pointer
+
i - invisible mouse pointer
+
w - warp mouse pointer to center
Normal webpage text - Normal webpage text - Normal webpage text - Normal webpage text
Normal webpage text - Normal webpage text - Normal webpage text - Normal webpage text
diff --git a/src/newt/classes/com/jogamp/newt/awt/applet/JOGLNewtAppletBase.java b/src/newt/classes/com/jogamp/newt/awt/applet/JOGLNewtAppletBase.java
index e6571d21a..eac328cdd 100644
--- a/src/newt/classes/com/jogamp/newt/awt/applet/JOGLNewtAppletBase.java
+++ b/src/newt/classes/com/jogamp/newt/awt/applet/JOGLNewtAppletBase.java
@@ -42,7 +42,10 @@ import javax.media.opengl.GLPipelineFactory;
import jogamp.newt.Debug;
+import com.jogamp.common.util.IOUtil;
+import com.jogamp.newt.Display;
import com.jogamp.newt.Window;
+import com.jogamp.newt.Display.PointerIcon;
import com.jogamp.newt.event.KeyEvent;
import com.jogamp.newt.event.KeyListener;
import com.jogamp.newt.event.MouseListener;
@@ -65,6 +68,7 @@ public class JOGLNewtAppletBase implements KeyListener, GLEventListener {
boolean glClosable;
boolean glDebug;
boolean glTrace;
+ PointerIcon pointerIconTest = null;
GLEventListener glEventListener = null;
GLWindow glWindow = null;
@@ -230,6 +234,15 @@ public class JOGLNewtAppletBase implements KeyListener, GLEventListener {
if(isValid) {
glWindow.setVisible(true);
glWindow.sendWindowEvent(WindowEvent.EVENT_WINDOW_RESIZED);
+ if( null == pointerIconTest ) {
+ final IOUtil.ClassResources res = new IOUtil.ClassResources(glWindow.getClass(), new String[] { "newt/data/jogamp-32x32.png" } );
+ final Display disp = glWindow.getScreen().getDisplay();
+ try {
+ pointerIconTest = disp.createPointerIcon(res, 16, 0);
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
glAnimator.start();
awtParent = glWindow.getParent();
glWindow.addWindowListener(reparentHomeListener);
@@ -302,28 +315,62 @@ public class JOGLNewtAppletBase implements KeyListener, GLEventListener {
return;
}
if(e.getKeyChar()=='d') {
- glWindow.setUndecorated(!glWindow.isUndecorated());
+ new Thread() {
+ public void run() {
+ glWindow.setUndecorated(!glWindow.isUndecorated());
+ } }.start();
} if(e.getKeyChar()=='f') {
- glWindow.setFullscreen(!glWindow.isFullscreen());
+ new Thread() {
+ public void run() {
+ glWindow.setFullscreen(!glWindow.isFullscreen());
+ } }.start();
} else if(e.getKeyChar()=='a') {
- glWindow.setAlwaysOnTop(!glWindow.isAlwaysOnTop());
+ new Thread() {
+ public void run() {
+ glWindow.setAlwaysOnTop(!glWindow.isAlwaysOnTop());
+ } }.start();
} else if(e.getKeyChar()=='r' && null!=awtParent) {
- if(null == glWindow.getParent()) {
- glWindow.reparentWindow(awtParent, -1, -1, 0 /* hints */);
- } else {
- final InsetsImmutable insets = glWindow.getInsets();
- final int x, y;
- if ( 0 >= insets.getTopHeight() ) {
- // fail safe ..
- x = 32;
- y = 32;
- } else {
- x = insets.getLeftWidth();
- y = insets.getTopHeight();
- }
- glWindow.reparentWindow(null, x, y, 0 /* hints */);
- glWindow.setDefaultCloseOperation( glClosable ? WindowClosingMode.DISPOSE_ON_CLOSE : WindowClosingMode.DO_NOTHING_ON_CLOSE );
- }
+ new Thread() {
+ public void run() {
+ if(null == glWindow.getParent()) {
+ glWindow.reparentWindow(awtParent, -1, -1, 0 /* hints */);
+ } else {
+ final InsetsImmutable insets = glWindow.getInsets();
+ final int x, y;
+ if ( 0 >= insets.getTopHeight() ) {
+ // fail safe ..
+ x = 32;
+ y = 32;
+ } else {
+ x = insets.getLeftWidth();
+ y = insets.getTopHeight();
+ }
+ glWindow.reparentWindow(null, x, y, 0 /* hints */);
+ glWindow.setDefaultCloseOperation( glClosable ? WindowClosingMode.DISPOSE_ON_CLOSE : WindowClosingMode.DO_NOTHING_ON_CLOSE );
+ }
+ } }.start();
+ } else if(e.getKeyChar()=='c') {
+ new Thread() {
+ public void run() {
+ System.err.println("[set pointer-icon pre]");
+ final PointerIcon currentPI = glWindow.getPointerIcon();
+ glWindow.setPointerIcon( currentPI == pointerIconTest ? null : pointerIconTest);
+ System.err.println("[set pointer-icon post] "+currentPI+" -> "+glWindow.getPointerIcon());
+ } }.start();
+ } else if(e.getKeyChar()=='i') {
+ new Thread() {
+ public void run() {
+ System.err.println("[set mouse visible pre]: "+glWindow.isPointerVisible());
+ glWindow.setPointerVisible(!glWindow.isPointerVisible());
+ System.err.println("[set mouse visible post]: "+glWindow.isPointerVisible());
+ } }.start();
+ } else if(e.getKeyChar()=='w') {
+ new Thread() {
+ public void run() {
+ System.err.println("[set mouse pos pre]");
+ glWindow.warpPointer(glWindow.getWidth()/2, glWindow.getHeight()/2);
+ System.err.println("[set mouse pos post]");
+ } }.start();
}
}
--
cgit v1.2.3
From 5e8361d84078568d54b9561315151e2c5e287147 Mon Sep 17 00:00:00 2001
From: Sven Gothel
Date: Wed, 22 Jan 2014 12:56:14 +0100
Subject: Adaption of Oracle's Deployment changes, i.e. >= 7u51
Sadly, due to Oracle's Java Applet Plugin update 7u51,
unsigned applets are no more allowed and effectively
lower the bar to create user applets with raised privileges.
Hence JogAmp Community signs jogl-all.jar and gluegen-rt.jar, which contain the
JOGL's supporting classes as well as jogl-test.jar, which contains the applet class.
jogl-test.jar's manifest file uses Permissions: sandbox
to not raise privileges.
---
doc/deployment/JOGL-DEPLOYMENT.html | 46 +++----
...pplet-runner-newt-ElektronenMultiplizierer.html | 26 +---
.../jogl-applet-runner-newt-GraphTextDemo01.html | 26 +---
...jogl-applet-runner-newt-GraphUISceneDemo01.html | 26 +---
jnlp-files/jogl-applet-runner-newt-MovieCube.html | 26 +---
...plet-runner-newt-gears-normal-launcheronly.html | 146 ---------------------
...gl-applet-runner-newt-gears-normal-napplet.html | 23 +++-
.../jogl-applet-runner-newt-gears-normal.html | 112 +++++-----------
.../jogl-applet-runner-newt-gears-special.html | 26 +---
jnlp-files/jogl-applet-runner-newt.jnlp | 1 -
jnlp-files/jogl-applet-version-lancheronly.html | 56 --------
jnlp-files/jogl-applet-version.html | 26 +---
jnlp-files/jogl-applet-version.jnlp | 1 -
jnlp-files/jogl-application-version.jnlp | 1 -
jnlp-files/jogl-javaws-version.jnlp | 1 -
jnlp-files/jogl-test-applets.html | 28 ++--
make/build-test.xml | 1 +
make/joglversion | 1 +
make/joglversion-all | 1 +
make/joglversion-test | 4 +-
20 files changed, 112 insertions(+), 466 deletions(-)
delete mode 100644 jnlp-files/jogl-applet-runner-newt-gears-normal-launcheronly.html
delete mode 100644 jnlp-files/jogl-applet-version-lancheronly.html
(limited to 'jnlp-files/jogl-applet-runner-newt-gears-normal.html')
diff --git a/doc/deployment/JOGL-DEPLOYMENT.html b/doc/deployment/JOGL-DEPLOYMENT.html
index da7bb24b4..81a028e87 100644
--- a/doc/deployment/JOGL-DEPLOYMENT.html
+++ b/doc/deployment/JOGL-DEPLOYMENT.html
@@ -40,44 +40,34 @@
the native JAR files.
- Examples are available:
-
-
-Note that the jogl-demos.jar, which contains the GearsApplet class,
-does not need to be signed! JogAmp Community signs
-applet-launcher.jar, jogl.jar and gluegen-rt.jar, which contain the
-JNLPAppletLauncher and JOGL's supporting classes; this is the only
-Java code which needs to be signed in order to deploy applets using
-JOGL and is the only certificate the end user must accept.
-
-
-
-
-The JNLPAppletLauncher
-home page contains more information about what files must be
-placed on the web server in order to enable the deployment of applets
-using JOGL and other extensions.
-
-
@@ -91,16 +95,23 @@ The applet above is instantiated with the following code:
-
-
-Note that the jogl-test.jar, which contains the test applet class,
+
+
+Note that the jogl-test.jar, which contains the GearsES2 class,
does not need to be signed! JogAmp Community signs
-jogl.jar and gluegen-rt.jar, which contain
+jogl-all.jar and gluegen-rt.jar, which contain the
JOGL's supporting classes; this is the only
Java code which needs to be signed in order to deploy applets using
JOGL and is the only certificate the end user must accept.
-
-
+
+Sadly, due to Oracle's Java Applet Plugin update 7u51,
+unsigned applets are no more allowed and effectively
+lower the bar to create user applets with raised privileges.
+Hence JogAmp Community signs jogl-all.jar and gluegen-rt.jar, which contain the
+JOGL's supporting classes as well as jogl-test.jar, which contains the GearsES2 class.
+jogl-test.jar's manifest file uses Permissions: sandbox
+to not raise privileges.
+