- public QuitHandler.QResponse desktopQuit(boolean ui, boolean disposeFlag)
- {
- final Runnable doDesktopQuit = () -> {
- Dimension screen = Toolkit.getDefaultToolkit().getScreenSize();
- Cache.setProperty("SCREENGEOMETRY_WIDTH", screen.width + "");
- Cache.setProperty("SCREENGEOMETRY_HEIGHT", screen.height + "");
- storeLastKnownDimensions("", new Rectangle(getBounds().x,
- getBounds().y, getWidth(), getHeight()));
+ /**
+ * close everything, stash window geometries, and shut down all associated threads/workers
+ * @param dispose - sets the dispose on close flag - JVM may terminate when set
+ * @param terminateJvm - quit with prejudice - stops the JVM.
+ */
+ public void quitTheDesktop(boolean dispose, boolean terminateJvm) {
+ Dimension screen = Toolkit.getDefaultToolkit().getScreenSize();
+ Cache.setProperty("SCREENGEOMETRY_WIDTH", screen.width + "");
+ Cache.setProperty("SCREENGEOMETRY_HEIGHT", screen.height + "");
+ storeLastKnownDimensions("", new Rectangle(getBounds().x,
+ getBounds().y, getWidth(), getHeight()));