/*
- * 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
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;
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;
}
interface Resources extends gr.grnet.pithos.web.client.PithosDisclosurePanel.Resources {
- @Override
+ @Override
@Source("gr/grnet/pithos/resources/home22.png")
ImageResource icon();
}
private FolderTreeViewModel model;
- private CellTree tree;
+ CellTree tree;
private HTML usedBytes;
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();
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");
- 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);
statistics.add(usedPercent);
statistics.add(new HTML(")"));
content.add(statistics);
+ content.setCellHorizontalAlignment(statistics, HasHorizontalAlignment.ALIGN_CENTER);
panel.setContent(content);
initWidget(panel);