View Javadoc

1   /*
2    * @(#) StatisticsFrame.java Oct 17, 2003
3    * 
4    * Copyright (c) 2002-2005 Delft University of Technology Jaffalaan 5, 2628 BX
5    * Delft, the Netherlands. All rights reserved.
6    * 
7    * This software is proprietary information of Delft University of Technology
8    * The code is published under the Lesser General Public License
9    */
10  package nl.tudelft.simulation.dsol.gui.statistics;
11  
12  import java.awt.BorderLayout;
13  import java.awt.Dimension;
14  
15  import javax.naming.NamingException;
16  import javax.swing.JFrame;
17  import javax.swing.JPanel;
18  import javax.swing.JScrollPane;
19  import javax.swing.JSplitPane;
20  
21  import nl.tudelft.simulation.logger.Logger;
22  
23  /***
24   * The StatisticsFrame <br>
25   * (c) copyright 2002-2005 <a href="http://www.simulation.tudelft.nl">Delft
26   * University of Technology </a>, the Netherlands. <br>
27   * See for project information <a
28   * href="http://www.simulation.tudelft.nl">www.simulation.tudelft.nl </a> <br>
29   * License of use: <a href="http://www.gnu.org/copyleft/lesser.html">Lesser
30   * General Public License (LGPL) </a>, no warranty.
31   * 
32   * @version $Revision$ $Date$
33   * @author <a href="http://www.tbm.tudelft.nl/webstaf/peterja">Peter Jacobs </a>
34   */
35  public class StatisticsFrame extends JFrame
36  {
37  	/***
38  	 * constructs a new StatisticsFrame
39  	 */
40  	public StatisticsFrame()
41  	{
42  		super("statistics");
43  		try
44  		{
45  			this.initialize();
46  		} catch (Exception exception)
47  		{
48  			Logger.warning(this, "StatisticsFrame", exception);
49  		}
50  		this.pack();
51  		this.setVisible(true);
52  	}
53  
54  	/***
55  	 * initializes the statisticsFrame
56  	 * 
57  	 * @throws NamingException on failure
58  	 */
59  	public void initialize() throws NamingException
60  	{
61  		JPanel contentPane = new JPanel(new BorderLayout());
62  		contentPane.setPreferredSize(new Dimension(800, 500));
63  
64  		JSplitPane splitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT);
65  
66  		splitPane.add(new JScrollPane(new StatisticsTree()));
67  		splitPane.add(new ChartPanel());
68  		splitPane.setDividerLocation(150);
69  		contentPane.add(splitPane, BorderLayout.CENTER);
70  
71  		this.setContentPane(contentPane);
72  	}
73  }