Package org.freeplane.plugin.workspace.model

Examples of org.freeplane.plugin.workspace.model.AWorkspaceTreeNode.refresh()


        }
        File file = new File(((IFileSystemRepresentation) targetNode).getFile(), fileName);
        try {
          file = WorkspaceController.getFileSystemMgr().createFile(fileName, ((IFileSystemRepresentation) targetNode).getFile());
          if (createNewMindmap(file)) {
            targetNode.refresh();
          }
        }
        catch(Exception ex) {
          JOptionPane.showMessageDialog(UITools.getFrame(), ex.getMessage(), "Error ... ", JOptionPane.ERROR_MESSAGE);
          ex.printStackTrace();
View Full Code Here


  public void actionPerformed(ActionEvent e) {
    AWorkspaceTreeNode targetNode = getNodeFromActionEvent(e);
    if(targetNode instanceof IFileSystemRepresentation) {
      if(this.isSelected()==((IFileSystemRepresentation) targetNode).orderDescending()) {
        ((IFileSystemRepresentation) targetNode).orderDescending(!this.isSelected());
        targetNode.refresh();
      }
    }
  }
}
View Full Code Here

        }
        else {
          targetNode.getModel().removeNodeFromParent(targetNode);
        }
        if(parent != null) {
          parent.refresh();
        }
       
      }
     
    }
View Full Code Here

        if(onSkipList(destFile.getParentFile(), properties)) {
          throw new SkipTaskException();
        }
        AWorkspaceTreeNode parent = node.getParent();
        targetNode.getModel().cutNodeFromParent(node);
        parent.refresh();
        targetNode.getModel().nodeMoved(node, srcFile, destFile);
      }
     
      private boolean onSkipList(File dest, Properties properties) {
        if(properties == null || dest == null) {
View Full Code Here

            newNode = node.clone();
          }
          else if (dropAction == DnDConstants.ACTION_MOVE) {
            AWorkspaceTreeNode parent = node.getParent();
            targetNode.getModel().cutNodeFromParent(node);
            parent.refresh();
            newNode = node;
          }
        }
        if(newNode == null) {
          continue;
View Full Code Here

  private void processFileListDrop(AWorkspaceTreeNode targetNode, List<File> files, int dropAction) {
    try {   
      for(File srcFile : files) {
        AWorkspaceTreeNode node = createFSNodeLinks(targetNode, srcFile);
        targetNode.getModel().addNodeTo(node, targetNode);
        node.refresh();
      }
//      WorkspaceUtils.saveCurrentConfiguration();
    }
    catch (Exception e) {
      LogUtils.warn(e);
View Full Code Here

        if(srcFile == null || !srcFile.exists()) {
          continue;
        }
        AWorkspaceTreeNode node = createFSNodeLinks(targetNode, srcFile);
        targetNode.getModel().addNodeTo(node, targetNode);
        node.refresh();
      };
//      WorkspaceUtils.saveCurrentConfiguration();
    }
    catch (Exception e) {
      LogUtils.warn(e);
View Full Code Here

        }
      }     
    }
    AWorkspaceTreeNode parent = node.getParent();
    node.getModel().removeNodeFromParent(node);
    parent.refresh();
    parent.getModel().requestSave();
   
  }

}
View Full Code Here

    }
   
    if (newName != null) {
      if (targetNode instanceof IMutableLinkNode) {
        if (((IMutableLinkNode) targetNode).changeName(newName, panel.applyChangesForLink())) {
          targetNode.refresh();
        }
        else {
          JOptionPane.showMessageDialog(UITools.getFrame(), TextUtils.getText("error_rename_file"),
              TextUtils.getText("error_rename_file_title"), JOptionPane.ERROR_MESSAGE);
          targetNode.setName(oldName);
View Full Code Here

        }
      }
      else {
        try {
          targetNode.getModel().changeNodeName(targetNode, newName);
          targetNode.refresh();
        }
        catch(Exception ex) {
          JOptionPane.showMessageDialog(UITools.getFrame(), TextUtils.getText("error_rename_file") + " ("+ex.getMessage()+")",
              TextUtils.getText("error_rename_file_title"), JOptionPane.ERROR_MESSAGE);
        }
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.