Examples of LinkTypeFileNode


Examples of org.freeplane.plugin.workspace.nodes.LinkTypeFileNode

  }

  @Override
  public AWorkspaceTreeNode getNode(XMLElement data) {
    String type = data.getAttribute("type", "file");
    LinkTypeFileNode node = new LinkTypeFileNode(type);
   

    String path = data.getAttribute("path", null);
    if (path == null || path.length() == 0) {
      return null;
    }
    node.setLinkURI(URIUtils.createURI(path));    
    String name = data.getAttribute("name", URIUtils.getAbsoluteFile(node.getLinkURI()).getName());
    node.setName(name);
   
    return node;

  }
View Full Code Here

Examples of org.freeplane.plugin.workspace.nodes.LinkTypeFileNode

      FolderLinkNode pNode = new FolderLinkNode();     
      pNode.setPath(project.getRelativeURI(file.toURI()));
      node = pNode;
    }
    else {
      LinkTypeFileNode lNode = new LinkTypeFileNode();
      lNode.setLinkURI(project.getRelativeURI(file.toURI()));
      node = lNode;
    }
    node.setName(file.getName());
    return node;
  }
View Full Code Here

Examples of org.freeplane.plugin.workspace.nodes.LinkTypeFileNode

      chooser.setMultiSelectionEnabled(false);
      int response = chooser.showOpenDialog(UITools.getFrame());
      if(response == JFileChooser.APPROVE_OPTION) {
        File file = chooser.getSelectedFile();
        if(file != null) {
          LinkTypeFileNode node = new LinkTypeFileNode();
          node.setName(file.getName());
          URI path = chooser.getSelectedFile().toURI();
          if (path == null) {
            return;
          }
          URI uri = project.getRelativeURI(path);
          if(uri == null) {
            node.setLinkURI(path);
          }
          else {
            node.setLinkURI(uri);
          }
          targetNode.getModel().addNodeTo(node, targetNode);
          targetNode.refresh();
          targetNode.getModel().requestSave();
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.