You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jmeter-dev@jakarta.apache.org by kh...@apache.org on 2001/10/01 16:20:30 UTC

cvs commit: jakarta-jmeter/src/org/apache/jmeter/visualizers GraphAccumVisualizer.java

khammond    01/10/01 07:20:30

  Modified:    src/org/apache/jmeter/visualizers GraphAccumVisualizer.java
  Log:
  New GUI style.
  
  Revision  Changes    Path
  1.2       +47 -28    jakarta-jmeter/src/org/apache/jmeter/visualizers/GraphAccumVisualizer.java
  
  Index: GraphAccumVisualizer.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jmeter/src/org/apache/jmeter/visualizers/GraphAccumVisualizer.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- GraphAccumVisualizer.java	2001/08/29 11:48:29	1.1
  +++ GraphAccumVisualizer.java	2001/10/01 14:20:30	1.2
  @@ -59,9 +59,11 @@
   import java.util.*;
   import java.awt.event.*;
   import javax.swing.*;
  +import javax.swing.border.*;
   
   import org.apache.jmeter.samplers.SampleResult;
   import org.apache.jmeter.gui.*;
  +import org.apache.jmeter.util.JMeterUtils;
   
   import org.apache.log4j.*;
   /**
  @@ -71,7 +73,7 @@
    *
    * @author     Khor Soon Hin
    * @created    2001/08/11
  - * @version    $Revision: 1.1 $ $Date: 2001/08/29 11:48:29 $
  + * @version    $Revision: 1.2 $ $Date: 2001/10/01 14:20:30 $
    */
   public class GraphAccumVisualizer extends JPanel
     implements ImageVisualizer, ModelSupported,
  @@ -141,33 +143,50 @@
       return legendPanel;
     };
   
  -  /**
  -   * Setup all the swing components
  -   */
  -  private void init()
  -  {
  -    catClass.debug("Start : init1");
  -    graph = new GraphAccum(model);
  -    graph.setVisualizer(this);
  -
  -    JScrollPane graphScrollPanel = new 
  -      JScrollPane(graph,JScrollPane.VERTICAL_SCROLLBAR_NEVER,
  -      JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
  -    graphScrollPanel.setViewportBorder(
  -      BorderFactory.createEmptyBorder(2, 2, 2, 2));
  -    legendPanel = new JPanel();
  -    JScrollPane legendScrollPanel = new
  -      JScrollPane(legendPanel);
  -    JSplitPane graphSplitPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT,
  -      graphScrollPanel, legendScrollPanel);
  -
  -    setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
  -    setLayout(new BorderLayout());
  -    namePanel = new NamePanel(model);
  -    this.add(namePanel,BorderLayout.NORTH);
  -    add(graphSplitPane, BorderLayout.CENTER);
  -    catClass.debug("End : init1");
  -  }
  +	/**
  +	* Setup all the swing components
  +	*/
  +	private void init()
  +	{
  +		catClass.debug("Start : init1");
  +		graph = new GraphAccum(model);
  +		graph.setVisualizer(this);
  +
  +		this.setLayout(new BorderLayout());
  +
  +		// MAIN PANEL
  +		JPanel mainPanel = new JPanel();
  +		Border margin = new EmptyBorder(10, 10, 5, 10);
  +		mainPanel.setBorder(margin);
  +		mainPanel.setLayout(new VerticalLayout(5, VerticalLayout.LEFT));
  +
  +		// TITLE
  +		JLabel panelTitleLabel = new JLabel(JMeterUtils.getResString("graph_full_results_title"));
  +		Font curFont = panelTitleLabel.getFont();
  +		int curFontSize = curFont.getSize();
  +		curFontSize += 4;
  +		panelTitleLabel.setFont(new Font(curFont.getFontName(), curFont.getStyle(), curFontSize));
  +		mainPanel.add(panelTitleLabel);
  +
  +		// NAME
  +		namePanel = new NamePanel(model);
  +		mainPanel.add(namePanel);
  +
  +		JScrollPane graphScrollPanel = new 
  +		JScrollPane(graph,JScrollPane.VERTICAL_SCROLLBAR_NEVER, 
  +			JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
  +		graphScrollPanel.setViewportBorder(
  +			BorderFactory.createEmptyBorder(2, 2, 2, 2));
  +		legendPanel = new JPanel();
  +
  +		JScrollPane legendScrollPanel = new JScrollPane(legendPanel);
  +		JSplitPane graphSplitPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT,
  +			graphScrollPanel, legendScrollPanel);
  +
  +		this.add(mainPanel, BorderLayout.NORTH);
  +		this.add(graphSplitPane, BorderLayout.CENTER);
  +		catClass.debug("End : init1");
  +	}
   
     /**
      * Gets the Image attribute of the GraphVisualizer object
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org