/** Main visualizer setup. */ private void init() { this.setLayout(new BorderLayout()); // MAIN PANEL JPanel mainPanel = new JPanel(); Border margin = new EmptyBorder(10, 10, 5, 10); mainPanel.setBorder(margin); mainPanel.setLayout(new BoxLayout(mainPanel, BoxLayout.Y_AXIS)); mainPanel.add(JMeterPluginsUtils.addHelpLinkToPanel(makeTitlePanel(), WIKIPAGE)); // SortFilterModel mySortedModel = // new SortFilterModel(myStatTableModel); myJTable = new JTable(model); myJTable .getTableHeader() .setDefaultRenderer(new JMeterHeaderAsPropertyRenderer(COLUMNS_MSG_PARAMETERS)); myJTable.setPreferredScrollableViewportSize(new Dimension(500, 70)); RendererUtils.applyRenderers(myJTable, RENDERERS); myScrollPane = new JScrollPane(myJTable); this.add(mainPanel, BorderLayout.NORTH); this.add(myScrollPane, BorderLayout.CENTER); saveTable.addActionListener(this); JPanel opts = new JPanel(); opts.add(useGroupName, BorderLayout.WEST); opts.add(saveTable, BorderLayout.CENTER); opts.add(saveHeaders, BorderLayout.EAST); this.add(opts, BorderLayout.SOUTH); }
/** Main visualizer setup. */ private void init() { this.setLayout(new BorderLayout()); // MAIN PANEL JPanel mainPanel = new JPanel(); Border margin = new EmptyBorder(10, 10, 5, 10); Border margin2 = new EmptyBorder(10, 10, 5, 10); mainPanel.setBorder(margin); mainPanel.setLayout(new BoxLayout(mainPanel, BoxLayout.Y_AXIS)); mainPanel.add(makeTitlePanel()); myJTable = new JTable(model); myJTable.setPreferredScrollableViewportSize(new Dimension(500, 80)); RendererUtils.applyRenderers(myJTable, RENDERERS); myScrollPane = new JScrollPane(myJTable); settingsPane = new VerticalPanel(); settingsPane.setBorder(margin2); graphPanel = new AxisGraph(); graphPanel.setPreferredSize(new Dimension(defaultWidth, defaultHeight)); settingsPane.add(createGraphActionsPane()); settingsPane.add(createGraphColumnPane()); settingsPane.add(createGraphTitlePane()); settingsPane.add(createGraphDimensionPane()); JPanel axisPane = new JPanel(new BorderLayout()); axisPane.add(createGraphXAxisPane(), BorderLayout.WEST); axisPane.add(createGraphYAxisPane(), BorderLayout.CENTER); settingsPane.add(axisPane); settingsPane.add(createLegendPane()); tabbedGraph.addTab( JMeterUtils.getResString("aggregate_graph_tab_settings"), settingsPane); // $NON-NLS-1$ tabbedGraph.addTab( JMeterUtils.getResString("aggregate_graph_tab_graph"), graphPanel); // $NON-NLS-1$ // If clic on the Graph tab, make the graph (without apply interval or filter) ChangeListener changeListener = new ChangeListener() { @Override public void stateChanged(ChangeEvent changeEvent) { JTabbedPane srcTab = (JTabbedPane) changeEvent.getSource(); int index = srcTab.getSelectedIndex(); if (srcTab .getTitleAt(index) .equals(JMeterUtils.getResString("aggregate_graph_tab_graph"))) { // $NON-NLS-1$ actionMakeGraph(); } } }; tabbedGraph.addChangeListener(changeListener); spane = new JSplitPane(JSplitPane.VERTICAL_SPLIT); spane.setLeftComponent(myScrollPane); spane.setRightComponent(tabbedGraph); spane.setResizeWeight(.2); spane.setBorder(null); // see bug jdk 4131528 spane.setContinuousLayout(true); this.add(mainPanel, BorderLayout.NORTH); this.add(spane, BorderLayout.CENTER); }