use of org.freeplane.features.mode.filemode.FModeController in project freeplane by freeplane.
the class FModeControllerFactory method createModeController.
public static FModeController createModeController() {
final Controller controller = Controller.getCurrentController();
modeController = new FModeController(controller);
final UserInputListenerFactory userInputListenerFactory = new UserInputListenerFactory(modeController);
modeController.setUserInputListenerFactory(userInputListenerFactory);
controller.addModeController(modeController);
controller.selectModeForBuild(modeController);
new FMapController(modeController);
UrlManager.install(new UrlManager());
MapIO.install(modeController);
new IconController(modeController).install(modeController);
NodeStyleController.install(new NodeStyleController(modeController));
EdgeController.install(new EdgeController(modeController));
new TextController(modeController).install(modeController);
LinkController.install(new LinkController(modeController));
CloudController.install(new CloudController(modeController));
ClipboardController.install(new ClipboardController());
LocationController.install(new LocationController());
LogicalStyleController.install(new LogicalStyleController(modeController));
MapStyle.install(true);
NodeStyleController.getController().addShapeGetter(new Integer(0), new IPropertyHandler<ShapeConfigurationModel, NodeModel>() {
public ShapeConfigurationModel getProperty(final NodeModel node, final ShapeConfigurationModel currentValue) {
return ShapeConfigurationModel.FORK;
}
});
modeController.addAction(new CenterAction());
modeController.addAction(new OpenPathAction());
userInputListenerFactory.setNodePopupMenu(new JPopupMenu());
final FreeplaneToolBar toolBar = new FreeplaneToolBar("main_toolbar", SwingConstants.HORIZONTAL);
FrameController frameController = (FrameController) controller.getViewController();
UIComponentVisibilityDispatcher.install(frameController, toolBar, "toolbarVisible");
userInputListenerFactory.addToolBar("/main_toolbar", ViewController.TOP, toolBar);
userInputListenerFactory.addToolBar("/filter_toolbar", FilterController.TOOLBAR_SIDE, FilterController.getCurrentFilterController().getFilterToolbar());
userInputListenerFactory.addToolBar("/status", ViewController.BOTTOM, controller.getViewController().getStatusBar());
NodeHistory.install(modeController);
return modeController;
}
Aggregations