Search in sources :

Example 1 with ViewerController

use of org.freeplane.view.swing.features.filepreview.ViewerController in project freeplane by freeplane.

the class RemoveProgressAction method actionPerformed.

/**
 *Removes the progresss icons and the extended progress icons
 */
@Override
protected void actionPerformed(final ActionEvent e, final NodeModel node) {
    final ProgressUtilities progUtil = new ProgressUtilities();
    // remove progress icon if present
    if (progUtil.hasProgressIcons(node)) {
        ProgressIcons.removeProgressIcons(node);
    }
    // remove extended progress icon
    if (progUtil.hasExtendedProgressIcon(node)) {
        final ViewerController vc = ((ViewerController) Controller.getCurrentController().getModeController().getExtension(ViewerController.class));
        vc.undoableDeactivateHook(node);
    }
}
Also used : ViewerController(org.freeplane.view.swing.features.filepreview.ViewerController)

Example 2 with ViewerController

use of org.freeplane.view.swing.features.filepreview.ViewerController in project freeplane by freeplane.

the class HeadlessMModeControllerFactory method createAddIns.

private void createAddIns() {
    new HierarchicalIcons();
    new AutomaticLayoutController();
    new BlinkingNodeHook();
    SummaryNode.install();
    AlwaysUnfoldedNode.install();
    FreeNode.install();
    new CreationModificationPlugin();
    new AutomaticEdgeColorHook();
    new ViewerController();
    MEncryptionController.install(new MEncryptionController(modeController));
    new ChangeNodeLevelController(modeController);
    NodeHistory.install(modeController);
    modeController.addAction(new ImportMindmanagerFiles());
}
Also used : BlinkingNodeHook(org.freeplane.view.swing.features.BlinkingNodeHook) CreationModificationPlugin(org.freeplane.features.time.CreationModificationPlugin) AutomaticLayoutController(org.freeplane.features.styles.AutomaticLayoutController) MEncryptionController(org.freeplane.features.encrypt.mindmapmode.MEncryptionController) AutomaticEdgeColorHook(org.freeplane.features.edge.mindmapmode.AutomaticEdgeColorHook) ImportMindmanagerFiles(org.freeplane.features.export.mindmapmode.ImportMindmanagerFiles) ChangeNodeLevelController(org.freeplane.features.map.mindmapmode.ChangeNodeLevelController) HierarchicalIcons(org.freeplane.features.icon.HierarchicalIcons) ViewerController(org.freeplane.view.swing.features.filepreview.ViewerController)

Example 3 with ViewerController

use of org.freeplane.view.swing.features.filepreview.ViewerController in project freeplane by freeplane.

the class MapView method loadBackgroundImage.

private void loadBackgroundImage() {
    final MapStyle mapStyle = getModeController().getExtension(MapStyle.class);
    final String uriString = mapStyle.getProperty(model, MapStyle.RESOURCES_BACKGROUND_IMAGE);
    backgroundComponent = null;
    if (uriString != null) {
        URI uri = assignAbsoluteURI(uriString);
        final ViewerController vc = getModeController().getExtension(ViewerController.class);
        final IViewerFactory factory = vc.getCombiFactory();
        if (uri != null) {
            assignViewerToBackgroundComponent(factory, uri);
        }
    }
    repaint();
}
Also used : MapStyle(org.freeplane.features.styles.MapStyle) IViewerFactory(org.freeplane.view.swing.features.filepreview.IViewerFactory) ViewerController(org.freeplane.view.swing.features.filepreview.ViewerController) URI(java.net.URI)

Example 4 with ViewerController

use of org.freeplane.view.swing.features.filepreview.ViewerController in project freeplane by freeplane.

the class Activator method registerBrowseModeExtension.

private void registerBrowseModeExtension(final BundleContext context) {
    final Hashtable<String, String[]> props = new Hashtable<String, String[]>();
    props.put("mode", new String[] { BModeController.MODENAME });
    context.registerService(IModeControllerExtensionProvider.class.getName(), new IModeControllerExtensionProvider() {

        public void installExtension(ModeController modeController) {
            final ViewerController extension = (ViewerController) modeController.getExtension(ViewerController.class);
            extension.addFactory(new SvgViewerFactory());
        }
    }, props);
}
Also used : Hashtable(java.util.Hashtable) MModeController(org.freeplane.features.mode.mindmapmode.MModeController) BModeController(org.freeplane.features.mode.browsemode.BModeController) ModeController(org.freeplane.features.mode.ModeController) ViewerController(org.freeplane.view.swing.features.filepreview.ViewerController) IModeControllerExtensionProvider(org.freeplane.main.osgi.IModeControllerExtensionProvider)

Example 5 with ViewerController

use of org.freeplane.view.swing.features.filepreview.ViewerController 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)

Aggregations

ViewerController (org.freeplane.view.swing.features.filepreview.ViewerController)10 AutomaticLayoutController (org.freeplane.features.styles.AutomaticLayoutController)4 URI (java.net.URI)3 BModeController (org.freeplane.features.mode.browsemode.BModeController)3 URISyntaxException (java.net.URISyntaxException)2 AccessControlException (java.security.AccessControlException)2 Hashtable (java.util.Hashtable)2 JPopupMenu (javax.swing.JPopupMenu)2 FreeplaneToolBar (org.freeplane.core.ui.components.FreeplaneToolBar)2 AttributeController (org.freeplane.features.attribute.AttributeController)2 ClipboardController (org.freeplane.features.clipboard.ClipboardController)2 CloudController (org.freeplane.features.cloud.CloudController)2 EdgeController (org.freeplane.features.edge.EdgeController)2 AutomaticEdgeColorHook (org.freeplane.features.edge.mindmapmode.AutomaticEdgeColorHook)2 EncryptionController (org.freeplane.features.encrypt.EncryptionController)2 MEncryptionController (org.freeplane.features.encrypt.mindmapmode.MEncryptionController)2 ImportMindmanagerFiles (org.freeplane.features.export.mindmapmode.ImportMindmanagerFiles)2 FilterController (org.freeplane.features.filter.FilterController)2 IconController (org.freeplane.features.icon.IconController)2 LinkController (org.freeplane.features.link.LinkController)2