Package org.freeplane.features.ui

Examples of org.freeplane.features.ui.ViewController


    return preview;
  }
 
  protected URI createURI(final NodeModel node) {
    final Controller controller = Controller.getCurrentController();
    final ViewController viewController = controller.getViewController();
    final MapModel map = node.getMap();
    final File file = map.getFile();
    final boolean useRelativeUri = ResourceController.getResourceController().getProperty("links").equals(
        "relative");
    if (file == null && useRelativeUri) {
      JOptionPane.showMessageDialog(viewController.getContentPane(), TextUtils
          .getText("not_saved_for_image_error"), "Freeplane", JOptionPane.WARNING_MESSAGE);
      return null;
    }
    final UrlManager urlManager = controller.getModeController().getExtension(UrlManager.class);
    final JFileChooser chooser = urlManager.getFileChooser(null, false);
View Full Code Here


    if(! HtmlUtils.isHtmlNode(text)){
      text = HtmlUtils.plainToHTML(text);
    }
    if (editInternalWysiwyg) {
      final EditNodeWYSIWYG editNodeWYSIWYG = new EditNodeWYSIWYG(node, text, editControl, true);
      final ViewController viewController = Controller.getCurrentModeController().getController().getViewController();
      if(EditedComponent.TEXT.equals(editControl.getEditType())){
        int preferredHeight = (int) (getComponent(node).getHeight() * 1.2);
        preferredHeight = Math.max(preferredHeight, Integer.parseInt(ResourceController.getResourceController()
          .getProperty("el__min_default_window_height")));
        preferredHeight = Math.min(preferredHeight, Integer.parseInt(ResourceController.getResourceController()
View Full Code Here

            }
        };
    }

    private void setStatusInfo(String text) {
        final ViewController viewController = Controller.getCurrentController().getViewController();
        viewController.out(text);
    }
View Full Code Here

          getModeController().tryToCloseDialog();
        }
      });
      Controller controller = SModeControllerFactory.getInstance().createController(dialog);
      modeController = (SModeController) controller.getModeController();
      final ViewController viewController = controller.getViewController();
      viewController.init(controller);
      dialog.addComponentListener(new ComponentAdapter() {
        @Override
        public void componentHidden(final ComponentEvent e) {
            final WindowConfigurationStorage windowConfigurationStorage = new WindowConfigurationStorage(getKey() + ".dialog");
            windowConfigurationStorage.storeDialogPositions(dialog);
View Full Code Here

  };

  public void actionPerformed(final ActionEvent e) {
    final ResourceController resourceController = ResourceController.getResourceController();
    resourceController.setProperty("note_location", position);
    final ViewController viewController = Controller.getCurrentModeController().getController().getViewController();
    viewController.changeNoteWindowLocation();
  }
View Full Code Here

    final IUndoHandler undoHandler = (IUndoHandler) map.getExtension(IUndoHandler.class);
    undoHandler.redo();
  }

  public void setStatusInfo(final String info) {
    final ViewController viewController = getViewController();
    viewController.out(info);
  }
View Full Code Here

  private IMapViewManager getMapViewManager() {
    return Controller.getCurrentController().getMapViewManager();
  }

  public void setStatusInfo(final String infoPanelKey, final String info) {
    final ViewController viewController = getViewController();
    viewController.addStatusInfo(infoPanelKey, info, null);
  }
View Full Code Here

    final ViewController viewController = getViewController();
    viewController.addStatusInfo(infoPanelKey, info, null);
  }

  public void setStatusInfo(final String infoPanelKey, final String info, final String iconKey) {
    final ViewController viewController = getViewController();
    viewController.addStatusInfo(infoPanelKey, info, FreeplaneIconUtils.createStandardIcon(iconKey));
  }
View Full Code Here

    viewController.addStatusInfo(infoPanelKey, info, FreeplaneIconUtils.createStandardIcon(iconKey));
  }

  @Deprecated
  public void setStatusInfo(final String infoPanelKey, final Icon icon) {
    final ViewController viewController = getViewController();
    viewController.addStatusInfo(infoPanelKey, null, icon);
  }
View Full Code Here

  public void actionPerformed(final ActionEvent e) {
    final JFileChooser chooser = new JFileChooser();
    chooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
    chooser.setDialogTitle(TextUtils.getText("select_folder_for_importing"));
    final ViewController viewController = Controller.getCurrentController().getViewController();
    final int returnVal = chooser.showOpenDialog(viewController.getContentPane());
    if (returnVal == JFileChooser.APPROVE_OPTION) {
      final File folder = chooser.getSelectedFile();
      viewController.out("Importing folder structure ...");
      try {
        importFolderStructure(folder, Controller.getCurrentModeController().getMapController().getSelectedNode(),
        /*redisplay=*/true);
      }
      catch (final Exception ex) {
        LogUtils.severe(ex);
      }
      viewController.out("Folder structure imported.");
    }
  }
View Full Code Here

TOP

Related Classes of org.freeplane.features.ui.ViewController

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.