ASF Bugzilla – Attachment 32303 Details for
Bug 57365
Selected LAF is not correctly setup due to call of UIManager.setLookAndFeel too late
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch fixing issue
BUG_57365.patch (text/plain), 2.05 KB, created by
UbikLoadPack support
on 2014-12-18 13:39:11 UTC
(
hide
)
Description:
Patch fixing issue
Filename:
MIME Type:
Creator:
UbikLoadPack support
Created:
2014-12-18 13:39:11 UTC
Size:
2.05 KB
patch
obsolete
>Index: src/core/org/apache/jmeter/JMeter.java >=================================================================== >--- src/core/org/apache/jmeter/JMeter.java (revision 1645532) >+++ src/core/org/apache/jmeter/JMeter.java (working copy) >@@ -45,6 +45,7 @@ > 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.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 @@ > * 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 > >Index: src/core/org/apache/jmeter/gui/action/LookAndFeelCommand.java >=================================================================== >--- src/core/org/apache/jmeter/gui/action/LookAndFeelCommand.java (revision 1645532) >+++ src/core/org/apache/jmeter/gui/action/LookAndFeelCommand.java (working copy) >@@ -92,10 +92,8 @@ > * </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); > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 57365
: 32303