From afa089fedd62a29826d57cc34293ad5e0e6a4efd Mon Sep 17 00:00:00 2001
From: Violette Roche-Montane <violette.roche-montane@forgerock.com>
Date: Wed, 26 Mar 2014 13:15:01 +0000
Subject: [PATCH] Replaced OperatingSystem class by its SDK class.

---
 opendj3-server-dev/src/guitools/org/opends/guitools/controlpanel/util/Utilities.java |   31 ++++---------------------------
 1 files changed, 4 insertions(+), 27 deletions(-)

diff --git a/opendj3-server-dev/src/guitools/org/opends/guitools/controlpanel/util/Utilities.java b/opendj3-server-dev/src/guitools/org/opends/guitools/controlpanel/util/Utilities.java
index d95075d..a292117 100644
--- a/opendj3-server-dev/src/guitools/org/opends/guitools/controlpanel/util/Utilities.java
+++ b/opendj3-server-dev/src/guitools/org/opends/guitools/controlpanel/util/Utilities.java
@@ -27,6 +27,8 @@
 package org.opends.guitools.controlpanel.util;
 
 import static org.opends.messages.AdminToolMessages.*;
+import static com.forgerock.opendj.util.OperatingSystem.isWindows;
+import static com.forgerock.opendj.util.OperatingSystem.isMacOS;
 
 import java.awt.Color;
 import java.awt.Component;
@@ -161,18 +163,6 @@
     INFO_CTRL_PANEL_NOT_IMPLEMENTED.get();
 
   /**
-   * Returns <CODE>true</CODE> if we are running Mac OS and <CODE>false</CODE>
-   * otherwise.
-   * @return <CODE>true</CODE> if we are running Mac OS and <CODE>false</CODE>
-   * otherwise.
-   */
-  public static boolean isMacOS()
-  {
-    String os = System.getProperty("os.name").toLowerCase();
-    return os.indexOf("mac") != -1;
-  }
-
-  /**
    * Creates a combo box.
    * @return a combo box.
    */
@@ -231,18 +221,6 @@
   }
 
   /**
-   * Returns <CODE>true</CODE> if we are running Windows and <CODE>false</CODE>
-   * otherwise.
-   * @return <CODE>true</CODE> if we are running Windows and <CODE>false</CODE>
-   * otherwise.
-   */
-  public static boolean isWindows()
-  {
-    String os = System.getProperty("os.name").toLowerCase();
-    return os.indexOf("windows") != -1;
-  }
-
-  /**
    * Derives a color by adding the specified offsets to the base color's
    * hue, saturation, and brightness values.   The resulting hue, saturation,
    * and brightness values will be contrained to be between 0 and 1.
@@ -614,15 +592,14 @@
     final JTable table = new JTable(tableModel);
     table.setShowGrid(true);
     table.setAutoResizeMode(JTable.AUTO_RESIZE_SUBSEQUENT_COLUMNS);
-    boolean isMacOS = Utilities.isMacOS();
     table.setGridColor(ColorAndFontConstants.gridColor);
-    if (isMacOS)
+    if (isMacOS())
     {
       table.getTableHeader().setBorder(
           BorderFactory.createMatteBorder(1, 1, 0, 0,
               ColorAndFontConstants.gridColor));
     }
-    if (Utilities.isWindows())
+    if (isWindows())
     {
       table.getTableHeader().setBorder(
           BorderFactory.createMatteBorder(1, 1, 0, 1,

--
Gitblit v1.10.0