private void removeNodeFromParent(DefaultMutableTreeNode node) {
    TreeNode parent = node.getParent();
    int idx = parent.getIndex(node);
    node.removeFromParent();

    (getModel()).nodesWereRemoved(parent, new int[] {idx}, new TreeNode[] {node});
  }
 private boolean isMovingAvailable(final CheckedTreeNode toolNode, Direction dir) {
   TreeNode parent = toolNode.getParent();
   int index = parent.getIndex(toolNode);
   return dir.isAvailable(index, parent.getChildCount());
 }