jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From milam...@apache.org
Subject svn commit: r1724461 - /jmeter/trunk/src/core/org/apache/jmeter/config/gui/ArgumentsPanel.java
Date Wed, 13 Jan 2016 17:16:42 GMT
Author: milamber
Date: Wed Jan 13 17:16:42 2016
New Revision: 1724461

URL: http://svn.apache.org/viewvc?rev=1724461&view=rev
Log:
Bug 58848 : when adding an argument (add button or from clipboard) scroll the table to the
new line

This closes #71


Modified:
    jmeter/trunk/src/core/org/apache/jmeter/config/gui/ArgumentsPanel.java

Modified: jmeter/trunk/src/core/org/apache/jmeter/config/gui/ArgumentsPanel.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/config/gui/ArgumentsPanel.java?rev=1724461&r1=1724460&r2=1724461&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/config/gui/ArgumentsPanel.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/config/gui/ArgumentsPanel.java Wed Jan 13 17:16:42
2016
@@ -465,9 +465,11 @@ public class ArgumentsPanel extends Abst
             up.setEnabled(true);
             down.setEnabled(true);
         }
-        // Highlight (select) the appropriate row.
+        
+        // Highlight (select) and scroll the appropriate row.
         int rowToSelect = tableModel.getRowCount() - 1;
         table.setRowSelectionInterval(rowToSelect, rowToSelect);
+        table.scrollRectToVisible(table.getCellRect(rowToSelect, 0, true));
     }
 
     /**
@@ -493,9 +495,10 @@ public class ArgumentsPanel extends Abst
                 // Enable DELETE (which may already be enabled, but it won't hurt)
                 delete.setEnabled(true);
 
-                // Highlight (select) the appropriate rows.
+                // Highlight (select) and scroll to the appropriate rows.
                 int rowToSelect = tableModel.getRowCount() - 1;
                 table.setRowSelectionInterval(rowCount, rowToSelect);
+                table.scrollRectToVisible(table.getCellRect(rowCount, 0, true));
             }
         } catch (IOException ioe) {
             JOptionPane.showMessageDialog(this,



Mime
View raw message