jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pmoua...@apache.org
Subject [jmeter] branch master updated: Bug 64276 - Search popup: Improve UX
Date Sat, 28 Mar 2020 22:56:50 GMT
This is an automated email from the ASF dual-hosted git repository.

pmouawad pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/jmeter.git


The following commit(s) were added to refs/heads/master by this push:
     new fb96732  Bug 64276 - Search popup: Improve UX
fb96732 is described below

commit fb96732639c7b1591915c9a55fcb428db29caffd
Author: pmouawad <p.mouawad@ubik-ingenierie.com>
AuthorDate: Sat Mar 28 23:56:35 2020 +0100

    Bug 64276 - Search popup: Improve UX
---
 .../apache/jmeter/gui/action/SearchTreeDialog.java   | 20 ++++++++++++--------
 xdocs/changes.xml                                    |  1 +
 2 files changed, 13 insertions(+), 8 deletions(-)

diff --git a/src/core/src/main/java/org/apache/jmeter/gui/action/SearchTreeDialog.java b/src/core/src/main/java/org/apache/jmeter/gui/action/SearchTreeDialog.java
index 2901b00..f1fbd6a 100644
--- a/src/core/src/main/java/org/apache/jmeter/gui/action/SearchTreeDialog.java
+++ b/src/core/src/main/java/org/apache/jmeter/gui/action/SearchTreeDialog.java
@@ -45,6 +45,7 @@ import javax.swing.JFrame;
 import javax.swing.JLabel;
 import javax.swing.JPanel;
 import javax.swing.JRootPane;
+import javax.swing.JTextField;
 import javax.swing.JTree;
 import javax.swing.tree.TreePath;
 
@@ -61,10 +62,11 @@ import org.apache.jmeter.util.JMeterUtils;
 import org.apache.jorphan.documentation.VisibleForTesting;
 import org.apache.jorphan.gui.ComponentUtil;
 import org.apache.jorphan.gui.JFactory;
-import org.apache.jorphan.gui.JLabeledTextField;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import net.miginfocom.swing.MigLayout;
+
 /**
  * Dialog to search in tree of element
  */
@@ -90,9 +92,9 @@ public class SearchTreeDialog extends JDialog implements ActionListener
{ // NOS
 
     private JButton cancelButton;
 
-    private JLabeledTextField searchTF;
+    private JTextField searchTF;
 
-    private JLabeledTextField replaceTF;
+    private JTextField replaceTF;
 
     private JLabel statusLabel;
 
@@ -152,7 +154,7 @@ public class SearchTreeDialog extends JDialog implements ActionListener
{ // NOS
     private void init() { // WARNING: called from ctor so must not be overridden (i.e. must
be private or final)
         this.getContentPane().setLayout(new BorderLayout(10,10));
 
-        searchTF = new JLabeledTextField(JMeterUtils.getResString("search_text_field"), 20);
//$NON-NLS-1$
+        searchTF = new JTextField(20);
         searchTF.setAlignmentY(TOP_ALIGNMENT);
         if (lastSearchConditions != null) {
             searchTF.setText(lastSearchConditions.getLeft());
@@ -160,7 +162,7 @@ public class SearchTreeDialog extends JDialog implements ActionListener
{ // NOS
             isRegexpCB.setSelected(lastSearchConditions.getRight());
         }
 
-        replaceTF = new JLabeledTextField(JMeterUtils.getResString("search_text_replace"),
20); //$NON-NLS-1$
+        replaceTF = new JTextField(20);
         replaceTF.setAlignmentX(TOP_ALIGNMENT);
         statusLabel = new JLabel(" ");
         statusLabel.setPreferredSize(new Dimension(100, 20));
@@ -177,12 +179,14 @@ public class SearchTreeDialog extends JDialog implements ActionListener
{ // NOS
         searchCriterionPanel.add(isRegexpCB);
 
         JPanel searchPanel = new JPanel();
-        searchPanel.setLayout(new GridLayout(4, 1));
+        searchPanel.setLayout(new MigLayout("fillx, wrap 2", "[][fill,grow]"));
         searchPanel.setBorder(BorderFactory.createEmptyBorder(7, 3, 3, 3));
+        searchPanel.add(JMeterUtils.labelFor(searchTF, "search_text_field"));
         searchPanel.add(searchTF);
+        searchPanel.add(JMeterUtils.labelFor(replaceTF, "search_text_replace"));
         searchPanel.add(replaceTF);
-        searchPanel.add(statusLabel);
-        searchPanel.add(searchCriterionPanel);
+        searchPanel.add(statusLabel, "span 2");
+        searchPanel.add(searchCriterionPanel, "span 2");
 
         JPanel buttonsPanel = new JPanel(new GridLayout(9, 1));
         searchButton = createButton("search_search_all"); //$NON-NLS-1$
diff --git a/xdocs/changes.xml b/xdocs/changes.xml
index a024927..3794ab2 100644
--- a/xdocs/changes.xml
+++ b/xdocs/changes.xml
@@ -151,6 +151,7 @@ For instance: log viewer, JSR223 code editor were not previously scaled
with zoo
   <li><bug>64119</bug>Use first renderer from <code>view.results.tree.renderers_order</code>
property as default in View Results Tree</li>
   <li><bug>64148</bug>Use gray icons for disabled elements in the tree,
display subtree as gray</li>
   <li><bug>64198</bug>Allow spaces in <code>${...}</code> expressions
around functions.</li>
+  <li><bug>64276</bug>Search popup: Improve UX</li>
 </ul>
 
 <ch_section>Non-functional changes</ch_section>


Mime
View raw message