jmeter-commits mailing list archives

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

URL: http://svn.apache.org/r1646879
Log:
Bug 57364 - Options > Look And Feel does not update all windows LAF
Bugzilla Id: 57364

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

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=1646879&r1=1646878&r2=1646879&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:32:38 2014
@@ -18,6 +18,9 @@
 
 package org.apache.jmeter.gui.action;
 
+import java.awt.Dialog;
+import java.awt.Frame;
+import java.awt.Window;
 import java.awt.event.ActionEvent;
 import java.util.ArrayList;
 import java.util.HashSet;
@@ -29,7 +32,6 @@ import javax.swing.SwingUtilities;
 import javax.swing.UIManager;
 import javax.swing.UnsupportedLookAndFeelException;
 
-import org.apache.jmeter.gui.GuiPackage;
 import org.apache.jmeter.gui.util.JMeterMenuBar;
 import org.apache.jmeter.util.JMeterUtils;
 import org.apache.jorphan.logging.LoggingManager;
@@ -135,7 +137,15 @@ public class LookAndFeelCommand implemen
         try {
             String className = ev.getActionCommand().substring(ActionNames.LAF_PREFIX.length()).replace('/',
'.');
             UIManager.setLookAndFeel(className);
-            SwingUtilities.updateComponentTreeUI(GuiPackage.getInstance().getMainFrame());
+            for (Window w : Window.getWindows()) {
+                SwingUtilities.updateComponentTreeUI(w);
+                if (w.isDisplayable() &&
+                    (w instanceof Frame ? !((Frame)w).isResizable() :
+                    w instanceof Dialog ? !((Dialog)w).isResizable() :
+                    true)) {
+                    w.pack();
+                }
+            }
             PREFS.put(USER_PREFS_KEY, className);
         } catch (javax.swing.UnsupportedLookAndFeelException e) {
             JMeterUtils.reportErrorToUser("Look and Feel unavailable:" + e.toString());

Modified: jmeter/trunk/xdocs/changes.xml
URL: http://svn.apache.org/viewvc/jmeter/trunk/xdocs/changes.xml?rev=1646879&r1=1646878&r2=1646879&view=diff
==============================================================================
--- jmeter/trunk/xdocs/changes.xml (original)
+++ jmeter/trunk/xdocs/changes.xml Fri Dec 19 21:32:38 2014
@@ -175,6 +175,7 @@ See  <bugzilla>56357</bugzilla> for deta
 <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>
+<li><bug>57364</bug>Options &lt; Look And Feel does not update all
windows LAF. Contributed by Ubik Load Pack (support at ubikloadpack.com)</li>
 </ul>
 
 <!-- =================== Improvements =================== -->



Mime
View raw message