1
2
3
4
5
6
7
8
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 2003 <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/gpl.html">General Public
30 * License (GPL) </a>, no warranty <br>
31 *
32 * @version 1.0 18.10.2003 <br>
33 * @author <a href="http://www.simulation.tudelft.nl/people/jacobs.html">Peter
34 * Jacobs </a>
35 */
36 public class StatisticsFrame extends JFrame
37 {
38 /***
39 * constructs a new StatisticsFrame
40 */
41 public StatisticsFrame()
42 {
43 super("statistics");
44 try
45 {
46 this.initialize();
47 } catch (Exception exception)
48 {
49 Logger.warning(this, "StatisticsFrame", exception);
50 }
51 this.pack();
52 this.setVisible(true);
53 }
54
55 /***
56 * initializes the statisticsFrame
57 *
58 * @throws NamingException on failure
59 */
60 public void initialize() throws NamingException
61 {
62 JPanel contentPane = new JPanel(new BorderLayout());
63 contentPane.setPreferredSize(new Dimension(800, 500));
64
65 JSplitPane splitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT);
66
67 splitPane.add(new JScrollPane(new StatisticsTree()));
68 splitPane.add(new ChartPanel());
69 splitPane.setDividerLocation(150);
70 contentPane.add(splitPane, BorderLayout.CENTER);
71
72 this.setContentPane(contentPane);
73 }
74 }