Package org.freeplane.plugin.workspace.components.dialog

Examples of org.freeplane.plugin.workspace.components.dialog.WorkspaceNewFolderPanel


    AWorkspaceProject project = WorkspaceController.getProject(targetNode);
    int mode = WorkspaceNewFolderPanel.MODE_VIRTUAL_PHYSICAL;
    if(targetNode instanceof IFileSystemRepresentation) {
      mode = WorkspaceNewFolderPanel.MODE_VIRTUAL_ONLY;
    }
    WorkspaceNewFolderPanel dialog = new WorkspaceNewFolderPanel(mode , targetNode);
    int response = JOptionPane.showConfirmDialog(UITools.getFrame(), dialog, TextUtils.getText("workspace.action.node.new.folder.dialog.title"), JOptionPane.OK_CANCEL_OPTION, JOptionPane.PLAIN_MESSAGE);
    if(response == JOptionPane.OK_OPTION) {
      String value = dialog.getFolderName();
      if(value == null || value.trim().length() <= 0) {
        //WORKSPACE - ToDo: prepare message, or call this method (with error message) again?
        return;
      }
      if(dialog.isLinkedFolder()) {
        File path = new File(dialog.getLinkPath());
        if (path != null) {
          FolderLinkNode node = new FolderLinkNode();       
          node.setName(value);
          URI uri = project.getRelativeURI(path.toURI());
          if(uri == null) {
View Full Code Here

TOP

Related Classes of org.freeplane.plugin.workspace.components.dialog.WorkspaceNewFolderPanel

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.