Search in sources :

Example 6 with AutomaticLayoutController

use of org.freeplane.features.styles.AutomaticLayoutController in project freeplane by freeplane.

the class BModeControllerFactory method createModeController.

public static BModeController createModeController() {
    final Controller controller = Controller.getCurrentController();
    modeController = new BModeController(controller);
    final UserInputListenerFactory userInputListenerFactory = new UserInputListenerFactory(modeController);
    modeController.setUserInputListenerFactory(userInputListenerFactory);
    controller.addModeController(modeController);
    controller.selectModeForBuild(modeController);
    new MapController(modeController);
    new IconController(modeController).install(modeController);
    UrlManager.install(new UrlManager());
    MapIO.install(modeController);
    AttributeController.install(new AttributeController(modeController));
    NodeStyleController.install(new NodeStyleController(modeController));
    EdgeController.install(new EdgeController(modeController));
    CloudController.install(new CloudController(modeController));
    NoteController.install(new NoteController());
    new TextController(modeController).install(modeController);
    LinkController.install(new LinkController(modeController));
    LogicalStyleController.install(new LogicalStyleController(modeController));
    try {
        ClipboardController.install(new ClipboardController());
    } catch (final AccessControlException e) {
        LogUtils.warn("can not access system clipboard, clipboard controller disabled");
    }
    LocationController.install(new LocationController());
    SummaryNode.install();
    FreeNode.install();
    MapStyle.install(true);
    final BToolbarContributor toolbarContributor = new BToolbarContributor();
    modeController.addUiBuilder(Phase.ACTIONS, "main_toolbar_url", toolbarContributor);
    controller.getMapViewManager().addMapViewChangeListener(toolbarContributor);
    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.getController(controller).getFilterToolbar());
    userInputListenerFactory.addToolBar("/status", ViewController.BOTTOM, controller.getViewController().getStatusBar());
    FoldingController.install(new FoldingController());
    new ViewerController();
    EncryptionController.install(new EncryptionController(modeController));
    new AutomaticLayoutController();
    return modeController;
}
Also used : UrlManager(org.freeplane.features.url.UrlManager) ClipboardController(org.freeplane.features.clipboard.ClipboardController) AutomaticLayoutController(org.freeplane.features.styles.AutomaticLayoutController) LinkController(org.freeplane.features.link.LinkController) LocationController(org.freeplane.features.nodelocation.LocationController) ViewerController(org.freeplane.view.swing.features.filepreview.ViewerController) IconController(org.freeplane.features.icon.IconController) FoldingController(org.freeplane.features.map.FoldingController) FrameController(org.freeplane.features.ui.FrameController) NoteController(org.freeplane.features.note.NoteController) EdgeController(org.freeplane.features.edge.EdgeController) AttributeController(org.freeplane.features.attribute.AttributeController) TextController(org.freeplane.features.text.TextController) LogicalStyleController(org.freeplane.features.styles.LogicalStyleController) UserInputListenerFactory(org.freeplane.view.swing.ui.UserInputListenerFactory) AccessControlException(java.security.AccessControlException) AttributeController(org.freeplane.features.attribute.AttributeController) EncryptionController(org.freeplane.features.encrypt.EncryptionController) ViewerController(org.freeplane.view.swing.features.filepreview.ViewerController) ClipboardController(org.freeplane.features.clipboard.ClipboardController) NoteController(org.freeplane.features.note.NoteController) LogicalStyleController(org.freeplane.features.styles.LogicalStyleController) EdgeController(org.freeplane.features.edge.EdgeController) ViewController(org.freeplane.features.ui.ViewController) CloudController(org.freeplane.features.cloud.CloudController) LinkController(org.freeplane.features.link.LinkController) FilterController(org.freeplane.features.filter.FilterController) MapController(org.freeplane.features.map.MapController) LocationController(org.freeplane.features.nodelocation.LocationController) FoldingController(org.freeplane.features.map.FoldingController) FrameController(org.freeplane.features.ui.FrameController) IconController(org.freeplane.features.icon.IconController) Controller(org.freeplane.features.mode.Controller) TextController(org.freeplane.features.text.TextController) AutomaticLayoutController(org.freeplane.features.styles.AutomaticLayoutController) NodeStyleController(org.freeplane.features.nodestyle.NodeStyleController) JPopupMenu(javax.swing.JPopupMenu) MapController(org.freeplane.features.map.MapController) EncryptionController(org.freeplane.features.encrypt.EncryptionController) NodeStyleController(org.freeplane.features.nodestyle.NodeStyleController) CloudController(org.freeplane.features.cloud.CloudController) FreeplaneToolBar(org.freeplane.core.ui.components.FreeplaneToolBar)

Example 7 with AutomaticLayoutController

use of org.freeplane.features.styles.AutomaticLayoutController in project freeplane by freeplane.

the class MModeControllerFactory method createAddIns.

private void createAddIns() {
    final StyleEditorPanel panel = new StyleEditorPanel(modeController, uiFactory, true);
    final JScrollPane styleScrollPane = new JScrollPane(panel, JScrollPane.VERTICAL_SCROLLBAR_ALWAYS, JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
    UITools.setScrollbarIncrement(styleScrollPane);
    final JComponent tabs = (JComponent) modeController.getUserInputListenerFactory().getToolBar("/format").getComponent(1);
    tabs.add(TextUtils.getText("format_panel"), styleScrollPane);
    new AttributePanelManager(modeController);
    new HierarchicalIcons();
    new AutomaticLayoutController();
    new BlinkingNodeHook();
    SummaryNode.install();
    final MMapController mapController = (MMapController) modeController.getMapController();
    mapController.addMapLifeCycleListener(new SummaryNodeMapUpdater(modeController, mapController));
    final AlwaysUnfoldedNode alwaysUnfoldedNode = new AlwaysUnfoldedNode();
    modeController.addAction(new SetAlwaysUnfoldedNodeFlagsAction(alwaysUnfoldedNode));
    modeController.addAction(new RemoveAllAlwaysUnfoldedNodeFlagsAction(alwaysUnfoldedNode));
    FreeNode.install();
    new CreationModificationDatePresenter();
    modeController.addExtension(ReminderHook.class, new ReminderHook(modeController));
    new AutomaticEdgeColorHook();
    new ViewerController();
    PresentationController.install(modeController);
    modeController.addAction(new AddAttributeAction());
    modeController.addAction(new RemoveFirstAttributeAction());
    modeController.addAction(new RemoveLastAttributeAction());
    modeController.addAction(new RemoveAllAttributesAction());
    modeController.addAction(new AddExternalImageAction());
    modeController.addAction(new RemoveExternalImageAction());
    modeController.addAction(new ChangeExternalImageAction());
    modeController.addAction(new ShowFormatPanelAction());
    modeController.addAction(new FitToPage());
    modeController.addAction(new UpdateCheckAction());
    MEncryptionController.install(new MEncryptionController(modeController));
    modeController.addAction(new IconSelectionPlugin());
    modeController.addAction(new NewParentNode());
    modeController.addAction(new SaveAll());
    modeController.addAction(new SortNodes());
    modeController.addAction(new SplitNode());
    new ChangeNodeLevelController(modeController);
    NodeHistory.install(modeController);
    modeController.addAction(new ImportXmlFile());
    modeController.addAction(new ImportMindmanagerFiles());
}
Also used : StyleEditorPanel(org.freeplane.features.styles.mindmapmode.styleeditorpanel.StyleEditorPanel) RemoveFirstAttributeAction(org.freeplane.features.attribute.mindmapmode.RemoveFirstAttributeAction) AutomaticLayoutController(org.freeplane.features.styles.AutomaticLayoutController) AddAttributeAction(org.freeplane.features.attribute.mindmapmode.AddAttributeAction) MEncryptionController(org.freeplane.features.encrypt.mindmapmode.MEncryptionController) AutomaticEdgeColorHook(org.freeplane.features.edge.AutomaticEdgeColorHook) ImportMindmanagerFiles(org.freeplane.features.export.mindmapmode.ImportMindmanagerFiles) RemoveExternalImageAction(org.freeplane.view.swing.features.filepreview.RemoveExternalImageAction) FitToPage(org.freeplane.view.swing.features.FitToPage) ChangeNodeLevelController(org.freeplane.features.map.mindmapmode.ChangeNodeLevelController) MMapController(org.freeplane.features.map.mindmapmode.MMapController) ShowFormatPanelAction(org.freeplane.features.styles.mindmapmode.ShowFormatPanelAction) ViewerController(org.freeplane.view.swing.features.filepreview.ViewerController) RemoveAllAttributesAction(org.freeplane.features.attribute.mindmapmode.RemoveAllAttributesAction) ImportXmlFile(org.freeplane.features.export.mindmapmode.ImportXmlFile) BlinkingNodeHook(org.freeplane.view.swing.features.BlinkingNodeHook) CreationModificationDatePresenter(org.freeplane.features.time.CreationModificationDatePresenter) SplitNode(org.freeplane.features.text.mindmapmode.SplitNode) AlwaysUnfoldedNode(org.freeplane.features.map.AlwaysUnfoldedNode) RemoveLastAttributeAction(org.freeplane.features.attribute.mindmapmode.RemoveLastAttributeAction) SortNodes(org.freeplane.features.text.mindmapmode.SortNodes) IconSelectionPlugin(org.freeplane.features.icon.mindmapmode.IconSelectionPlugin) SummaryNodeMapUpdater(org.freeplane.features.map.mindmapmode.SummaryNodeMapUpdater) SaveAll(org.freeplane.features.url.mindmapmode.SaveAll) JScrollPane(javax.swing.JScrollPane) AddExternalImageAction(org.freeplane.view.swing.features.filepreview.AddExternalImageAction) NewParentNode(org.freeplane.features.map.mindmapmode.NewParentNode) JComponent(javax.swing.JComponent) AttributePanelManager(org.freeplane.view.swing.map.attribute.AttributePanelManager) HierarchicalIcons(org.freeplane.features.icon.HierarchicalIcons) SetAlwaysUnfoldedNodeFlagsAction(org.freeplane.features.map.mindmapmode.SetAlwaysUnfoldedNodeFlagsAction) RemoveAllAlwaysUnfoldedNodeFlagsAction(org.freeplane.features.map.mindmapmode.RemoveAllAlwaysUnfoldedNodeFlagsAction) ChangeExternalImageAction(org.freeplane.view.swing.features.filepreview.ChangeExternalImageAction) ReminderHook(org.freeplane.view.swing.features.time.mindmapmode.ReminderHook)

Aggregations

AutomaticLayoutController (org.freeplane.features.styles.AutomaticLayoutController)7 AutomaticEdgeColorHook (org.freeplane.features.edge.AutomaticEdgeColorHook)3 ViewerController (org.freeplane.view.swing.features.filepreview.ViewerController)3 Color (java.awt.Color)2 MEncryptionController (org.freeplane.features.encrypt.mindmapmode.MEncryptionController)2 ImportMindmanagerFiles (org.freeplane.features.export.mindmapmode.ImportMindmanagerFiles)2 HierarchicalIcons (org.freeplane.features.icon.HierarchicalIcons)2 AlwaysUnfoldedNode (org.freeplane.features.map.AlwaysUnfoldedNode)2 NodeModel (org.freeplane.features.map.NodeModel)2 ChangeNodeLevelController (org.freeplane.features.map.mindmapmode.ChangeNodeLevelController)2 LogicalStyleController (org.freeplane.features.styles.LogicalStyleController)2 ActionEvent (java.awt.event.ActionEvent)1 ActionListener (java.awt.event.ActionListener)1 AccessControlException (java.security.AccessControlException)1 ArrayList (java.util.ArrayList)1 DefaultComboBoxModel (javax.swing.DefaultComboBoxModel)1 JComponent (javax.swing.JComponent)1 JPopupMenu (javax.swing.JPopupMenu)1 JScrollPane (javax.swing.JScrollPane)1 IExtension (org.freeplane.core.extension.IExtension)1