tree.setTransferHandler(h);
tree.setDragEnabled(h != null);
}
private KongaTree createTree(int numberOfTables, boolean allowMultipleRoots) {
KongaTree tree = new KongaTree(modelBuilder.noRelationshipsModel());
tree.setRootVisible(false);
tree.setCellRenderer(new Renderer(allowMultipleRoots));
tree.setRowHeight(20);
tree.setVisibleRowCount(Math.min(numberOfTables + 1, 20));
tree.setSelectionMode(SelectionMode.DISCONTIGUOUS_TREE_SELECTION);
tree.setToggleClickCount(-1);
return tree;
}