Example usage for com.vaadin.ui Tree setHeightUndefined

List of usage examples for com.vaadin.ui Tree setHeightUndefined

Introduction

In this page you can find the example usage for com.vaadin.ui Tree setHeightUndefined.

Prototype

@Override
    public void setHeightUndefined() 

Source Link

Usage

From source file:org.lucidj.explorer.ExplorerView.java

License:Apache License

private void view_directory(Map<String, Object> entry) {
    String directory = (String) entry.get("directory");
    String caption = (String) entry.get("iconTitle");
    Tree tree = active_trees.get(directory);

    if (tree == null) {
        CustomFilesystemContainer fs = new CustomFilesystemContainer(Paths.get(directory));
        tree = new Tree();
        tree.addStyleName("x-explorerview");
        tree.setContainerDataSource(fs);
        tree.setItemIconPropertyId(FilesystemContainer.PROPERTY_ICON);
        tree.setItemCaptionPropertyId(FilesystemContainer.PROPERTY_NAME);
        tree.setSelectable(false);//from   w  w w.jav  a2s  . co  m
        tree.setImmediate(true);
        tree.setHeightUndefined();
        tree.addItemClickListener(this);
        active_trees.put(directory, tree);
    }

    // Refresh the tree and switch over
    tree.setContainerDataSource(tree.getContainerDataSource());
    browse_files.setContent(tree);
    browse_files.setCaption(caption);
}