Merge branch 'develop' into debian-develop-wheezy
[pithos-web-client] / src / gr / grnet / pithos / web / client / foldertree / FolderTreeView.java
index 1bc15ef..55c40d2 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright 2011-2012 GRNET S.A. All rights reserved.
+ * Copyright 2011-2013 GRNET S.A. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or
  * without modification, are permitted provided that the following
@@ -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;
     
@@ -175,7 +176,7 @@ public class FolderTreeView extends Composite implements TreeView {
     public FolderTreeView(FolderTreeViewModel viewModel) {
         this.model = viewModel;
 
-        PithosDisclosurePanel panel = new PithosDisclosurePanel((Resources) GWT.create(Resources.class), "My Files", true);
+        PithosDisclosurePanel panel = new PithosDisclosurePanel((Resources) GWT.create(Resources.class), "My Files", false, true);
 
         VerticalPanel content = new VerticalPanel();
         
@@ -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);
@@ -207,6 +204,7 @@ public class FolderTreeView extends Composite implements TreeView {
            statistics.add(usedPercent);
            statistics.add(new HTML(")"));
            content.add(statistics);
+           content.setCellHorizontalAlignment(statistics, HasHorizontalAlignment.ALIGN_CENTER);
 
         panel.setContent(content);
         initWidget(panel);