Java JTree Model logTreeNodes(TreeModel model, Object node, String indent)

Here you can find the source of logTreeNodes(TreeModel model, Object node, String indent)

Description

log Tree Nodes

License

Open Source License

Declaration

private static void logTreeNodes(TreeModel model, Object node, String indent) 

Method Source Code

//package com.java2s;
// it under the terms of the GNU General Public License as published by

import java.text.SimpleDateFormat;
import java.util.Date;

import javax.swing.tree.TreeModel;

public class Main {
    static final SimpleDateFormat _DateFormatter = new SimpleDateFormat("HH:mm:ss:SSS");

    private static void logTreeNodes(TreeModel model, Object node, String indent) {
        logToConsole(indent + node.toString());
        for (int i = 0; i < model.getChildCount(node); i++)
            logTreeNodes(model, model.getChild(node, i), "|   " + indent);
    }/*from   www.j a va  2 s.  co m*/

    /**
     * writes a text message prefixed with the current time to the console
     */
    static void logToConsole(String msg) {
        System.out.println(_DateFormatter.format(new Date()) + " IBController: " + msg);
    }
}

Related

  1. findTreeNode(TreeModel model, Object obj)
  2. getAllTreeNodes(TreeModel model)
  3. getTreeIndents(TreeModel in)
  4. getTreeModelSize(TreeModel in)
  5. isTreePathInModel(TreeModel treeModel, TreePath treePath)
  6. nodesChanged(DefaultTreeModel rightTreeModel)
  7. redrawAllTreeCells(DefaultTreeModel treeModel)
  8. redrawAllTreeCellsRec(DefaultTreeModel treeModel, TreeNode parent)
  9. searchPath(TreeModel model, TreePath oldPath)