use of com.kotcrab.vis.ui.widget.VisTree in project vis-ui by kotcrab.
the class TestTree method addVisWidgets.
private void addVisWidgets() {
VisTree tree = new VisTree();
TestNode item1 = new TestNode(new VisLabel("item 1"));
TestNode item2 = new TestNode(new VisLabel("item 2"));
TestNode item3 = new TestNode(new VisLabel("item 3"));
item1.add(new TestNode(new VisLabel("item 1.1")));
item1.add(new TestNode(new VisLabel("item 1.2")));
item1.add(new TestNode(new VisLabel("item 1.3")));
item2.add(new TestNode(new VisLabel("item 2.1")));
item2.add(new TestNode(new VisLabel("item 2.2")));
item2.add(new TestNode(new VisLabel("item 2.3")));
item3.add(new TestNode(new VisLabel("item 3.1")));
item3.add(new TestNode(new VisLabel("item 3.2")));
item3.add(new TestNode(new VisLabel("item 3.3")));
item1.setExpanded(true);
tree.add(item1);
tree.add(item2);
tree.add(item3);
add(tree).expand().fill();
}