jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pmoua...@apache.org
Subject svn commit: r1717751 - in /jmeter/trunk: src/components/org/apache/jmeter/visualizers/Graph.java src/components/org/apache/jmeter/visualizers/GraphVisualizer.java src/core/org/apache/jmeter/gui/util/JMeterColor.java xdocs/changes.xml
Date Thu, 03 Dec 2015 12:23:40 GMT
Author: pmouawad
Date: Thu Dec  3 12:23:40 2015
New Revision: 1717751

URL: http://svn.apache.org/viewvc?rev=1717751&view=rev
Log:
Bug 58684 - JMeterColor does not need to extend java.awt.Color
#resolve #37
Bugzilla Id: 58684

Modified:
    jmeter/trunk/src/components/org/apache/jmeter/visualizers/Graph.java
    jmeter/trunk/src/components/org/apache/jmeter/visualizers/GraphVisualizer.java
    jmeter/trunk/src/core/org/apache/jmeter/gui/util/JMeterColor.java
    jmeter/trunk/xdocs/changes.xml

Modified: jmeter/trunk/src/components/org/apache/jmeter/visualizers/Graph.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/components/org/apache/jmeter/visualizers/Graph.java?rev=1717751&r1=1717750&r2=1717751&view=diff
==============================================================================
--- jmeter/trunk/src/components/org/apache/jmeter/visualizers/Graph.java (original)
+++ jmeter/trunk/src/components/org/apache/jmeter/visualizers/Graph.java Thu Dec  3 12:23:40
2015
@@ -236,7 +236,7 @@ public class Graph extends JComponent im
         if (wantMedian) {
             int median = (int) (oneSample.getMedian() * height / graphMax);
 
-            g.setColor(JMeterColor.purple);
+            g.setColor(JMeterColor.PURPLE);
             g.drawLine(adjustedWidth, height - median, adjustedWidth, (height - median -
1));
         }
 
@@ -249,7 +249,7 @@ public class Graph extends JComponent im
         if (wantThroughput) {
             int throughput = (int) (oneSample.getThroughput() * height / throughputMax);
 
-            g.setColor(JMeterColor.dark_green);
+            g.setColor(JMeterColor.DARK_GREEN);
             g.drawLine(adjustedWidth, height - throughput, adjustedWidth, (height - throughput
- 1));
         }
     }

Modified: jmeter/trunk/src/components/org/apache/jmeter/visualizers/GraphVisualizer.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/components/org/apache/jmeter/visualizers/GraphVisualizer.java?rev=1717751&r1=1717750&r2=1717751&view=diff
==============================================================================
--- jmeter/trunk/src/components/org/apache/jmeter/visualizers/GraphVisualizer.java (original)
+++ jmeter/trunk/src/components/org/apache/jmeter/visualizers/GraphVisualizer.java Thu Dec
 3 12:23:40 2015
@@ -291,8 +291,8 @@ public class GraphVisualizer extends Abs
         data = createChooseCheckBox("graph_results_data", Color.black); // $NON-NLS-1$
         average = createChooseCheckBox("graph_results_average", Color.blue); // $NON-NLS-1$
         deviation = createChooseCheckBox("graph_results_deviation", Color.red); // $NON-NLS-1$
-        throughput = createChooseCheckBox("graph_results_throughput", JMeterColor.dark_green);
// $NON-NLS-1$
-        median = createChooseCheckBox("graph_results_median", JMeterColor.purple); // $NON-NLS-1$
+        throughput = createChooseCheckBox("graph_results_throughput", JMeterColor.DARK_GREEN);
// $NON-NLS-1$
+        median = createChooseCheckBox("graph_results_median", JMeterColor.PURPLE); // $NON-NLS-1$
 
         chooseGraphsPanel.add(selectGraphsLabel);
         chooseGraphsPanel.add(data);
@@ -353,8 +353,8 @@ public class GraphVisualizer extends Abs
         dataField = createInfoField(Color.black, 5);
         averageField = createInfoField(Color.blue, 5);
         deviationField = createInfoField(Color.red, 5);
-        throughputField = createInfoField(JMeterColor.dark_green, 15);
-        medianField = createInfoField(JMeterColor.purple, 5);
+        throughputField = createInfoField(JMeterColor.DARK_GREEN, 15);
+        medianField = createInfoField(JMeterColor.PURPLE, 5);
 
         graphInfoPanel.add(createInfoColumn(createInfoLabel("graph_results_no_samples", noSamplesField),
// $NON-NLS-1$
                 noSamplesField, createInfoLabel("graph_results_deviation", deviationField),
deviationField)); // $NON-NLS-1$

Modified: jmeter/trunk/src/core/org/apache/jmeter/gui/util/JMeterColor.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/gui/util/JMeterColor.java?rev=1717751&r1=1717750&r2=1717751&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/gui/util/JMeterColor.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/gui/util/JMeterColor.java Thu Dec  3 12:23:40
2015
@@ -20,20 +20,15 @@ package org.apache.jmeter.gui.util;
 
 import java.awt.Color;
 
-public class JMeterColor extends Color {
-    private static final long serialVersionUID = 240L;
-
-    public static final Color dark_green = new JMeterColor(0F, .5F, 0F);
-
-    public static final Color LAVENDER = new JMeterColor(206F / 255F, 207F / 255F, 1F);
-
-    public static final Color purple = new JMeterColor(150 / 255F, 0, 150 / 255F);
-
-    public JMeterColor(float r, float g, float b) {
-        super(r, g, b);
-    }
-
-    public JMeterColor() {
-        super(0, 0, 0);
-    }
+public class JMeterColor {
+    
+    public static final Color DARK_GREEN = new Color(0F, .5F, 0F);
+    @Deprecated
+    public static final Color dark_green = DARK_GREEN;
+
+    public static final Color LAVENDER = new Color(206F / 255F, 207F / 255F, 1F);
+
+    public static final Color PURPLE = new Color(150 / 255F, 0, 150 / 255F);
+    @Deprecated
+    public static final Color purple = PURPLE;
 }

Modified: jmeter/trunk/xdocs/changes.xml
URL: http://svn.apache.org/viewvc/jmeter/trunk/xdocs/changes.xml?rev=1717751&r1=1717750&r2=1717751&view=diff
==============================================================================
--- jmeter/trunk/xdocs/changes.xml (original)
+++ jmeter/trunk/xdocs/changes.xml Thu Dec  3 12:23:40 2015
@@ -154,6 +154,7 @@ Summary
 <li>Updated to slf4j-1.7.12 (from 1.7.10)</li>
 <li>Updated to xmlgraphics-commons-2.0.1 (from 1.5)</li>
 <li><bug>57981</bug>Require a minimum of Java 7. Partly contributed by
Graham Russell (jmeter at ham1.co.uk)</li>
+<li><bug>58684</bug>JMeterColor does not need to extend java.awt.Color.
Contributed by Benoit Wiart (benoit dot wiart at gmail.com)</li>
 </ul>
  
  <!-- =================== Bug fixes =================== -->



Mime
View raw message