1 | void init() {↵ | | 1 | void init() {// called from ctor, so must not be overridable↵
|
2 | menuBar = new JMeterMenuBar();↵ | | 2 | menuBar = new ReportMenuBar();↵
|
3 | setJMenuBar(menuBar);↵ | | 3 | setJMenuBar(menuBar);↵
|
|
4 | JPanel all = new JPanel(new BorderLayout());↵ | | 4 | JPanel all = new JPanel(new BorderLayout());↵
|
5 | all.add(createToolBar(), BorderLayout.NORTH);↵ | | 5 | all.add(createToolBar(), BorderLayout.NORTH);↵
|
|
6 | JSplitPane treeAndMain = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT);↵ | | 6 | JSplitPane treeAndMain = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT);↵
|
|
7 | treePanel = createTreePanel();↵ | | 7 | treePanel = createTreePanel();↵
|
8 | treeAndMain.setLeftComponent(treePanel);↵ | | 8 | treeAndMain.setLeftComponent(treePanel);↵
|
|
9 | mainPanel = createMainPanel();↵ | | 9 | mainPanel = createMainPanel();↵
|
10 | treeAndMain.setRightComponent(mainPanel);↵ | | 10 | treeAndMain.setRightComponent(mainPanel);↵
|
|
11 | treeAndMain.setResizeWeight(.2);↵ | | 11 | treeAndMain.setResizeWeight(.2);↵
|
12 | treeAndMain.setContinuousLayout(true);↵ | | 12 | treeAndMain.setContinuousLayout(true);↵
|
13 | all.add(treeAndMain, BorderLayout.CENTER);↵ | | 13 | all.add(treeAndMain, BorderLayout.CENTER);↵
|
|
14 | getContentPane().add(all);↵ | | 14 | getContentPane().add(all);↵
|
|
15 | tree.setSelectionRow(1);↵ | | 15 | tree.setSelectionRow(1);↵
|
16 | addWindowListener(new WindowHappenings());↵ | | 16 | addWindowListener(new WindowHappenings());↵
|
17 | ↵ | | |
|
18 | setTitle(DEFAULT_TITLE);↵ | | 17 | setTitle(DEFAULT_TITLE);↵
|
19 | setIconImage(JMeterUtils.getImage("jmeter.jpg").getImage());// $NON-NLS-1$↵ | | 18 | setIconImage(JMeterUtils.getImage("jmeter.jpg").getImage());// $NON-NLS-1$↵
|
20 | }↵ | | 19 | }↵
|
|
21 | public void setExtendedFrameTitle(String fname) {↵ | | 20 | public void setExtendedFrameTitle(String fname) {↵
|
22 | // file New operation may set to null, so just return app name↵ | | 21 | // file New operation may set to null, so just return app name↵
|
23 | if (fname == null) {↵ | | 22 | if (fname == null) {↵
|
24 | setTitle(DEFAULT_TITLE);↵ | | 23 | setTitle(DEFAULT_TITLE);↵
|
25 | return;↵ | | 24 | return;↵
|
26 | }↵ | | 25 | }↵
|
|
27 | // allow for windows / chars in filename↵ | | 26 | // allow for windows / chars in filename↵
|
28 | String temp = fname.replace('\\', '/'); // $NON-NLS-1$ // $NON-NLS-2$↵ | | 27 | String temp = fname.replace('\\', '/'); // $NON-NLS-1$ // $NON-NLS-2$↵
|
29 | String simpleName = temp.substring(temp.lastIndexOf("/") + 1);// $NON-NLS-1$↵ | | 28 | String simpleName = temp.substring(temp.lastIndexOf("/") + 1);// $NON-NLS-1$↵
|
30 | setTitle(simpleName + " (" + fname + ") - " + DEFAULT_TITLE); // $NON-NLS-1$ // $NON-NLS-2$↵ | | 29 | setTitle(simpleName + " (" + fname + ") - " + DEFAULT_TITLE); // $NON-NLS-1$ // $NON-NLS-2$↵
|
31 | }↵ | | 30 | }↵
|
|
32 | /**↵ | | 31 | /**↵
|
33 | * Create the JMeter tool bar pane containing the running indicator.↵ | | 32 | * Create the JMeter tool bar pane containing the running indicator.↵
|
34 | * ↵ | | 33 | * ↵
|
35 | * @return a panel containing the running indicator↵ | | 34 | * @return a panel containing the running indicator↵
|
36 | */↵ | | 35 | */↵
|
37 | private Component createToolBar() {↵ | | 36 | protected Component createToolBar() {↵
|
38 | Box toolPanel = new Box(BoxLayout.X_AXIS);↵ | | 37 | Box toolPanel = new Box(BoxLayout.X_AXIS);↵
|
39 | toolPanel.add(Box.createRigidArea(new Dimension(10, 15)));↵ | | 38 | toolPanel.add(Box.createRigidArea(new Dimension(10, 15)));↵
|
40 | toolPanel.add(Box.createGlue());↵ | | 39 | toolPanel.add(Box.createGlue());↵
|
41 | toolPanel.add(activeThreads); | | 40 | toolPanel.add(runningIndicator);
|