woolfel     2004/06/16 12:40:58

  Modified:    src/components/org/apache/jmeter/visualizers
                        DistributionGraphVisualizer.java
  Log:
  updated the Visualizer to implement Printable interface.

  

  peter
  
  Revision  Changes    Path
  1.8       +19 -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.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- DistributionGraphVisualizer.java  9 Jun 2004 23:56:12 -0000       1.7
  +++ DistributionGraphVisualizer.java  16 Jun 2004 19:40:58 -0000      1.8
  @@ -33,6 +33,7 @@
   import javax.swing.Box;
   import javax.swing.JButton;
   import javax.swing.JCheckBox;
  +import javax.swing.JComponent;
   import javax.swing.JLabel;
   import javax.swing.JPanel;
   import javax.swing.JTextField;
  @@ -57,7 +58,8 @@
    * @version   $Revision: 
    */
   public class DistributionGraphVisualizer extends AbstractVisualizer
  -        implements ImageVisualizer, ItemListener, GraphListener, ActionListener, 
Clearable
  +        implements ImageVisualizer, ItemListener, GraphListener, ActionListener,
  +        Clearable, Printable
   {
       SamplingStatCalculator model;
       private JPanel graphPanel = null;
  @@ -274,12 +276,27 @@
                return graphInfoPanel;
       }
       
  +    /**
  +     * Create the save button. This is temporary until
  +     * I finish the Action based approach.
  +     * @return
  +     */
       private JButton createSaveButton(){
                saveButton = new JButton("Save Graph");
                saveButton.addActionListener(this);
        return saveButton;
       }
   
  +     /**
  +      * Method implements Printable, which is suppose to
  +      * return the correct internal component. The Action
  +      * class can then print or save the graphics to a
  +      * file.
  +      */
  +     public JComponent getPrintableComponent(){
  +             return this.graphPanel;
  +     }
  +     
        /**
         * Handle the action
         */    
  
  
  

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

Reply via email to