Package org.freeplane.view.swing.features.filepreview

Examples of org.freeplane.view.swing.features.filepreview.ViewerController


   * The handling of the file and the updating of the icons
   * is done in the ViewerController.
   */
  @Override
  protected void actionPerformed(final ActionEvent e, final NodeModel node) {
    final ViewerController vc = ((ViewerController) Controller.getCurrentController().getModeController()
        .getExtension(ViewerController.class));
    try {
          URI uri = new URI(ResourceController.FREEPLANE_RESOURCE_URL_PROTOCOL, null, "/images/svg/Progress_quarter_00.svg", null);
      vc.paste(uri, node);
    } catch (URISyntaxException e1) {
      e1.printStackTrace();
    }
  }
View Full Code Here


   * The handling of the file and the updating of the icons
   * is done in the ViewerController.
   */
  @Override
  protected void actionPerformed(final ActionEvent e, final NodeModel node) {
    final ViewerController vc = ((ViewerController) Controller.getCurrentController().getModeController()
        .getExtension(ViewerController.class));
    try {
          URI uri = new URI(ResourceController.FREEPLANE_RESOURCE_URL_PROTOCOL, null, "/images/svg/Progress_tenth_00.svg", null);
      vc.paste(uri, node);
    } catch (URISyntaxException e1) {
      e1.printStackTrace();
    }
  }
View Full Code Here

    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();
View Full Code Here

    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);
    }
  }
View Full Code Here

    AlwaysUnfoldedNode.install();
    FreeNode.install();
    new CreationModificationPlugin();
    modeController.addExtension(ReminderHook.class, new ReminderHook(modeController));
    new AutomaticEdgeColorHook();
    new ViewerController();
    modeController.addAction(new AddAttributeAction());
    modeController.addAction(new RemoveFirstAttributeAction());
    modeController.addAction(new RemoveLastAttributeAction());
    modeController.addAction(new RemoveAllAttributesAction());
    modeController.addAction(new AddExternalImageAction());
View Full Code Here

    userInputListenerFactory.addToolBar("/filter_toolbar", ViewController.BOTTOM, 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();
    new CloneStateIconSupplier().registerStateIconProvider();
    return modeController;
  }
View Full Code Here

    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());
  }
View Full Code Here

        new IModeControllerExtensionProvider() {
          public void installExtension(ModeController modeController) {
            final ExportController exportController = ExportController.getController(modeController);
            exportController.addExportEngine(new ExampleFileFilter("pdf", TextUtils.getText("export_pdf_text")), new ExportPdf());
            exportController.addExportEngine(new ExampleFileFilter("svg", TextUtils.getText("export_svg_text")), new ExportSvg());
            final ViewerController extension = (ViewerController) modeController
                .getExtension(ViewerController.class);
            extension.addFactory(new SvgViewerFactory());
          }
        }, props);
  }
View Full Code Here

    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);
  }
View Full Code Here

      this.fileList = fileList;
    }

    public void paste(Transferable t, final NodeModel target, final boolean asSibling, final boolean isLeft, int dropAction) {
      boolean pasteImages = dropAction == DnDConstants.ACTION_COPY;
      ViewerController viewerController = ((ViewerController)Controller.getCurrentModeController().getExtension(ViewerController.class));
      for (final File file : fileList) {
        if(pasteImages  && viewerController.paste(file, target, PasteMode.valueOf(asSibling), isLeft)){
          continue;
        }
        final MMapController mapController = (MMapController) Controller.getCurrentModeController().getMapController();
        final NodeModel node = mapController.newNode(file.getName(), target.getMap());
        ((MLinkController) LinkController.getController()).setLinkTypeDependantLink(node, file);
View Full Code Here

TOP

Related Classes of org.freeplane.view.swing.features.filepreview.ViewerController

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.