Revision 64800147 src/gr/grnet/pithos/web/client/TopPanel.java
b/src/gr/grnet/pithos/web/client/TopPanel.java | ||
---|---|---|
34 | 34 |
*/ |
35 | 35 |
package gr.grnet.pithos.web.client; |
36 | 36 |
|
37 |
import com.google.gwt.i18n.client.Dictionary; |
|
37 | 38 |
import com.google.gwt.resources.client.ImageResource; |
38 |
import com.google.gwt.user.client.Command; |
|
39 |
import com.google.gwt.user.client.Window; |
|
40 |
import com.google.gwt.user.client.ui.AbstractImagePrototype; |
|
41 |
import com.google.gwt.user.client.ui.Composite; |
|
42 |
import com.google.gwt.user.client.ui.HTML; |
|
43 |
import com.google.gwt.user.client.ui.HasHorizontalAlignment; |
|
44 |
import com.google.gwt.user.client.ui.HasVerticalAlignment; |
|
45 |
import com.google.gwt.user.client.ui.HorizontalPanel; |
|
46 |
import com.google.gwt.user.client.ui.MenuBar; |
|
47 |
import com.google.gwt.user.client.ui.MenuItem; |
|
39 |
import com.google.gwt.user.client.ui.*; |
|
48 | 40 |
|
49 | 41 |
/** |
50 | 42 |
* The top panel, which contains the menu bar icons and the user name. |
51 | 43 |
*/ |
52 | 44 |
public class TopPanel extends Composite { |
53 | 45 |
|
54 |
/**
|
|
55 |
* A constant that denotes the completion of an IncrementalCommand.
|
|
56 |
*/
|
|
57 |
public static final boolean DONE = false;
|
|
46 |
/**
|
|
47 |
* A constant that denotes the completion of an IncrementalCommand.
|
|
48 |
*/
|
|
49 |
public static final boolean DONE = false;
|
|
58 | 50 |
|
59 | 51 |
Pithos app; |
60 | 52 |
|
61 |
/** |
|
62 |
* An image bundle for this widgets images. |
|
63 |
*/ |
|
64 |
public interface Images extends FilePermissionsDialog.Images { |
|
53 |
/** |
|
54 |
* An image bundle for this widgets images. |
|
55 |
*/ |
|
56 |
public interface Images extends FilePermissionsDialog.Images { |
|
57 |
@Source("gr/grnet/pithos/resources/pithos2-logo.png") |
|
58 |
ImageResource pithosLogo(); |
|
65 | 59 |
|
66 |
@Source("gr/grnet/pithos/resources/pithos2-logo.png") |
|
67 |
ImageResource pithosLogo(); |
|
68 |
|
|
69 |
@Source("gr/grnet/pithos/resources/desc.png") |
|
70 |
ImageResource downArrow(); |
|
71 |
} |
|
60 |
@Source("gr/grnet/pithos/resources/desc.png") |
|
61 |
ImageResource downArrow(); |
|
62 |
} |
|
72 | 63 |
|
73 |
/**
|
|
74 |
* The constructor for the top panel.
|
|
75 |
*
|
|
76 |
* @param images the supplied images
|
|
77 |
*/
|
|
78 |
public TopPanel(Pithos _app, final Images images) {
|
|
64 |
/**
|
|
65 |
* The constructor for the top panel.
|
|
66 |
*
|
|
67 |
* @param images the supplied images
|
|
68 |
*/
|
|
69 |
public TopPanel(Pithos _app, final Images images) {
|
|
79 | 70 |
this.app = _app; |
80 |
HorizontalPanel outer = new HorizontalPanel();
|
|
81 |
outer.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_LEFT);
|
|
71 |
HorizontalPanel outer = new HorizontalPanel();
|
|
72 |
outer.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_LEFT);
|
|
82 | 73 |
|
83 |
outer.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE);
|
|
84 |
outer.setStyleName("pithos-topPanel");
|
|
74 |
outer.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE);
|
|
75 |
outer.setStyleName("pithos-topPanel");
|
|
85 | 76 |
|
86 |
HorizontalPanel inner = new HorizontalPanel(); |
|
87 |
inner.setWidth("75%"); |
|
88 |
inner.setVerticalAlignment(HasVerticalAlignment.ALIGN_BOTTOM); |
|
89 |
|
|
90 |
HTML logos = new HTML("<table><tr><td><a href='/'>" + AbstractImagePrototype.create(images.pithosLogo()).getHTML() + "</a></td></tr></table>"); |
|
91 |
logos.addStyleName("pithos-logo"); |
|
92 |
inner.add(logos); |
|
77 |
HorizontalPanel inner = new HorizontalPanel(); |
|
78 |
inner.setWidth("75%"); |
|
79 |
inner.setVerticalAlignment(HasVerticalAlignment.ALIGN_BOTTOM); |
|
80 |
|
|
81 |
Dictionary otherProperties = Dictionary.getDictionary("otherProperties"); |
|
82 |
final String STORAGE_LOGO_URL = otherProperties.get("STORAGE_LOGO_URL"); |
|
83 |
final Image logo = new Image(STORAGE_LOGO_URL); |
|
84 |
Pithos.LOG("Pithos Logo = ", logo.getUrl()); |
|
85 |
inner.add(logo); |
|
93 | 86 |
outer.add(inner); |
94 | 87 |
outer.setCellHorizontalAlignment(inner, HasHorizontalAlignment.ALIGN_CENTER); |
95 | 88 |
outer.setCellVerticalAlignment(inner, HasVerticalAlignment.ALIGN_BOTTOM); |
96 |
initWidget(outer);
|
|
97 |
}
|
|
89 |
initWidget(outer);
|
|
90 |
}
|
|
98 | 91 |
} |
Also available in: Unified diff