use of org.freeplane.features.mode.QuitAction in project freeplane by freeplane.
the class FreeplaneGUIStarter method createController.
public Controller createController() {
try {
Controller controller = new Controller(applicationResourceController);
Controller.setCurrentController(controller);
Compat.macAppChanges();
controller.addAction(new QuitAction());
applicationResourceController.init();
LogUtils.createLogger();
FreeplaneGUIStarter.showSysInfo();
final String lookandfeel = System.getProperty("lookandfeel", applicationResourceController.getProperty("lookandfeel"));
FrameController.setLookAndFeel(lookandfeel);
final JFrame frame;
USE_RIBBONS_MENU = UITools.useRibbonsMenu();
if (USE_RIBBONS_MENU) {
frame = new JRibbonFrame("Freeplane");
initIcons(applicationResourceController);
} else {
frame = new JFrame("Freeplane");
}
frame.setName(UITools.MAIN_FREEPLANE_FRAME);
splash = new FreeplaneSplashModern(frame);
if (!System.getProperty("org.freeplane.nosplash", "false").equals("true")) {
splash.setVisible(true);
}
final MMapViewController mapViewController = new MMapViewController(controller);
viewController = new ApplicationViewController(controller, mapViewController, frame);
System.setSecurityManager(new FreeplaneSecurityManager());
mapViewController.addMapViewChangeListener(applicationResourceController.getLastOpenedList());
FilterController.install();
PrintController.install();
FormatController.install(new FormatController());
final ScannerController scannerController = new ScannerController();
ScannerController.install(scannerController);
scannerController.addParsersForStandardFormats();
ModelessAttributeController.install();
TextController.install();
TimeController.install();
LinkController.install();
IconController.install();
HelpController.install();
controller.addAction(new UpdateCheckAction());
controller.addAction(new NextNodeAction(Direction.FORWARD));
controller.addAction(new NextNodeAction(Direction.BACK));
controller.addAction(new NextNodeAction(Direction.FORWARD_N_FOLD));
controller.addAction(new NextNodeAction(Direction.BACK_N_FOLD));
controller.addAction(new NextPresentationItemAction());
controller.addAction(new ShowSelectionAsRectangleAction());
controller.addAction(new ViewLayoutTypeAction(MapViewLayout.OUTLINE));
FilterController.getCurrentFilterController().getConditionFactory().addConditionController(70, new LogicalStyleFilterController());
MapController.install();
NodeHistory.install(controller);
return controller;
} catch (final Exception e) {
LogUtils.severe(e);
throw new RuntimeException(e);
}
}
Aggregations