woolfel     2004/09/28 06:39:27

  Modified:    src/components/org/apache/jmeter/visualizers
                        DistributionGraph.java
                        DistributionGraphVisualizer.java
  Log:
  In the process of writing the tutorial, I noticed somethings are not

  necessary and a bit confusing to new developers. therefore, I went

  ahead and cleaned up DistributionGraph. It should make it easier to

  explain in the tutorial.

  

  peter
  
  Revision  Changes    Path
  1.4       +2 -31     
jakarta-jmeter/src/components/org/apache/jmeter/visualizers/DistributionGraph.java
  
  Index: DistributionGraph.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-jmeter/src/components/org/apache/jmeter/visualizers/DistributionGraph.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- DistributionGraph.java    6 Jun 2004 22:07:41 -0000       1.3
  +++ DistributionGraph.java    28 Sep 2004 13:39:27 -0000      1.4
  @@ -27,7 +27,6 @@
   
   import javax.swing.JComponent;
   import javax.swing.Scrollable;
  -import javax.swing.SwingUtilities;
   
   import org.apache.jmeter.samplers.Clearable;
   import org.apache.jorphan.logging.LoggingManager;
  @@ -49,7 +48,7 @@
    */
   public class DistributionGraph
       extends JComponent
  -    implements Scrollable, GraphListener, Clearable
  +    implements Scrollable, Clearable
   {
       private static Logger log = LoggingManager.getLoggerForClass();
   
  @@ -163,37 +162,9 @@
       {}
   
        /**
  -      * method simply calls repaint()
  -      */
  -    public void updateGui()
  -    {
  -        repaint();
  -    }
  -
  -     /**
  -      * updateGui is called by GraphModel. Unlike Graph
  -      * class, distribution graph can delay drawing
  +      * Method is responsible for calling drawSample and updating
         * the graph.
         */
  -    public void updateGui(final Sample oneSample)
  -    {
  -        final SamplingStatCalculator m = this.model;
  -        SwingUtilities.invokeLater(new Runnable()
  -        {
  -            public void run()
  -            {
  -                Graphics g = getGraphics();
  -
  -                if (g != null)
  -                {
  -                     synchronized(m){
  -                                             drawSample(m, g);
  -                     }
  -                }
  -            }
  -        });
  -    }
  -
       public void paintComponent(Graphics g)
       {
           super.paintComponent(g);
  
  
  
  1.10      +2 -2      
jakarta-jmeter/src/components/org/apache/jmeter/visualizers/DistributionGraphVisualizer.java
  
  Index: DistributionGraphVisualizer.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-jmeter/src/components/org/apache/jmeter/visualizers/DistributionGraphVisualizer.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- DistributionGraphVisualizer.java  17 Jun 2004 12:40:28 -0000      1.9
  +++ DistributionGraphVisualizer.java  28 Sep 2004 13:39:27 -0000      1.10
  @@ -97,7 +97,7 @@
                        graph.setPreferredSize(new Dimension(getWidth() - 40, 
getHeight() - 160));
        }
                graphPanel.updateUI();
  -        graph.updateGui();
  +        graph.repaint();
       }
   
       public synchronized void updateGui(Sample s)
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to