Cloudbar variables and loginUrl are configurable through runtime.properties and build.xml
[pithos-web-client] / src / gr / grnet / pithos / web / client / TopPanel.java
index d611151..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
  */
 package gr.grnet.pithos.web.client;
 
-import com.google.gwt.resources.client.ClientBundle;
 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;
 import com.google.gwt.user.client.ui.HasHorizontalAlignment;
 import com.google.gwt.user.client.ui.HasVerticalAlignment;
 import com.google.gwt.user.client.ui.HorizontalPanel;
+import com.google.gwt.user.client.ui.MenuBar;
+import com.google.gwt.user.client.ui.MenuItem;
 
 /**
  * The top panel, which contains the menu bar icons and the user name.
@@ -53,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 ClientBundle, 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();
        }
 
        /**
@@ -74,15 +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("toolbar");
-
-               HTML logos = new HTML("<table><tr><td>" + AbstractImagePrototype.create(images.pithosLogo()).getHTML() + "</td></tr></table>");
-               outer.add(logos);
-
-//             outer.setCellHorizontalAlignment(logos, HasHorizontalAlignment.ALIGN_RIGHT);
+               outer.setStyleName("pithos-topPanel");
 
+               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);
        }
 }