Adjust the tree default size according to the number of subfolders so that Show more...
[pithos-web-client] / src / gr / grnet / pithos / web / client / foldertree / FolderTreeView.java
index 7062e9f..3a25a72 100644 (file)
@@ -36,6 +36,7 @@
 package gr.grnet.pithos.web.client.foldertree;
 
 import gr.grnet.pithos.web.client.FolderContextMenu;
+import gr.grnet.pithos.web.client.Pithos;
 import gr.grnet.pithos.web.client.PithosDisclosurePanel;
 import gr.grnet.pithos.web.client.TreeView;
 
@@ -164,7 +165,7 @@ public class FolderTreeView extends Composite implements TreeView {
 
     private FolderTreeViewModel model;
     
-    private CellTree tree;
+    CellTree tree;
     
     private HTML usedBytes;
     
@@ -187,15 +188,11 @@ public class FolderTreeView extends Composite implements TreeView {
         CellTree.Resources res = GWT.create(BasicResources.class);
         tree = new CellTree(model, null, res);
         tree.setKeyboardSelectionPolicy(KeyboardSelectionPolicy.ENABLED);
+        tree.setDefaultNodeSize(5000);
         content.add(tree);
 
-        HorizontalPanel separator = new HorizontalPanel();
-        separator.addStyleName("pithos-statisticsSeparator");
-        separator.add(new HTML(""));
-        content.add(separator);
-
         HorizontalPanel statistics = new HorizontalPanel();
-           statistics.addStyleName("pithos-statistics");
+           statistics.addStyleName(Pithos.resources.pithosCss().statistics());
            statistics.add(new HTML("Used: "));
            usedBytes = new HTML();
            statistics.add(usedBytes);