Remove one constructor of PithosDisclosurePanel
[pithos-web-client] / src / gr / grnet / pithos / web / client / foldertree / FolderTreeView.java
index c3641ef..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;
 
@@ -52,6 +53,7 @@ import com.google.gwt.user.cellview.client.TreeNode;
 import com.google.gwt.user.client.Command;
 import com.google.gwt.user.client.ui.Composite;
 import com.google.gwt.user.client.ui.HTML;
+import com.google.gwt.user.client.ui.HasHorizontalAlignment;
 import com.google.gwt.user.client.ui.HorizontalPanel;
 import com.google.gwt.user.client.ui.Tree;
 import com.google.gwt.user.client.ui.VerticalPanel;
@@ -163,7 +165,7 @@ public class FolderTreeView extends Composite implements TreeView {
 
     private FolderTreeViewModel model;
     
-    private CellTree tree;
+    CellTree tree;
     
     private HTML usedBytes;
     
@@ -174,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();
         
@@ -186,16 +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);
-//        content.setCellHeight(separator, "3px");
-
         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);