Added retry capabillity to head requests
[pithos-web-client] / src / gr / grnet / pithos / web / client / TopPanel.java
index 131f062..b755e7f 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright 2011 GRNET S.A. All rights reserved.
+ * Copyright 2011-2012 GRNET S.A. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or
  * without modification, are permitted provided that the following
@@ -35,6 +35,8 @@
 package gr.grnet.pithos.web.client;
 
 import com.google.gwt.resources.client.ImageResource;
+import com.google.gwt.user.client.Command;
+import com.google.gwt.user.client.Window;
 import com.google.gwt.user.client.ui.AbstractImagePrototype;
 import com.google.gwt.user.client.ui.Composite;
 import com.google.gwt.user.client.ui.HTML;
@@ -54,15 +56,18 @@ public class TopPanel extends Composite {
         */
        public static final boolean DONE = false;
 
-    private Pithos app;
+    Pithos app;
 
        /**
         * An image bundle for this widgets images.
         */
-       public interface Images extends FilePropertiesDialog.Images {
+       public interface Images extends FilePermissionsDialog.Images {
 
                @Source("gr/grnet/pithos/resources/pithos2-logo.png")
                ImageResource pithosLogo();
+               
+               @Source("gr/grnet/pithos/resources/desc.png")
+               ImageResource downArrow();
        }
 
        /**
@@ -75,21 +80,19 @@ public class TopPanel extends Composite {
                HorizontalPanel outer = new HorizontalPanel();
                outer.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_LEFT);
 
-//             outer.setSpacing(2);
                outer.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE);
                outer.setStyleName("pithos-topPanel");
 
-               HTML logos = new HTML("<table><tr><td>" + AbstractImagePrototype.create(images.pithosLogo()).getHTML() + "</td></tr></table>");
-               outer.add(logos);
-
-        MenuBar username = new MenuBar();
-        username.setStyleName("pithos-usernameMenu");
-        MenuItem userItem = new MenuItem(_app.getUsername(), new MenuBar(true));
-        userItem.addStyleName("pithos-usernameMenu");
-        username.addItem(userItem);
-        outer.add(username);
-               outer.setCellHorizontalAlignment(username, HasHorizontalAlignment.ALIGN_RIGHT);
-
+               HorizontalPanel inner = new HorizontalPanel();
+               inner.setWidth("75%");
+               inner.setVerticalAlignment(HasVerticalAlignment.ALIGN_BOTTOM);
+               
+               HTML logos = new HTML("<table><tr><td><a href='/'>" + AbstractImagePrototype.create(images.pithosLogo()).getHTML() + "</a></td></tr></table>");
+               logos.addStyleName("pithos-logo");
+               inner.add(logos);
+        outer.add(inner);
+        outer.setCellHorizontalAlignment(inner, HasHorizontalAlignment.ALIGN_CENTER);
+        outer.setCellVerticalAlignment(inner, HasVerticalAlignment.ALIGN_BOTTOM);
                initWidget(outer);
        }
 }