return l;
}
MenuBar getTopMenu() {
MenuBar menubar = new MenuBar();
menubar.setWidth("100%");
final MenuBar.MenuItem file = menubar.addItem("File", null);
final MenuBar.MenuItem newItem = file.addItem("New", null);
file.addItem("Open file...", new ThemeResource(
"../runo/icons/16/folder.png"), null);
file.addSeparator();
newItem.addItem("File", null);
newItem.addItem("Folder", null);
newItem.addItem("Project...", null);
file.addItem("Close", null);
file.addItem("Close All", null);
file.addSeparator();
file.addItem("Save", null);
file.addItem("Save As...", null);
file.addItem("Save All", null);
final MenuBar.MenuItem edit = menubar.addItem("Edit", null);
edit.addItem("Undo", null);
edit.addItem("Redo", null).setEnabled(false);
edit.addSeparator();
edit.addItem("Cut", null);
edit.addItem("Copy", null);
edit.addItem("Paste", null);
edit.addSeparator();
final MenuBar.MenuItem find = edit.addItem("Find/Replace", null);
find.addItem("Google Search", new Command() {
@Override
public void menuSelected(MenuItem selectedItem) {
getMainWindow().open(
new ExternalResource("http://www.google.com"));
}
});
find.addSeparator();
find.addItem("Find/Replace...", null);
find.addItem("Find Next", null);
find.addItem("Find Previous", null);
final MenuBar.MenuItem view = menubar.addItem("View",
new ThemeResource("../runo/icons/16/user.png"), null);
MenuItem statusBarItem = view.addItem("Show/Hide Status Bar", null);
statusBarItem.setCheckable(true);
statusBarItem.setChecked(true);
view.addItem("Customize Toolbar...", null);
view.addSeparator();
view.addItem("Actual Size", null);
view.addItem("Zoom In", null);
view.addItem("Zoom Out", null);
menubar.addItem("Help", null).setEnabled(false);
return menubar;
}