jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From milam...@apache.org
Subject svn commit: r1656049 - /jmeter/trunk/src/core/org/apache/jmeter/gui/util/JMeterToolBar.java
Date Fri, 30 Jan 2015 16:25:44 GMT
Author: milamber
Date: Fri Jan 30 16:25:43 2015
New Revision: 1656049

URL: http://svn.apache.org/r1656049
Log:
Code formatting

Modified:
    jmeter/trunk/src/core/org/apache/jmeter/gui/util/JMeterToolBar.java

Modified: jmeter/trunk/src/core/org/apache/jmeter/gui/util/JMeterToolBar.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/gui/util/JMeterToolBar.java?rev=1656049&r1=1656048&r2=1656049&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/gui/util/JMeterToolBar.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/gui/util/JMeterToolBar.java Fri Jan 30 16:25:43
2015
@@ -135,7 +135,7 @@ public class JMeterToolBar extends JTool
         if (userProp != null){
             p = JMeterUtils.loadProperties(userProp, defaultProps);
         } else {
-            p=defaultProps;
+            p = defaultProps;
         }
 
         String order = JMeterUtils.getPropDefault(TOOLBAR_LIST, p.getProperty(TOOLBAR_PROP_NAME));
@@ -191,13 +191,11 @@ public class JMeterToolBar extends JTool
      */
     private Map<String, Boolean> getCurrentButtonsStates() {
         Component[] components = getComponents();
-        Map<String, Boolean> buttonStates = 
-                new HashMap<String, Boolean>(components.length);
+        Map<String, Boolean> buttonStates = new HashMap<String, Boolean>(components.length);
         for (int i = 0; i < components.length; i++) {
-            if(components[i]instanceof JButton) {
+            if (components[i] instanceof JButton) {
                 JButton button = (JButton) components[i];
-                buttonStates.put(button.getActionCommand(),  
-                        Boolean.valueOf(button.isEnabled()));
+                buttonStates.put(button.getActionCommand(), Boolean.valueOf(button.isEnabled()));
             }
         }
         return buttonStates;
@@ -209,15 +207,15 @@ public class JMeterToolBar extends JTool
     public void initButtonsState() {
         final boolean started = false;
         Map<String, Boolean> buttonStates = new HashMap<String, Boolean>();
-        buttonStates.put(ActionNames.ACTION_START,Boolean.valueOf(!started));
-        buttonStates.put(ActionNames.ACTION_START_NO_TIMERS,Boolean.valueOf(!started));
-        buttonStates.put(ActionNames.ACTION_STOP,Boolean.valueOf(started));
-        buttonStates.put(ActionNames.ACTION_SHUTDOWN,Boolean.valueOf(started));
+        buttonStates.put(ActionNames.ACTION_START, Boolean.valueOf(!started));
+        buttonStates.put(ActionNames.ACTION_START_NO_TIMERS, Boolean.valueOf(!started));
+        buttonStates.put(ActionNames.ACTION_STOP, Boolean.valueOf(started));
+        buttonStates.put(ActionNames.ACTION_SHUTDOWN, Boolean.valueOf(started));
         buttonStates.put(ActionNames.UNDO, Boolean.FALSE);
         buttonStates.put(ActionNames.REDO, Boolean.FALSE);
-        buttonStates.put(ActionNames.REMOTE_START_ALL,Boolean.valueOf(!started));
-        buttonStates.put(ActionNames.REMOTE_STOP_ALL,Boolean.valueOf(started));
-        buttonStates.put(ActionNames.REMOTE_SHUT_ALL,Boolean.valueOf(started));
+        buttonStates.put(ActionNames.REMOTE_START_ALL, Boolean.valueOf(!started));
+        buttonStates.put(ActionNames.REMOTE_STOP_ALL, Boolean.valueOf(started));
+        buttonStates.put(ActionNames.REMOTE_SHUT_ALL, Boolean.valueOf(started));
         updateButtons(buttonStates);
     }
     
@@ -230,10 +228,10 @@ public class JMeterToolBar extends JTool
      */
     public void setLocalTestStarted(boolean started) {
         Map<String, Boolean> buttonStates = new HashMap<String, Boolean>(3);
-        buttonStates.put(ActionNames.ACTION_START,Boolean.valueOf(!started));
-        buttonStates.put(ActionNames.ACTION_START_NO_TIMERS,Boolean.valueOf(!started));
-        buttonStates.put(ActionNames.ACTION_STOP,Boolean.valueOf(started));
-        buttonStates.put(ActionNames.ACTION_SHUTDOWN,Boolean.valueOf(started));
+        buttonStates.put(ActionNames.ACTION_START, Boolean.valueOf(!started));
+        buttonStates.put(ActionNames.ACTION_START_NO_TIMERS, Boolean.valueOf(!started));
+        buttonStates.put(ActionNames.ACTION_STOP, Boolean.valueOf(started));
+        buttonStates.put(ActionNames.ACTION_SHUTDOWN, Boolean.valueOf(started));
         updateButtons(buttonStates);
     }
     
@@ -245,9 +243,9 @@ public class JMeterToolBar extends JTool
      */
     public void setRemoteTestStarted(boolean started) {
         Map<String, Boolean> buttonStates = new HashMap<String, Boolean>(3);
-        buttonStates.put(ActionNames.REMOTE_START_ALL,Boolean.valueOf(!started));
-        buttonStates.put(ActionNames.REMOTE_STOP_ALL,Boolean.valueOf(started));
-        buttonStates.put(ActionNames.REMOTE_SHUT_ALL,Boolean.valueOf(started));
+        buttonStates.put(ActionNames.REMOTE_START_ALL, Boolean.valueOf(!started));
+        buttonStates.put(ActionNames.REMOTE_STOP_ALL, Boolean.valueOf(started));
+        buttonStates.put(ActionNames.REMOTE_SHUT_ALL, Boolean.valueOf(started));
         updateButtons(buttonStates);
     }
 
@@ -277,10 +275,10 @@ public class JMeterToolBar extends JTool
     private void updateButtons(Map<String, Boolean> buttonStates) {
         Component[] components = getComponents();
         for (int i = 0; i < components.length; i++) {
-            if(components[i]instanceof JButton) {
+            if (components[i] instanceof JButton) {
                 JButton button = (JButton) components[i];
                 Boolean enabled = buttonStates.get(button.getActionCommand());
-                if(enabled != null) {
+                if (enabled != null) {
                     button.setEnabled(enabled.booleanValue());
                 }
             }



Mime
View raw message