addPlanControllerListener(controller.getPlanController());
addFocusListener();
updateFocusTraversalPolicy();
JMenuBar homeMenuBar = createMenuBar(home, preferences, controller);
setJMenuBar(homeMenuBar);
Container contentPane = getContentPane();
contentPane.add(createToolBar(home), BorderLayout.NORTH);
contentPane.add(createMainPane(home, preferences, controller));
if (OperatingSystem.isMacOSXLeopardOrSuperior()) {
// Under Mac OS X 10.5, add some dummy labels at left and right borders
// to avoid the tool bar to be attached on these borders
// (segmented buttons created on this system aren't properly rendered
// when they are aligned vertically)
contentPane.add(new JLabel(), BorderLayout.WEST);
contentPane.add(new JLabel(), BorderLayout.EAST);
}
disableMenuItemsDuringDragAndDrop(controller.getPlanController().getView(), homeMenuBar);
// Change component orientation
applyComponentOrientation(ComponentOrientation.getOrientation(Locale.getDefault()));