use of org.apache.jmeter.gui.util.JMeterMenuBar in project jmeter by apache.
the class MainFrame method init.
/**
* Create the GUI components and layout.
*/
private void init() {
// WARNING: called from ctor so must not be overridden (i.e. must be private or final)
menuBar = new JMeterMenuBar();
setJMenuBar(menuBar);
JPanel all = new JPanel(new BorderLayout());
all.add(createToolBar(), BorderLayout.NORTH);
JSplitPane treeAndMain = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT);
treePanel = createTreePanel();
treeAndMain.setLeftComponent(treePanel);
JSplitPane topAndDown = new JSplitPane(JSplitPane.VERTICAL_SPLIT);
topAndDown.setOneTouchExpandable(true);
topAndDown.setDividerLocation(0.8);
topAndDown.setResizeWeight(.8);
topAndDown.setContinuousLayout(true);
// see bug jdk 4131528
topAndDown.setBorder(null);
if (!DISPLAY_LOGGER_PANEL) {
topAndDown.setDividerSize(0);
}
mainPanel = createMainPanel();
logPanel = createLoggerPanel();
errorsAndFatalsCounterLogTarget = new ErrorsAndFatalsCounterLogTarget();
GuiPackage.getInstance().getLogEventBus().registerEventListener(logPanel);
GuiPackage.getInstance().getLogEventBus().registerEventListener(errorsAndFatalsCounterLogTarget);
topAndDown.setTopComponent(mainPanel);
topAndDown.setBottomComponent(logPanel);
treeAndMain.setRightComponent(topAndDown);
treeAndMain.setResizeWeight(.2);
treeAndMain.setContinuousLayout(true);
all.add(treeAndMain, BorderLayout.CENTER);
getContentPane().add(all);
tree.setSelectionRow(1);
addWindowListener(new WindowHappenings());
// Building is complete, register as listener
GuiPackage.getInstance().registerAsListener();
setTitle(DEFAULT_TITLE);
// $NON-NLS-1$
setIconImage(JMeterUtils.getImage("icon-apache.png").getImage());
// define AWT WM_CLASS string
setWindowTitle();
refreshErrorsTimer.start();
}
Aggregations