Revision: 2626
          http://sourceforge.net/p/swingme/code/2626
Author:   yuranet
Date:     2021-12-28 20:08:00 +0000 (Tue, 28 Dec 2021)
Log Message:
-----------
little name change
Modified Paths:
--------------
    me4se/opt/swingme/src/net/yura/me4se/ME4SEPanel.java
Added Paths:
-----------
    me4se/opt/swingme/src/net/yura/me4se/SingleFrameApplication.java
Removed Paths:
-------------
    me4se/opt/swingme/src/net/yura/me4se/EmptyMidlet.java
Deleted: me4se/opt/swingme/src/net/yura/me4se/EmptyMidlet.java
===================================================================
--- me4se/opt/swingme/src/net/yura/me4se/EmptyMidlet.java	2021-12-28 19:55:55 UTC (rev 2625)
+++ me4se/opt/swingme/src/net/yura/me4se/EmptyMidlet.java	2021-12-28 20:08:00 UTC (rev 2626)
@@ -1,22 +0,0 @@
-package net.yura.me4se;
-
-import javax.microedition.midlet.MIDletStateChangeException;
-import net.yura.mobile.gui.DesktopPane;
-import net.yura.mobile.gui.Midlet;
-
-/**
- * @author Yura Mamyrin
- */
-public class EmptyMidlet extends Midlet {
-
-//    ME4SEPanel parent;
-//    public ME4SEPanel getParent() {
-//        return parent;
-//    }
-
-    protected void initialize(DesktopPane dp) { }
-
-    public void destroyApp(boolean arg0) throws MIDletStateChangeException {
-        super.destroyApp(arg0);
-    }
-}
Modified: me4se/opt/swingme/src/net/yura/me4se/ME4SEPanel.java
===================================================================
--- me4se/opt/swingme/src/net/yura/me4se/ME4SEPanel.java	2021-12-28 19:55:55 UTC (rev 2625)
+++ me4se/opt/swingme/src/net/yura/me4se/ME4SEPanel.java	2021-12-28 20:08:00 UTC (rev 2626)
@@ -43,7 +43,7 @@
         manager = ApplicationManager.createInstance(this, null );
 
         JadFile jad = new JadFile();
-        jad.setValue("MIDlet-1", ",," + EmptyMidlet.class.getName());
+        jad.setValue("MIDlet-1", ",," + SingleFrameApplication.class.getName());
         manager.launch(jad, 0);
 
         desktop = DesktopPane.getDesktopPane();
@@ -68,11 +68,11 @@
     }
 
     public void destroy() {
-    //    can not use this as causes System.exit in all events
-    //    manager.destroy(true, false); // true will cause System.exit
-        
+        // can not use this as causes System.exit in all events
+        // manager.destroy(true, false); // true will cause System.exit
+
+        // TODO: in case we are still processing an event in swingme world, we want to let that finish before we kill everything
         try {
-
             Field man = ApplicationManager.class.getDeclaredField("manager");
             man.setAccessible(true);
             if (man.get(null) == manager) {
@@ -84,7 +84,7 @@
                 oldManager = null;
             }
 
-            ((EmptyMidlet)manager.active).destroyApp(true); // this will set desktop to null
+            ((SingleFrameApplication)manager.active).destroyApp(true); // this will set desktop to null
 
             if (oldDesktop != null) {
                 oldDesktop.showNotify();
Copied: me4se/opt/swingme/src/net/yura/me4se/SingleFrameApplication.java (from rev 2625, me4se/opt/swingme/src/net/yura/me4se/EmptyMidlet.java)
===================================================================
--- me4se/opt/swingme/src/net/yura/me4se/SingleFrameApplication.java	                        (rev 0)
+++ me4se/opt/swingme/src/net/yura/me4se/SingleFrameApplication.java	2021-12-28 20:08:00 UTC (rev 2626)
@@ -0,0 +1,23 @@
+package net.yura.me4se;
+
+import javax.microedition.midlet.MIDletStateChangeException;
+import net.yura.mobile.gui.DesktopPane;
+import net.yura.mobile.gui.Midlet;
+
+/**
+ * @author Yura Mamyrin
+ * @see org.jdesktop.application.SingleFrameApplication
+ */
+public class SingleFrameApplication extends Midlet {
+
+//    ME4SEPanel parent;
+//    public ME4SEPanel getParent() {
+//        return parent;
+//    }
+
+    protected void initialize(DesktopPane dp) { }
+
+    public void destroyApp(boolean arg0) throws MIDletStateChangeException {
+        super.destroyApp(arg0);
+    }
+}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
 |