Revision afd3a0ef src/gr/ebs/gss/client/TopPanel.java
b/src/gr/ebs/gss/client/TopPanel.java | ||
---|---|---|
19 | 19 |
package gr.ebs.gss.client; |
20 | 20 |
|
21 | 21 |
import com.google.gwt.core.client.GWT; |
22 |
import com.google.gwt.resources.client.ClientBundle; |
|
23 |
import com.google.gwt.resources.client.ImageResource; |
|
22 | 24 |
import com.google.gwt.user.client.Command; |
23 | 25 |
import com.google.gwt.user.client.ui.AbstractImagePrototype; |
24 | 26 |
import com.google.gwt.user.client.ui.Composite; |
... | ... | |
26 | 28 |
import com.google.gwt.user.client.ui.HasHorizontalAlignment; |
27 | 29 |
import com.google.gwt.user.client.ui.HasVerticalAlignment; |
28 | 30 |
import com.google.gwt.user.client.ui.HorizontalPanel; |
29 |
import com.google.gwt.user.client.ui.ImageBundle; |
|
30 | 31 |
import com.google.gwt.user.client.ui.MenuBar; |
31 | 32 |
import com.google.gwt.user.client.ui.MenuItem; |
32 | 33 |
|
... | ... | |
43 | 44 |
/** |
44 | 45 |
* An image bundle for this widgets images. |
45 | 46 |
*/ |
46 |
public interface Images extends ImageBundle, FileMenu.Images, EditMenu.Images,
|
|
47 |
public interface Images extends ClientBundle, FileMenu.Images, EditMenu.Images,
|
|
47 | 48 |
SettingsMenu.Images, GroupMenu.Images, FilePropertiesDialog.Images, |
48 | 49 |
HelpMenu.Images { |
49 | 50 |
|
50 |
@Resource("gr/ebs/gss/resources/exit.png")
|
|
51 |
AbstractImagePrototype exit();
|
|
51 |
@Source("gr/ebs/gss/resources/exit.png")
|
|
52 |
ImageResource exit();
|
|
52 | 53 |
|
53 |
@Resource("gr/ebs/gss/resources/folder_blue.png")
|
|
54 |
AbstractImagePrototype folder();
|
|
54 |
@Source("gr/ebs/gss/resources/folder_blue.png")
|
|
55 |
ImageResource folder();
|
|
55 | 56 |
|
56 |
@Resource("gr/ebs/gss/resources/edit.png")
|
|
57 |
AbstractImagePrototype edit();
|
|
57 |
@Source("gr/ebs/gss/resources/edit.png")
|
|
58 |
ImageResource edit();
|
|
58 | 59 |
|
59 |
@Resource("gr/ebs/gss/resources/edit_group.png")
|
|
60 |
AbstractImagePrototype group();
|
|
60 |
@Source("gr/ebs/gss/resources/edit_group.png")
|
|
61 |
ImageResource group();
|
|
61 | 62 |
|
62 |
@Resource("gr/ebs/gss/resources/configure.png")
|
|
63 |
AbstractImagePrototype configure();
|
|
63 |
@Source("gr/ebs/gss/resources/configure.png")
|
|
64 |
ImageResource configure();
|
|
64 | 65 |
|
65 |
@Resource("gr/ebs/gss/resources/help.png")
|
|
66 |
AbstractImagePrototype help();
|
|
66 |
@Source("gr/ebs/gss/resources/help.png")
|
|
67 |
ImageResource help();
|
|
67 | 68 |
|
68 |
@Resource("gr/ebs/gss/resources/pithos-logo.png")
|
|
69 |
AbstractImagePrototype gssLogo();
|
|
69 |
@Source("gr/ebs/gss/resources/pithos-logo.png")
|
|
70 |
ImageResource gssLogo();
|
|
70 | 71 |
|
71 |
@Resource("gr/ebs/gss/resources/grnet-logo.png")
|
|
72 |
AbstractImagePrototype grnetLogo();
|
|
72 |
@Source("gr/ebs/gss/resources/grnet-logo.png")
|
|
73 |
ImageResource grnetLogo();
|
|
73 | 74 |
} |
74 | 75 |
|
75 | 76 |
/** |
... | ... | |
130 | 131 |
} |
131 | 132 |
}; |
132 | 133 |
MenuItem quitItem = new MenuItem("<table style='font-size: 100%'><tr><td>" + |
133 |
images.exit().getHTML() + "</td><td>Quit</td></tr></table>", true, quitCommand);
|
|
134 |
AbstractImagePrototype.create(images.exit()).getHTML() + "</td><td>Quit</td></tr></table>", true, quitCommand);
|
|
134 | 135 |
MenuItem fileItem = new MenuItem("<table style='font-size: 100%'><tr><td>" + |
135 |
images.folder().getHTML() + "</td><td>File</td></tr></table>", true, new MenuBar(true)){
|
|
136 |
AbstractImagePrototype.create(images.folder()).getHTML() + "</td><td>File</td></tr></table>", true, new MenuBar(true)){
|
|
136 | 137 |
@Override |
137 | 138 |
public MenuBar getSubMenu() { |
138 | 139 |
return fileMenu.createMenu(); |
139 | 140 |
} |
140 | 141 |
}; |
141 | 142 |
MenuItem editItem = new MenuItem("<table style='font-size: 100%'><tr><td>" + |
142 |
images.edit().getHTML() + "</td><td>Edit</td></tr></table>", true, new MenuBar(true)){
|
|
143 |
AbstractImagePrototype.create(images.edit()).getHTML() + "</td><td>Edit</td></tr></table>", true, new MenuBar(true)){
|
|
143 | 144 |
@Override |
144 | 145 |
public MenuBar getSubMenu() { |
145 | 146 |
return editMenu.createMenu(); |
146 | 147 |
} |
147 | 148 |
}; |
148 | 149 |
MenuItem groupItem = new MenuItem("<table style='font-size: 100%'><tr><td>" + |
149 |
images.group().getHTML() + "</td><td>Group</td></tr></table>", true,
|
|
150 |
AbstractImagePrototype.create(images.group()).getHTML() + "</td><td>Group</td></tr></table>", true,
|
|
150 | 151 |
groupMenu.getContextMenu()); |
151 | 152 |
MenuItem configureItem = new MenuItem("<table style='font-size: 100%'><tr><td>" + |
152 |
images.configure().getHTML() + "</td><td>Settings</td></tr></table>",
|
|
153 |
AbstractImagePrototype.create(images.configure()).getHTML() + "</td><td>Settings</td></tr></table>",
|
|
153 | 154 |
true,settingsMenu.getContextMenu()); |
154 | 155 |
MenuItem helpItem = new MenuItem("<table style='font-size: 100%'><tr><td>" + |
155 |
images.help().getHTML() + "</td><td>Help</td></tr></table>", true, new MenuBar(true)){
|
|
156 |
AbstractImagePrototype.create(images.help()).getHTML() + "</td><td>Help</td></tr></table>", true, new MenuBar(true)){
|
|
156 | 157 |
@Override |
157 | 158 |
public MenuBar getSubMenu() { |
158 | 159 |
return helpMenu.createMenu(); |
... | ... | |
173 | 174 |
|
174 | 175 |
Configuration conf = (Configuration) GWT.create(Configuration.class); |
175 | 176 |
HTML logos = new HTML("<table><tr><td><a href='" + conf.serviceHome() + |
176 |
"' target='gss'>" + images.gssLogo().getHTML() +
|
|
177 |
"' target='gss'>" + AbstractImagePrototype.create(images.gssLogo()).getHTML() +
|
|
177 | 178 |
"</a><a href='http://www.grnet.gr/' " + "target='grnet'>" + |
178 |
images.grnetLogo().getHTML()+"</a></td></tr></table>");
|
|
179 |
AbstractImagePrototype.create(images.grnetLogo()).getHTML()+"</a></td></tr></table>");
|
|
179 | 180 |
outer.add(logos); |
180 | 181 |
|
181 | 182 |
outer.setCellHorizontalAlignment(logos, HasHorizontalAlignment.ALIGN_RIGHT); |
Also available in: Unified diff