Ejemplo n.º 1
0
  /**
   * @param tree JTree to collect expanded paths from.
   * @param paths output parameter.
   */
  public static void collectExpandedPaths(
      @NotNull final JTree tree, @NotNull final List<TreePath> paths) {
    final TreeModel model = tree.getModel();
    final Object root = model.getRoot();
    LOG.assertTrue(root != null);

    collectExpandedPathsImpl(tree, paths, new TreePath(root));
  }
Ejemplo n.º 2
0
 public static ActionCallback selectFirstNode(final JTree tree) {
   final TreeModel model = tree.getModel();
   final Object root = model.getRoot();
   TreePath selectionPath = new TreePath(root);
   if (!tree.isRootVisible() && model.getChildCount(root) > 0)
     selectionPath = selectionPath.pathByAddingChild(model.getChild(root, 0));
   return selectPath(tree, selectionPath);
 }
 @Override
 public boolean isModified(CodeStyleSettings settings) {
   TreeModel treeModel = myTreeTable.getTree().getModel();
   TreeNode root = (TreeNode) treeModel.getRoot();
   if (isModified(root, settings)) {
     return true;
   }
   return false;
 }
  public double setNodeHeights(TreeModel tree, Likelihood likelihood, Prior prior) {
    double prob = 0.0;
    NodeRef node = tree.getRoot();
    Clade currentClade = getClade(tree, node);

    int childcount = tree.getChildCount(node);
    for (int i = 0; i < childcount; i++) {
      NodeRef child = tree.getChild(node, i);
      if (!tree.isExternal(child)) {
        //				prob += setNodeHeights(tree, child, currentClade, likelihood,
        //						prior);
      }
    }

    return prob;
  }
 @Override
 protected void resetImpl(final CodeStyleSettings settings) {
   TreeModel treeModel = myTreeTable.getTree().getModel();
   TreeNode root = (TreeNode) treeModel.getRoot();
   resetNode(root, settings);
 }
 @Override
 public void apply(CodeStyleSettings settings) {
   TreeModel treeModel = myTreeTable.getTree().getModel();
   TreeNode root = (TreeNode) treeModel.getRoot();
   applyNode(root, settings);
 }