src/main/java/pl/net/lkd/TagTools/Viewer/TreeWalkerView.java
/** handle a button press: output messages and select node. */
handle a button press: output messages and select node.
handle a button press : output messages and select node .
void handleButton(Node node, String function)
  {
    setMessage("treeWalker." + function + " == " + node);
    if (node == null)
    {
      return;
    }
    TreeNode treeNode = jtree.getTreeNode(node);
    if (treeNode == null)
    {
      setMessage("No JTree TreeNode for Node name:" + node.getNodeName());
      return;
    }
    TreePath path = new TreePath(
            ((DefaultTreeModel) jtree.getModel()).getPathToRoot(treeNode));
    jtree.requestFocus();
    jtree.setSelectionPath(path);
    jtree.scrollPathToVisible(path);
  }
void handleButton ( Node node , String function ) { setMessage ( "treeWalker." + function + " == " + node ) ; if ( node == null ) { return ; } TreeNode treeNode = jtree . getTreeNode ( node ) ; if ( treeNode == null ) { setMessage ( "No JTree TreeNode for Node name:" + node . getNodeName ( ) ) ; return ; } TreePath path = new TreePath ( ( ( DefaultTreeModel ) jtree . getModel ( ) ) . getPathToRoot ( treeNode ) ) ; jtree . requestFocus ( ) ; jtree . setSelectionPath ( path ) ; jtree . scrollPathToVisible ( path ) ; }
handle a button press: output messages and select node.
handle a button press : output messages and select node .