Include OSX UI elements.
[debian/openrocket] / core / src / net / sf / openrocket / startup / Startup2.java
index 3ab137a90f3b54a0c1ba848006aec7409700a8c4..85500a361299d3f49668afd4c9c983791406d9a5 100644 (file)
@@ -9,6 +9,8 @@ import javax.swing.SwingUtilities;
 import javax.swing.Timer;
 import javax.swing.ToolTipManager;
 
+import net.sf.openrocket.arch.SystemInfo;
+import net.sf.openrocket.arch.SystemInfo.Platform;
 import net.sf.openrocket.communication.UpdateInfo;
 import net.sf.openrocket.communication.UpdateInfoRetriever;
 import net.sf.openrocket.database.ComponentPresetDatabase;
@@ -52,6 +54,11 @@ public class Startup2 {
                VersionHelper.checkVersion();
                VersionHelper.checkOpenJDK();
                
+               // If running on a MAC set up OSX UI Elements.
+               if ( SystemInfo.getPlatform() == Platform.MAC_OS ){
+                       OSXStartup.setupOSX();
+               }
+               
                // Run the actual startup method in the EDT since it can use progress dialogs etc.
                log.info("Moving startup to EDT");
                SwingUtilities.invokeAndWait(new Runnable() {