List of usage examples for com.vaadin.ui Tree addStyleName
@Override public void addStyleName(String style)
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 . j av a 2s . c o 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); }