Ejemplo n.º 1
0
    private void prepareActions(TreeNode selectedTreeNode) {

      ActionRegistry.NEW_FOLDER.get(GWTFolderAction.class).setSelectedTreeNode(selectedTreeNode);
      ActionRegistry.NEW_FOLDER.get(GWTFolderAction.class).setTree(tree);
      ActionRegistry.RENAME_FOLDER.get(GWTFolderAction.class).setSelectedTreeNode(selectedTreeNode);
      ActionRegistry.RENAME_FOLDER.get(GWTFolderAction.class).setTree(tree);
      ActionRegistry.DELETE_FOLDER.get(GWTFolderAction.class).setSelectedTreeNode(selectedTreeNode);
      ActionRegistry.DELETE_FOLDER.get(GWTFolderAction.class).setTree(tree);
      ActionRegistry.EMPTY_FOLDER.get(GWTFolderAction.class).setSelectedTreeNode(selectedTreeNode);
      ActionRegistry.EMPTY_FOLDER.get(GWTFolderAction.class).setTree(tree);
      ActionRegistry.MOVE_FOLDER.get(GWTFolderAction.class).setSelectedTreeNode(selectedTreeNode);
      ActionRegistry.MOVE_FOLDER.get(GWTFolderAction.class).setTree(tree);
    }
Ejemplo n.º 2
0
    public void onEditorExit(EditorExitEvent event) {

      event.isCancelled();
      event.getEditCompletionEvent();
      if (!alreadyDiscarded) {
        if (checkInput(event)) {
          String newName = event.getNewValue() != null ? event.getNewValue().toString() : null;
          TreeNode renamedNode = (TreeNode) event.getRecord();
          ActionRegistry.RENAME_FOLDER.get(RenameFolderAction.class).setRenamedNode(renamedNode);
          ActionRegistry.RENAME_FOLDER.get(RenameFolderAction.class).setNewName(newName);
          ActionRegistry.RENAME_FOLDER.execute();
        }
      }
    }