aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Schweinsberg <[email protected]>2007-01-25 08:44:52 +0000
committerDavid Schweinsberg <[email protected]>2007-01-25 08:44:52 +0000
commit03b634dde428f3925b82670720dcd23402d6ec72 (patch)
treebf53483bf14dc552121771b45cdcf6faec2b983a
parent016bf474d1266ccec99f6565e0ea6f8703b1d34a (diff)
Added to support Apple HI Guideline conformance when running under Mac OS X.
-rw-r--r--src/net/java/dev/typecast/app/editor/MacOSMenuHandler.java56
1 files changed, 56 insertions, 0 deletions
diff --git a/src/net/java/dev/typecast/app/editor/MacOSMenuHandler.java b/src/net/java/dev/typecast/app/editor/MacOSMenuHandler.java
new file mode 100644
index 0000000..b9a44b6
--- /dev/null
+++ b/src/net/java/dev/typecast/app/editor/MacOSMenuHandler.java
@@ -0,0 +1,56 @@
+/*
+ * MacOSMenuHandler.java
+ *
+ * Created on January 25, 2007, 3:23 PM
+ *
+ * To change this template, choose Tools | Template Manager
+ * and open the template in the editor.
+ */
+
+package net.java.dev.typecast.app.editor;
+
+import com.apple.eawt.ApplicationAdapter;
+import com.apple.eawt.ApplicationEvent;
+import com.apple.eawt.Application;
+import javax.swing.JFrame;
+import javax.swing.JOptionPane;
+
+/**
+ *
+ * @author david
+ */
+public class MacOSMenuHandler extends Application {
+
+ private Main _app;
+
+ /** Creates a new instance of MacOSMenuHandler */
+ public MacOSMenuHandler(Main app) {
+ _app = app;
+ setEnabledPreferencesMenu(true);
+ addApplicationListener(new AboutBoxHandler());
+ }
+
+ class AboutBoxHandler extends ApplicationAdapter {
+
+ public void handleAbout(ApplicationEvent e) {
+ _app.showAbout();
+ e.setHandled(true);
+ }
+
+ public void handleOpenApplication(ApplicationEvent e) {
+ }
+
+ public void handleOpenFile(ApplicationEvent e) {
+ }
+
+ public void handlePreferences(ApplicationEvent e) {
+ }
+
+ public void handlePrintFile(ApplicationEvent e) {
+ }
+
+ public void handleQuit(ApplicationEvent e) {
+ _app.close();
+ }
+ }
+}