new UI types?
authorcmzmasek@gmail.com <cmzmasek@gmail.com@ca865154-3058-d1c3-3e42-d8f55a55bdbd>
Fri, 4 Mar 2011 01:19:16 +0000 (01:19 +0000)
committercmzmasek@gmail.com <cmzmasek@gmail.com@ca865154-3058-d1c3-3e42-d8f55a55bdbd>
Fri, 4 Mar 2011 01:19:16 +0000 (01:19 +0000)
forester/java/src/org/forester/archaeopteryx/Configuration.java
forester/java/src/org/forester/archaeopteryx/MainFrameApplication.java

index 66047c6..12e108f 100644 (file)
@@ -52,7 +52,7 @@ import org.forester.util.ForesterUtil;
 public final class Configuration {
 
     public enum UI {
-        NATIVE, SYSTEM, NIMBUS, UNKNOWN
+        NATIVE, CROSSPLATFORM, NIMBUS, UNKNOWN
     }
     static final String                     VALIDATE_AGAINST_PHYLOXML_XSD_SCHEMA                   = "validate_against_phyloxml_xsd_schema";
     private static final String             WEB_LINK_KEY                                           = "web_link";
@@ -585,10 +585,8 @@ public final class Configuration {
     }
 
     final boolean isUseNativeUI() {
-        if ( _ui == UI.UNKNOWN ) {
-            if ( Util.isMac() && Util.isJava15() ) {
-                _ui = UI.NATIVE;
-            }
+        if ( ( _ui == UI.UNKNOWN ) && Util.isMac() && Util.isJava15() ) {
+            _ui = UI.NATIVE;
         }
         return _ui == UI.NATIVE;
     }
@@ -792,7 +790,7 @@ public final class Configuration {
                 _ui = UI.NATIVE;
             }
             else if ( my_str.equals( "no" ) || my_str.equals( "false" ) ) {
-                _ui = UI.SYSTEM;
+                _ui = UI.CROSSPLATFORM;
             }
             else if ( my_str.equals( "?" ) ) {
                 _ui = UI.UNKNOWN;
index 3b5c39f..4cabfe3 100644 (file)
@@ -230,12 +230,12 @@ public final class MainFrameApplication extends MainFrame {
         }
         try {
             if ( _configuration.isUseNativeUI() ) {
-                //  UIManager.setLookAndFeel( UIManager.getSystemLookAndFeelClassName() );
-                UIManager.setLookAndFeel( "com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel" );
+                UIManager.setLookAndFeel( UIManager.getSystemLookAndFeelClassName() );
             }
             else {
                 UIManager.setLookAndFeel( UIManager.getCrossPlatformLookAndFeelClassName() );
             }
+            //UIManager.setLookAndFeel( "com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel" );
         }
         catch ( final UnsupportedLookAndFeelException e ) {
             Util.dieWithSystemError( "UnsupportedLookAndFeelException: " + e.toString() );