From: Christos Stathis Date: Fri, 20 Apr 2012 15:14:34 +0000 (+0300) Subject: Finished files section of the new left pane X-Git-Tag: 0.14rc1~145 X-Git-Url: https://code.grnet.gr/git/pithos-web-client/commitdiff_plain/e56be452553121b159c271e8ff3e0911ce524adc Finished files section of the new left pane --- diff --git a/src/gr/grnet/pithos/web/client/Pithos.java b/src/gr/grnet/pithos/web/client/Pithos.java index b39939b..f2f967a 100644 --- a/src/gr/grnet/pithos/web/client/Pithos.java +++ b/src/gr/grnet/pithos/web/client/Pithos.java @@ -371,34 +371,41 @@ public class Pithos implements EntryPoint, ResizeHandler { trees = new VerticalPanel(); trees.setWidth("100%"); - + trees.setSpacing(5); - HorizontalPanel treeHeader = new HorizontalPanel(); - treeHeader.addStyleName("pithos-treeHeader"); - treeHeader.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER); - treeHeader.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE); - HorizontalPanel statistics = new HorizontalPanel(); - statistics.addStyleName("pithos-statistics"); - statistics.add(new HTML("Used: ")); - usedBytes = new HTML(); - statistics.add(usedBytes); - statistics.add(new HTML(" of ")); - totalBytes = new HTML(); - statistics.add(totalBytes); - statistics.add(new HTML(" (")); - usedPercent = new HTML(); - statistics.add(usedPercent); - statistics.add(new HTML(")")); - treeHeader.add(statistics); - treeHeader.setCellHorizontalAlignment(statistics, HasHorizontalAlignment.ALIGN_LEFT); - trees.add(treeHeader); +// HorizontalPanel treeHeader = new HorizontalPanel(); +// treeHeader.addStyleName("pithos-treeHeader"); +// treeHeader.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER); +// treeHeader.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE); +// treeHeader.add(statistics); +// treeHeader.setCellHorizontalAlignment(statistics, HasHorizontalAlignment.ALIGN_LEFT); +// trees.add(treeHeader); trees.add(folderTreeView); + + HorizontalPanel separator = new HorizontalPanel(); + separator.addStyleName("pithos-statisticsSeparator"); + trees.add(separator); + + HorizontalPanel statistics = new HorizontalPanel(); + statistics.addStyleName("pithos-statistics"); + statistics.add(new HTML("Used: ")); + usedBytes = new HTML(); + statistics.add(usedBytes); + statistics.add(new HTML(" of ")); + totalBytes = new HTML(); + statistics.add(totalBytes); + statistics.add(new HTML(" (")); + usedPercent = new HTML(); + statistics.add(usedPercent); + statistics.add(new HTML(")")); + trees.add(statistics); + trees.add(groupTreeView); // Add the left and right panels to the split panel. splitPanel.setLeftWidget(trees); splitPanel.setRightWidget(inner); - splitPanel.setSplitPosition("35%"); + splitPanel.setSplitPosition("219px"); splitPanel.setSize("100%", "100%"); splitPanel.addStyleName("pithos-splitPanel"); splitPanel.setWidth(contentWidth); @@ -1145,7 +1152,7 @@ public class Pithos implements EntryPoint, ResizeHandler { @Override public void execute() { mysharedTreeView = new MysharedTreeView(mysharedTreeViewModel); - trees.insert(mysharedTreeView, 2); + trees.insert(mysharedTreeView, 4); treeViews.add(mysharedTreeView); createOtherSharedTree(); } @@ -1179,7 +1186,7 @@ public class Pithos implements EntryPoint, ResizeHandler { @Override public void execute() { otherSharedTreeView = new OtherSharedTreeView(otherSharedTreeViewModel); - trees.insert(otherSharedTreeView, 2); + trees.insert(otherSharedTreeView, 4); treeViews.add(otherSharedTreeView); } }); diff --git a/src/gr/grnet/pithos/web/client/PithosDisclosurePanel.css b/src/gr/grnet/pithos/web/client/PithosDisclosurePanel.css index 4978d7f..9313fab 100644 --- a/src/gr/grnet/pithos/web/client/PithosDisclosurePanel.css +++ b/src/gr/grnet/pithos/web/client/PithosDisclosurePanel.css @@ -35,6 +35,13 @@ .disclosurePanel { padding-left: 10px; + width: 100%; +} + +.header { + background-color: #74aec9; + height: 25px; + width: 100%; } .content { diff --git a/src/gr/grnet/pithos/web/client/PithosDisclosurePanel.java b/src/gr/grnet/pithos/web/client/PithosDisclosurePanel.java index a7c8b01..345fe4a 100644 --- a/src/gr/grnet/pithos/web/client/PithosDisclosurePanel.java +++ b/src/gr/grnet/pithos/web/client/PithosDisclosurePanel.java @@ -59,6 +59,8 @@ public class PithosDisclosurePanel extends Composite { public interface Style extends CssResource { String disclosurePanel(); + String header(); + String content(); } @@ -111,7 +113,9 @@ public class PithosDisclosurePanel extends Composite { sb.appendHtmlConstant(AbstractImagePrototype.create(resources.icon()).getHTML()); sb.append(Templates.INSTANCE.nameSpan(title)); sb.appendHtmlConstant(AbstractImagePrototype.create(open ? resources.open() : resources.closed()).getHTML()); - return new HTML(sb.toSafeHtml()); + HTML header = new HTML(sb.toSafeHtml()); + header.addStyleName(resources.pithosDisclosurePanelCss().header()); + return header; } public void add(IsWidget widget) { diff --git a/src/gr/grnet/pithos/web/client/foldertree/FolderTreeView.java b/src/gr/grnet/pithos/web/client/foldertree/FolderTreeView.java index 4383acf..0c95e8a 100644 --- a/src/gr/grnet/pithos/web/client/foldertree/FolderTreeView.java +++ b/src/gr/grnet/pithos/web/client/foldertree/FolderTreeView.java @@ -53,7 +53,11 @@ import com.google.gwt.user.cellview.client.TreeNode; import com.google.gwt.user.client.Command; import com.google.gwt.user.client.ui.AbstractImagePrototype; import com.google.gwt.user.client.ui.Composite; +import com.google.gwt.user.client.ui.FlowPanel; import com.google.gwt.user.client.ui.HTML; +import com.google.gwt.user.client.ui.HasVerticalAlignment; +import com.google.gwt.user.client.ui.HorizontalPanel; +import com.google.gwt.user.client.ui.Image; import com.google.gwt.user.client.ui.Tree; import com.google.gwt.user.client.ui.VerticalPanel; @@ -172,10 +176,23 @@ public class FolderTreeView extends Composite implements TreeView { VerticalPanel panel = new VerticalPanel(); panel.addStyleName("pithos-folderTreeSection"); Resources resources = GWT.create(Resources.class); - SafeHtmlBuilder sb = new SafeHtmlBuilder(); - sb.appendHtmlConstant(AbstractImagePrototype.create(resources.icon()).getHTML()); - sb.append(Templates.INSTANCE.nameSpan("My Files")); - panel.add(new HTML(sb.toSafeHtml())); + + HorizontalPanel header = new HorizontalPanel(); + +// SafeHtmlBuilder sb = new SafeHtmlBuilder(); + Image img = new Image(resources.icon()); + header.add(img); + header.setCellVerticalAlignment(img, HasVerticalAlignment.ALIGN_MIDDLE); + header.setCellWidth(img, "32px"); + HTML title = new HTML("My Files"); + header.add(title); + header.setCellVerticalAlignment(title, HasVerticalAlignment.ALIGN_MIDDLE); + +// sb.appendHtmlConstant(AbstractImagePrototype.create(resources.icon()).getHTML()); + // sb.append(Templates.INSTANCE.nameSpan("My Files")); +// HTML header = new HTML(sb.toSafeHtml()); + header.addStyleName("pithos-folderTreeSectionHeader"); + panel.add(header); /* diff --git a/src/gr/grnet/pithos/web/public/images/separator.png b/src/gr/grnet/pithos/web/public/images/separator.png new file mode 100644 index 0000000..e0c13c3 Binary files /dev/null and b/src/gr/grnet/pithos/web/public/images/separator.png differ diff --git a/src/gr/grnet/pithos/web/public/pithos.css b/src/gr/grnet/pithos/web/public/pithos.css index 4825ca5..f53c0c0 100644 --- a/src/gr/grnet/pithos/web/public/pithos.css +++ b/src/gr/grnet/pithos/web/public/pithos.css @@ -339,15 +339,19 @@ table.pithos-permList.props-labels { padding-left: 4; } -.pithos-treeHeader { - background-color: #74aec9; - height: 25px; - width: 100%; +.pithos-statistics { + color: black; + padding: 10px; } -.pithos-statistics { - color: white; - padding: 5px; +.pithos-statistics .gwt-HTML { + font-size: smaller; +} + +.pithos-statisticsSeparator { + background: url(images/separator.png) no-repeat; + width: 100%; + height: 3px; } .pithos-splitPanel { @@ -736,6 +740,13 @@ a.pithos-tag { .pithos-folderTreeSection { padding-left: 10px; + width:100%; +} + +.pithos-folderTreeSectionHeader { + background-color: #74aec9; + height: 25px; + width: 100%; } .pithos-folderTreeSectionContent {