jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1723561 - in /jmeter/trunk: src/components/org/apache/jmeter/control/gui/ src/components/org/apache/jmeter/modifiers/gui/ src/core/org/apache/jmeter/control/gui/ src/core/org/apache/jmeter/gui/util/ xdocs/
Date Thu, 07 Jan 2016 14:28:32 GMT
Author: sebb
Date: Thu Jan  7 14:28:32 2016
New Revision: 1723561

URL: http://svn.apache.org/viewvc?rev=1723561&view=rev
Log:
Config Element Counter (and others): Check Boxes Toggle Area Too Big
Bugzilla Id: 58810

Added:
    jmeter/trunk/src/core/org/apache/jmeter/gui/util/CheckBoxPanel.java   (with props)
Modified:
    jmeter/trunk/src/components/org/apache/jmeter/control/gui/InterleaveControlGui.java
    jmeter/trunk/src/components/org/apache/jmeter/control/gui/RandomControlGui.java
    jmeter/trunk/src/components/org/apache/jmeter/control/gui/ThroughputControllerGui.java
    jmeter/trunk/src/components/org/apache/jmeter/modifiers/gui/CounterConfigGui.java
    jmeter/trunk/src/core/org/apache/jmeter/control/gui/TransactionControllerGui.java
    jmeter/trunk/xdocs/changes.xml

Modified: jmeter/trunk/src/components/org/apache/jmeter/control/gui/InterleaveControlGui.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/components/org/apache/jmeter/control/gui/InterleaveControlGui.java?rev=1723561&r1=1723560&r2=1723561&view=diff
==============================================================================
--- jmeter/trunk/src/components/org/apache/jmeter/control/gui/InterleaveControlGui.java (original)
+++ jmeter/trunk/src/components/org/apache/jmeter/control/gui/InterleaveControlGui.java Thu
Jan  7 14:28:32 2016
@@ -21,6 +21,7 @@ package org.apache.jmeter.control.gui;
 import javax.swing.JCheckBox;
 
 import org.apache.jmeter.control.InterleaveControl;
+import org.apache.jmeter.gui.util.CheckBoxPanel;
 import org.apache.jmeter.testelement.TestElement;
 import org.apache.jmeter.util.JMeterUtils;
 import org.apache.jorphan.gui.layout.VerticalLayout;
@@ -87,6 +88,6 @@ public class InterleaveControlGui extend
         add(makeTitlePanel());
 
         style = new JCheckBox(JMeterUtils.getResString("ignore_subcontrollers")); // $NON-NLS-1$
-        add(style);
+        add(CheckBoxPanel.wrap(style));
     }
 }

Modified: jmeter/trunk/src/components/org/apache/jmeter/control/gui/RandomControlGui.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/components/org/apache/jmeter/control/gui/RandomControlGui.java?rev=1723561&r1=1723560&r2=1723561&view=diff
==============================================================================
--- jmeter/trunk/src/components/org/apache/jmeter/control/gui/RandomControlGui.java (original)
+++ jmeter/trunk/src/components/org/apache/jmeter/control/gui/RandomControlGui.java Thu Jan
 7 14:28:32 2016
@@ -22,6 +22,7 @@ import javax.swing.JCheckBox;
 
 import org.apache.jmeter.control.InterleaveControl;
 import org.apache.jmeter.control.RandomController;
+import org.apache.jmeter.gui.util.CheckBoxPanel;
 import org.apache.jmeter.testelement.TestElement;
 import org.apache.jmeter.util.JMeterUtils;
 import org.apache.jorphan.gui.layout.VerticalLayout;
@@ -87,6 +88,6 @@ public class RandomControlGui extends Ab
         add(makeTitlePanel());
 
         style = new JCheckBox(JMeterUtils.getResString("ignore_subcontrollers")); // $NON-NLS-1$
-        add(style);
+        add(CheckBoxPanel.wrap(style));
     }
 }

Modified: jmeter/trunk/src/components/org/apache/jmeter/control/gui/ThroughputControllerGui.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/components/org/apache/jmeter/control/gui/ThroughputControllerGui.java?rev=1723561&r1=1723560&r2=1723561&view=diff
==============================================================================
--- jmeter/trunk/src/components/org/apache/jmeter/control/gui/ThroughputControllerGui.java
(original)
+++ jmeter/trunk/src/components/org/apache/jmeter/control/gui/ThroughputControllerGui.java
Thu Jan  7 14:28:32 2016
@@ -31,6 +31,7 @@ import javax.swing.JPanel;
 import javax.swing.JTextField;
 
 import org.apache.jmeter.control.ThroughputController;
+import org.apache.jmeter.gui.util.CheckBoxPanel;
 import org.apache.jmeter.testelement.TestElement;
 import org.apache.jmeter.util.JMeterUtils;
 import org.apache.jorphan.gui.layout.VerticalLayout;
@@ -169,6 +170,6 @@ public class ThroughputControllerGui ext
                 }
             }
         });
-        add(perthread);
+        add(CheckBoxPanel.wrap(perthread));
     }
 }

Modified: jmeter/trunk/src/components/org/apache/jmeter/modifiers/gui/CounterConfigGui.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/components/org/apache/jmeter/modifiers/gui/CounterConfigGui.java?rev=1723561&r1=1723560&r2=1723561&view=diff
==============================================================================
--- jmeter/trunk/src/components/org/apache/jmeter/modifiers/gui/CounterConfigGui.java (original)
+++ jmeter/trunk/src/components/org/apache/jmeter/modifiers/gui/CounterConfigGui.java Thu
Jan  7 14:28:32 2016
@@ -24,6 +24,7 @@ import java.awt.event.ActionListener;
 import javax.swing.JCheckBox;
 
 import org.apache.jmeter.config.gui.AbstractConfigGui;
+import org.apache.jmeter.gui.util.CheckBoxPanel;
 import org.apache.jmeter.modifiers.CounterConfig;
 import org.apache.jmeter.testelement.TestElement;
 import org.apache.jmeter.util.JMeterUtils;
@@ -137,8 +138,8 @@ public class CounterConfigGui extends Ab
         add(endField);
         add(formatField);
         add(varNameField);
-        add(perUserField);
-        add(resetCounterOnEachThreadGroupIteration);
+        add(CheckBoxPanel.wrap(perUserField));
+        add(CheckBoxPanel.wrap(resetCounterOnEachThreadGroupIteration));
 
         perUserField.addActionListener(this);
     }

Modified: jmeter/trunk/src/core/org/apache/jmeter/control/gui/TransactionControllerGui.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/control/gui/TransactionControllerGui.java?rev=1723561&r1=1723560&r2=1723561&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/control/gui/TransactionControllerGui.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/control/gui/TransactionControllerGui.java Thu
Jan  7 14:28:32 2016
@@ -21,6 +21,7 @@ package org.apache.jmeter.control.gui;
 import javax.swing.JCheckBox;
 
 import org.apache.jmeter.control.TransactionController;
+import org.apache.jmeter.gui.util.CheckBoxPanel;
 import org.apache.jmeter.testelement.TestElement;
 import org.apache.jmeter.util.JMeterUtils;
 import org.apache.jorphan.gui.layout.VerticalLayout;
@@ -82,8 +83,8 @@ public class TransactionControllerGui ex
         setBorder(makeBorder());
         add(makeTitlePanel());
         generateParentSample = new JCheckBox(JMeterUtils.getResString("transaction_controller_parent"));
// $NON-NLS-1$
-        add(generateParentSample);
+        add(CheckBoxPanel.wrap(generateParentSample));
         includeTimers = new JCheckBox(JMeterUtils.getResString("transaction_controller_include_timers"),
true); // $NON-NLS-1$
-        add(includeTimers);
+        add(CheckBoxPanel.wrap(includeTimers));
     }
 }

Added: jmeter/trunk/src/core/org/apache/jmeter/gui/util/CheckBoxPanel.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/gui/util/CheckBoxPanel.java?rev=1723561&view=auto
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/gui/util/CheckBoxPanel.java (added)
+++ jmeter/trunk/src/core/org/apache/jmeter/gui/util/CheckBoxPanel.java Thu Jan  7 14:28:32
2016
@@ -0,0 +1,40 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+package org.apache.jmeter.gui.util;
+
+import javax.swing.Box;
+import javax.swing.JCheckBox;
+
+/**
+ * Utility class to wrap a JCheckBox in a horizontal box.
+ * This limits the clickable area to the label only, and not the width of its container.
+ * See https://bz.apache.org/bugzilla/show_bug.cgi?id=58810
+ * Note: using a JPanel affects the alignment within the container
+ */
+public class CheckBoxPanel {
+
+    private CheckBoxPanel() {
+        // not instantiable    
+    }
+    
+    public static Box wrap(JCheckBox cb) {
+        Box b = Box.createHorizontalBox();
+        b.add(cb);
+        return b;
+    }
+}

Propchange: jmeter/trunk/src/core/org/apache/jmeter/gui/util/CheckBoxPanel.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: jmeter/trunk/xdocs/changes.xml
URL: http://svn.apache.org/viewvc/jmeter/trunk/xdocs/changes.xml?rev=1723561&r1=1723560&r2=1723561&view=diff
==============================================================================
--- jmeter/trunk/xdocs/changes.xml (original)
+++ jmeter/trunk/xdocs/changes.xml Thu Jan  7 14:28:32 2016
@@ -168,6 +168,7 @@ Summary
 <li><bug>58784</bug>Make JMeterUtils#runSafe sync/async awt invocation
configurable and change the visualizers to use the async version.</li>
 <li><bug>58790</bug>Issue in CheckDirty and its relation to ActionRouter</li>
 <li><bug>58814</bug>JVM don't recognize option MaxLiveObjectEvacuationRatio;
remove from comments</li>
+<li><bug>58810</bug>Config Element Counter (and others): Check Boxes Toggle
Area Too Big</li>
 </ul>
 <ch_section>Non-functional changes</ch_section>
 <ul>



Mime
View raw message