diff --git a/README.md b/README.md index b487a7d..525220b 100644 --- a/README.md +++ b/README.md @@ -60,3 +60,21 @@ consoleTable.addRow("Row 31", "Extra length row", "Row 33"); consoleTable.print(console); ``` + +### Tree + +![](images/tree.png) + +```java +ConsoleTree consoleTree = new ConsoleTree(); + +TreeNode line1 = consoleTree.addRow("Line 1"); +consoleTree.addRow(line1, "Inner line 11"); +TreeNode line12 = consoleTree.addRow(line1, "Inner line 12"); +TreeNode line121 = consoleTree.addRow(line12, "Inner line 121"); +consoleTree.addRow(line121, "Inner line 1211"); +consoleTree.addRow(line1, "Inner line 13"); +consoleTree.addRow("Line 2"); + +consoleTree.print(console); +``` diff --git a/images/tree.png b/images/tree.png new file mode 100644 index 0000000..381da67 Binary files /dev/null and b/images/tree.png differ