From 24c021c8d73c18a7aa9104a6333279f4bb150a6b Mon Sep 17 00:00:00 2001
From: abobrov <abobrov@localhost>
Date: Sun, 18 Feb 2007 08:44:18 +0000
Subject: [PATCH] improve MacOSX native LAF: set the application name for the menu bar and the dock.

---
 opends/src/quicksetup/org/opends/quicksetup/util/Utils.java |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/opends/src/quicksetup/org/opends/quicksetup/util/Utils.java b/opends/src/quicksetup/org/opends/quicksetup/util/Utils.java
index ea4428c..2ab0749 100644
--- a/opends/src/quicksetup/org/opends/quicksetup/util/Utils.java
+++ b/opends/src/quicksetup/org/opends/quicksetup/util/Utils.java
@@ -1338,4 +1338,18 @@
   {
     return MAX_LINE_WIDTH;
   }
+
+  /**
+   * Puts Swing menus in the Mac OS menu bar, if using the Aqua look and feel,
+   * and sets the application name that is displayed in the application menu
+   * and in the dock.
+   * @param appName
+   *          application name to display in the menu bar and the dock.
+   */
+  public static void setMacOSXMenuBar(String appName)
+  {
+    System.setProperty("apple.laf.useScreenMenuBar", "true");
+    System.setProperty("com.apple.mrj.application.apple.menu.about.name",
+                       appName);
+  }
 }

--
Gitblit v1.10.0