jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pmoua...@apache.org
Subject svn commit: r1646876 - in /jmeter/trunk: src/core/org/apache/jmeter/JMeter.java src/core/org/apache/jmeter/gui/action/LookAndFeelCommand.java xdocs/changes.xml
Date Fri, 19 Dec 2014 21:28:43 GMT
Author: pmouawad
Date: Fri Dec 19 21:28:43 2014
New Revision: 1646876

URL: http://svn.apache.org/r1646876
Log:
Bug 57365 - Selected LAF is not correctly setup due to call of UIManager.setLookAndFeel too
late 
Bugzilla Id: 57365

Modified:
    jmeter/trunk/src/core/org/apache/jmeter/JMeter.java
    jmeter/trunk/src/core/org/apache/jmeter/gui/action/LookAndFeelCommand.java
    jmeter/trunk/xdocs/changes.xml

Modified: jmeter/trunk/src/core/org/apache/jmeter/JMeter.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/JMeter.java?rev=1646876&r1=1646875&r2=1646876&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/JMeter.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/JMeter.java Fri Dec 19 21:28:43 2014
@@ -45,6 +45,7 @@ import java.util.concurrent.TimeUnit;
 import java.util.concurrent.atomic.AtomicInteger;
 
 import javax.swing.JTree;
+import javax.swing.UIManager;
 import javax.swing.tree.TreePath;
 
 import org.apache.commons.cli.avalon.CLArgsParser;
@@ -63,6 +64,7 @@ import org.apache.jmeter.gui.action.Acti
 import org.apache.jmeter.gui.action.ActionRouter;
 import org.apache.jmeter.gui.action.Load;
 import org.apache.jmeter.gui.action.LoadRecentProject;
+import org.apache.jmeter.gui.action.LookAndFeelCommand;
 import org.apache.jmeter.gui.tree.JMeterTreeListener;
 import org.apache.jmeter.gui.tree.JMeterTreeModel;
 import org.apache.jmeter.gui.tree.JMeterTreeNode;
@@ -97,8 +99,16 @@ import com.thoughtworks.xstream.converte
  * Main JMeter class; processes options and starts the GUI, non-GUI or server as appropriate.
  */
 public class JMeter implements JMeterPlugin {
-
     private static final Logger log = LoggingManager.getLoggerForClass();
+    
+    static {
+        String jMeterLaf = LookAndFeelCommand.getJMeterLaf();
+        try {
+            UIManager.setLookAndFeel(jMeterLaf);
+        } catch (Exception ex) {
+            log.warn("Could not set LAF to:"+jMeterLaf, ex);
+        }
+    }
 
     public static final int UDP_PORT_DEFAULT = 4445; // needed for ShutdownClient
 

Modified: jmeter/trunk/src/core/org/apache/jmeter/gui/action/LookAndFeelCommand.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/gui/action/LookAndFeelCommand.java?rev=1646876&r1=1646875&r2=1646876&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/gui/action/LookAndFeelCommand.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/gui/action/LookAndFeelCommand.java Fri Dec 19
21:28:43 2014
@@ -57,7 +57,6 @@ public class LookAndFeelCommand implemen
         for (int i = 0; i < lfs.length; i++) {
             commands.add(ActionNames.LAF_PREFIX + lfs[i].getClassName());
         }
-
         try {
             String jMeterLaf = getJMeterLaf();
             UIManager.setLookAndFeel(jMeterLaf);
@@ -92,10 +91,8 @@ public class LookAndFeelCommand implemen
      * </ul>
      * @return LAF classname
      */
-    private static String getJMeterLaf(){
-        String laf;
-
-        laf = PREFS.get(USER_PREFS_KEY, null);
+    public static String getJMeterLaf(){
+        String laf = PREFS.get(USER_PREFS_KEY, null);
         if (laf != null) {
             return checkLafName(laf);            
         }

Modified: jmeter/trunk/xdocs/changes.xml
URL: http://svn.apache.org/viewvc/jmeter/trunk/xdocs/changes.xml?rev=1646876&r1=1646875&r2=1646876&view=diff
==============================================================================
--- jmeter/trunk/xdocs/changes.xml (original)
+++ jmeter/trunk/xdocs/changes.xml Fri Dec 19 21:28:43 2014
@@ -174,6 +174,7 @@ See  <bugzilla>56357</bugzilla> for deta
 <ul>
 <li><bug>57303</bug>commons-math3 dependency is missing in the jmeter lib
package (nightly build)</li>
 <li><bug>57306</bug>backend_listener.png is missing in the JMeter User
Doc (affects nightly build)</li>
+<li><bug>57365</bug>Selected LAF is not correctly setup due to call of
UIManager.setLookAndFeel too late. Contributed by Ubik Load Pack (support at ubikloadpack.com)</li>
 </ul>
 
 <!-- =================== Improvements =================== -->



Mime
View raw message