(final String[] args,
final PApplet constructedSketch)
| 10663 | // through to the PDE. There are other ways around that, no doubt, but I'm |
| 10664 | // also suspecting that these "not showing up" bugs might be EDT issues. |
| 10665 | static public void runSketch(final String[] args, |
| 10666 | final PApplet constructedSketch) { |
| 10667 | // EventQueue.invokeLater(new Runnable() { |
| 10668 | // public void run() { |
| 10669 | // runSketchEDT(args, constructedSketch); |
| 10670 | // } |
| 10671 | // }); |
| 10672 | // } |
| 10673 | // |
| 10674 | // |
| 10675 | // /** |
| 10676 | // * Moving this to the EDT for 3.0a6 because that's the proper thing to do |
| 10677 | // * when messing with Swing components. But mostly we're AWT, so who knows. |
| 10678 | // */ |
| 10679 | // static protected void runSketchEDT(final String[] args, |
| 10680 | // final PApplet constructedSketch) { |
| 10681 | // Supposed to help with flicker, but no effect on OS X. |
| 10682 | // TODO IIRC this helped on Windows, but need to double check. |
| 10683 | System.setProperty("sun.awt.noerasebackground", "true"); |
| 10684 | |
| 10685 | // Remove 60fps limit on the JavaFX "pulse" timer |
| 10686 | System.setProperty("javafx.animation.fullspeed", "true"); |
| 10687 | |
| 10688 | // Doesn't seem to do anything helpful here (that can't be done via Runner) |
| 10689 | //System.setProperty("com.apple.mrj.application.apple.menu.about.name", "potato"); |
| 10690 | |
| 10691 | Thread.setDefaultUncaughtExceptionHandler(new Thread.UncaughtExceptionHandler() { |
| 10692 | public void uncaughtException(Thread t, Throwable e) { |
| 10693 | e.printStackTrace(); |
| 10694 | uncaughtThrowable = e; |
| 10695 | } |
| 10696 | }); |
| 10697 | |
| 10698 | // This doesn't work, need to mess with Info.plist instead |
| 10699 | /* |
| 10700 | // In an exported application, add the Contents/Java folder to the |
| 10701 | // java.library.path, so that native libraries work properly. |
| 10702 | // Without this, the library path is only set to Contents/MacOS |
| 10703 | // where the launcher binary lives. |
| 10704 | if (platform == MACOSX) { |
| 10705 | URL coreJarURL = |
| 10706 | PApplet.class.getProtectionDomain().getCodeSource().getLocation(); |
| 10707 | // The jarPath from above will/may be URL encoded (%20 for spaces) |
| 10708 | String coreJarPath = urlDecode(coreJarURL.getPath()); |
| 10709 | if (coreJarPath.endsWith("/Contents/Java/core.jar")) { |
| 10710 | // remove the /core.jar part from the end |
| 10711 | String javaPath = coreJarPath.substring(0, coreJarPath.length() - 9); |
| 10712 | String libraryPath = System.getProperty("java.library.path"); |
| 10713 | libraryPath += File.pathSeparator + javaPath; |
| 10714 | System.setProperty("java.library.path", libraryPath); |
| 10715 | } |
| 10716 | } |
| 10717 | */ |
| 10718 | |
| 10719 | // Catch any HeadlessException to provide more useful feedback |
| 10720 | try { |
| 10721 | // Call validate() while resize events are in progress |
| 10722 | Toolkit.getDefaultToolkit().setDynamicLayout(true); |
no test coverage detected