Example usage for org.dom4j.swing BranchTreeNode getChildCount

List of usage examples for org.dom4j.swing BranchTreeNode getChildCount

Introduction

In this page you can find the example usage for org.dom4j.swing BranchTreeNode getChildCount.

Prototype

public int getChildCount() 

Source Link

Usage

From source file:xmlEditor.frmMain.java

private void xmlTreeValueChanged(javax.swing.event.TreeSelectionEvent evt) {//GEN-FIRST:event_xmlTreeValueChanged
    TreePath selected = xmlTree.getSelectionPath();
    BranchTreeNode selNode = (BranchTreeNode) selected.getLastPathComponent();

    System.out.println("Total children of selection: " + selNode.getChildCount());
    System.out.println(selected.getLastPathComponent().toString());
}