aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2014-01-31 05:05:08 +0100
committerSven Gothel <[email protected]>2014-01-31 05:05:08 +0100
commitd77c4c7f9f16a74d5ea81ff372e71550a66dfcd8 (patch)
tree36b011cbac156445de8e0b85bfba614adb147974
parent9f1fcf07b2cfff4bc8c47328e5b0d10adfcda853 (diff)
Use Applet3Panel.APPLET_* for *Applet3* implementing classes.
-rw-r--r--plugin/icedteanp/java/jogamp/plugin/applet/PluginApplet3PanelFactory.java23
-rw-r--r--plugin/icedteanp/java/jogamp/plugin/applet/PluginApplet3Viewer.java47
2 files changed, 34 insertions, 36 deletions
diff --git a/plugin/icedteanp/java/jogamp/plugin/applet/PluginApplet3PanelFactory.java b/plugin/icedteanp/java/jogamp/plugin/applet/PluginApplet3PanelFactory.java
index 2c9040c..3d141a4 100644
--- a/plugin/icedteanp/java/jogamp/plugin/applet/PluginApplet3PanelFactory.java
+++ b/plugin/icedteanp/java/jogamp/plugin/applet/PluginApplet3PanelFactory.java
@@ -69,7 +69,6 @@ import jogamp.applet.Applet3Panel;
import jogamp.plugin.jnlp.NetxApplet3Panel;
import net.sourceforge.jnlp.PluginParameters;
import net.sourceforge.jnlp.util.logging.OutputController;
-import sun.applet.AppletPanel;
import sun.applet.AppletSecurityContextManager;
import sun.applet.PluginDebug;
import sun.applet.PluginStreamHandler;
@@ -187,9 +186,9 @@ public class PluginApplet3PanelFactory {
if (eventList == null) {
// Add the standard events onto the event queue.
- panel.sendEvent(AppletPanel.APPLET_LOAD);
- panel.sendEvent(AppletPanel.APPLET_INIT);
- panel.sendEvent(AppletPanel.APPLET_START);
+ panel.sendEvent(Applet3Panel.APPLET_LOAD);
+ panel.sendEvent(Applet3Panel.APPLET_INIT);
+ panel.sendEvent(Applet3Panel.APPLET_START);
} else {
// We're testing AppletViewer. Force the specified set of events
// onto the event queue, wait for the events to be processed, and
@@ -202,21 +201,21 @@ public class PluginApplet3PanelFactory {
for (String event : events) {
PluginDebug.debug("Adding event to queue: ", event);
if ("dispose".equals(event))
- panel.sendEvent(AppletPanel.APPLET_DISPOSE);
+ panel.sendEvent(Applet3Panel.APPLET_DISPOSE);
else if ("load".equals(event))
- panel.sendEvent(AppletPanel.APPLET_LOAD);
+ panel.sendEvent(Applet3Panel.APPLET_LOAD);
else if ("init".equals(event))
- panel.sendEvent(AppletPanel.APPLET_INIT);
+ panel.sendEvent(Applet3Panel.APPLET_INIT);
else if ("start".equals(event))
- panel.sendEvent(AppletPanel.APPLET_START);
+ panel.sendEvent(Applet3Panel.APPLET_START);
else if ("stop".equals(event))
- panel.sendEvent(AppletPanel.APPLET_STOP);
+ panel.sendEvent(Applet3Panel.APPLET_STOP);
else if ("destroy".equals(event))
- panel.sendEvent(AppletPanel.APPLET_DESTROY);
+ panel.sendEvent(Applet3Panel.APPLET_DESTROY);
else if ("quit".equals(event))
- panel.sendEvent(AppletPanel.APPLET_QUIT);
+ panel.sendEvent(Applet3Panel.APPLET_QUIT);
else if ("error".equals(event))
- panel.sendEvent(AppletPanel.APPLET_ERROR);
+ panel.sendEvent(Applet3Panel.APPLET_ERROR);
else
// non-fatal error if we get an unrecognized event
PluginDebug.debug("Unrecognized event name: ", event);
diff --git a/plugin/icedteanp/java/jogamp/plugin/applet/PluginApplet3Viewer.java b/plugin/icedteanp/java/jogamp/plugin/applet/PluginApplet3Viewer.java
index 338ce42..a123baa 100644
--- a/plugin/icedteanp/java/jogamp/plugin/applet/PluginApplet3Viewer.java
+++ b/plugin/icedteanp/java/jogamp/plugin/applet/PluginApplet3Viewer.java
@@ -99,7 +99,6 @@ import net.sourceforge.jnlp.util.logging.OutputController;
import sun.applet.Applet3MessageHandler;
import sun.applet.AppletEvent;
import sun.applet.AppletListener;
-import sun.applet.AppletPanel;
import sun.applet.AppletSecurityContextManager;
import sun.applet.PluginAppletSecurityContext;
import sun.applet.PluginCallRequest;
@@ -296,16 +295,16 @@ public class PluginApplet3Viewer implements Applet3Context, SplashController {
panelLive.signalAll();
panelLock.unlock();
switch (evt.getID()) {
- case AppletPanel.APPLET_RESIZE: {
+ case Applet3Panel.APPLET_RESIZE: {
if (src != null) {
// FIXME ? appletViewer.setSize(appletViewer.getPreferredSize());
// We already resized ..
}
break;
}
- case AppletPanel.APPLET_LOADING_COMPLETED: {
+ case Applet3Panel.APPLET_LOADING_COMPLETED: {
/**
- Applet3 a = src.getApplet(); // sun.applet.AppletPanel
+ Applet3 a = src.getApplet(); // sun.applet.Applet3Panel
// Fixed #4754451: Applet can have methods running on main
// thread event queue.
//
@@ -331,9 +330,9 @@ public class PluginApplet3Viewer implements Applet3Context, SplashController {
break;
}
- case AppletPanel.APPLET_START: {
+ case Applet3Panel.APPLET_START: {
final int src_status = src.getStatus();
- if (src_status != AppletPanel.APPLET_INIT && src_status != AppletPanel.APPLET_STOP) {
+ if (src_status != Applet3Panel.APPLET_INIT && src_status != Applet3Panel.APPLET_STOP) {
String s="Applet started, but but reached invalid state";
PluginDebug.debug(s);
SplashPanel sp=SplashUtils.getErrorSplashScreen(appletViewer.panel.getWidth(), appletViewer.panel.getHeight(), new Exception(s));
@@ -342,7 +341,7 @@ public class PluginApplet3Viewer implements Applet3Context, SplashController {
break;
}
- case AppletPanel.APPLET_ERROR: {
+ case Applet3Panel.APPLET_ERROR: {
String s="Undefined error causing applet not to staart appeared";
PluginDebug.debug(s);
SplashPanel sp=SplashUtils.getErrorSplashScreen(appletViewer.panel.getWidth(), appletViewer.panel.getHeight(), new Exception(s));
@@ -1244,26 +1243,26 @@ public class PluginApplet3Viewer implements Applet3Context, SplashController {
* Restart the applet.
*/
void appletRestart() {
- panel.sendEvent(AppletPanel.APPLET_STOP);
- panel.sendEvent(AppletPanel.APPLET_DESTROY);
- panel.sendEvent(AppletPanel.APPLET_INIT);
- panel.sendEvent(AppletPanel.APPLET_START);
+ panel.sendEvent(Applet3Panel.APPLET_STOP);
+ panel.sendEvent(Applet3Panel.APPLET_DESTROY);
+ panel.sendEvent(Applet3Panel.APPLET_INIT);
+ panel.sendEvent(Applet3Panel.APPLET_START);
}
/**
* Reload the applet.
*/
void appletReload() {
- panel.sendEvent(AppletPanel.APPLET_STOP);
- panel.sendEvent(AppletPanel.APPLET_DESTROY);
- panel.sendEvent(AppletPanel.APPLET_DISPOSE);
+ panel.sendEvent(Applet3Panel.APPLET_STOP);
+ panel.sendEvent(Applet3Panel.APPLET_DESTROY);
+ panel.sendEvent(Applet3Panel.APPLET_DISPOSE);
/**
* Fixed #4501142: Classlaoder sharing policy doesn't
* take "archive" into account. This will be overridden
* by Java Plug-in. [stanleyh]
*/
- AppletPanel.flushClassLoader(panel.getClassLoaderCacheKey());
+ Applet3Panel.flushClassLoader(panel.getClassLoaderCacheKey());
/*
* Make sure we don't have two threads running through the event queue
@@ -1284,23 +1283,23 @@ public class PluginApplet3Viewer implements Applet3Context, SplashController {
}
});
- panel.sendEvent(AppletPanel.APPLET_LOAD);
- panel.sendEvent(AppletPanel.APPLET_INIT);
- panel.sendEvent(AppletPanel.APPLET_START);
+ panel.sendEvent(Applet3Panel.APPLET_LOAD);
+ panel.sendEvent(Applet3Panel.APPLET_INIT);
+ panel.sendEvent(Applet3Panel.APPLET_START);
}
/**
* Start the applet.
*/
void appletStart() {
- panel.sendEvent(AppletPanel.APPLET_START);
+ panel.sendEvent(Applet3Panel.APPLET_START);
}
/**
* Stop the applet.
*/
void appletStop() {
- panel.sendEvent(AppletPanel.APPLET_STOP);
+ panel.sendEvent(Applet3Panel.APPLET_STOP);
}
/**
@@ -1308,10 +1307,10 @@ public class PluginApplet3Viewer implements Applet3Context, SplashController {
* Stop, Destroy, Dispose and Quit a viewer
*/
private void appletShutdown(Applet3Panel p) {
- p.sendEvent(AppletPanel.APPLET_STOP);
- p.sendEvent(AppletPanel.APPLET_DESTROY);
- p.sendEvent(AppletPanel.APPLET_DISPOSE);
- p.sendEvent(AppletPanel.APPLET_QUIT);
+ p.sendEvent(Applet3Panel.APPLET_STOP);
+ p.sendEvent(Applet3Panel.APPLET_DESTROY);
+ p.sendEvent(Applet3Panel.APPLET_DISPOSE);
+ p.sendEvent(Applet3Panel.APPLET_QUIT);
}
/**