jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pmoua...@apache.org
Subject svn commit: r1722176 - in /jmeter/trunk: src/core/org/apache/jmeter/threads/gui/ThreadGroupGui.java xdocs/changes.xml
Date Tue, 29 Dec 2015 16:09:32 GMT
Author: pmouawad
Date: Tue Dec 29 16:09:31 2015
New Revision: 1722176

URL: http://svn.apache.org/viewvc?rev=1722176&view=rev
Log:
Bug 58782 - ThreadGroup : Improve ergonomy
Bugzilla Id: 58782

Modified:
    jmeter/trunk/src/core/org/apache/jmeter/threads/gui/ThreadGroupGui.java
    jmeter/trunk/xdocs/changes.xml

Modified: jmeter/trunk/src/core/org/apache/jmeter/threads/gui/ThreadGroupGui.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/threads/gui/ThreadGroupGui.java?rev=1722176&r1=1722175&r2=1722176&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/threads/gui/ThreadGroupGui.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/threads/gui/ThreadGroupGui.java Tue Dec 29 16:09:31
2015
@@ -122,11 +122,7 @@ public class ThreadGroupGui extends Abst
         }
         scheduler.setSelected(tg.getPropertyAsBoolean(ThreadGroup.SCHEDULER));
 
-        if (scheduler.isSelected()) {
-            mainPanel.setVisible(true);
-        } else {
-            mainPanel.setVisible(false);
-        }
+        toggleSchedulerFields(scheduler.isSelected());
 
         // Check if the property exists
         String s = tg.getPropertyAsString(ThreadGroup.START_TIME);
@@ -144,13 +140,19 @@ public class ThreadGroupGui extends Abst
     @Override
     public void itemStateChanged(ItemEvent ie) {
         if (ie.getItem().equals(scheduler)) {
-            if (scheduler.isSelected()) {
-                mainPanel.setVisible(true);
-            } else {
-                mainPanel.setVisible(false);
-            }
+            toggleSchedulerFields(scheduler.isSelected());
         }
     }
+    
+    /**
+     * @param enable boolean used to enable/disable fields related to scheduler
+     */
+    private void toggleSchedulerFields(boolean enable) {
+        start.setEnabled(enable);
+        end.setEnabled(enable);
+        duration.setEnabled(enable);
+        delay.setEnabled(enable);
+    }
 
     private JPanel createControllerPanel() {
         loopPanel = new LoopControlPanel(false);
@@ -291,11 +293,11 @@ public class ThreadGroupGui extends Abst
         mainPanel = new VerticalPanel();
         mainPanel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(),
                 JMeterUtils.getResString("scheduler_configuration"))); // $NON-NLS-1$
-        mainPanel.add(createStartTimePanel());
-        mainPanel.add(createEndTimePanel());
         mainPanel.add(createDurationPanel());
         mainPanel.add(createDelayPanel());
-        mainPanel.setVisible(false);
+        mainPanel.add(createStartTimePanel());
+        mainPanel.add(createEndTimePanel());
+        toggleSchedulerFields(false);
         VerticalPanel intgrationPanel = new VerticalPanel();
         intgrationPanel.add(threadPropsPanel);
         intgrationPanel.add(mainPanel);

Modified: jmeter/trunk/xdocs/changes.xml
URL: http://svn.apache.org/viewvc/jmeter/trunk/xdocs/changes.xml?rev=1722176&r1=1722175&r2=1722176&view=diff
==============================================================================
--- jmeter/trunk/xdocs/changes.xml (original)
+++ jmeter/trunk/xdocs/changes.xml Tue Dec 29 16:09:31 2015
@@ -159,6 +159,7 @@ Summary
 <li><bug>58728</bug>Drop old behavioural properties</li>
 <li><bug>57319</bug>Upgrade to HttpClient 4.5.X. With the big help from
Oleg Kalnichevski.</li>
 <li><bug>58772</bug>Deprecate MongoDB related elements</li>
+<li><bug>58782</bug>ThreadGroup : Improve ergonomy</li>
 </ul>
 <ch_section>Non-functional changes</ch_section>
 <ul>



Mime
View raw message