Java Code Examples for com.google.gwt.user.client.ui.MenuBar#addItem()
The following examples show how to use
com.google.gwt.user.client.ui.MenuBar#addItem() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: Menu.java From document-management-system with GNU General Public License v2.0 | 6 votes |
/** * Browser menu */ public Menu() { // The item selected must be called on style.css : .okm-MenuBar .gwt-MenuItem-selected // First initialize language values mailMenu = new MenuBar(true); all = new MenuItem(Util.menuHTML("img/icon/actions/select_all.png", Main.i18n("mail.menu.show.all")), true, commandShowAll); all.addStyleName("okm-MenuItem"); mailMenu.addItem(all); cc = new MenuItem(Util.menuHTML("img/white_page.png", Main.i18n("mail.menu.show.cc")), true, commandShowCC); cc.addStyleName("okm-MenuItem"); mailMenu.addItem(cc); bcc = new MenuItem(Util.menuHTML("img/white_page.png", Main.i18n("mail.menu.show.bcc")), true, commandShowBCC); bcc.addStyleName("okm-MenuItem"); mailMenu.addItem(bcc); reply = new MenuItem(Util.menuHTML("img/white_page.png", Main.i18n("mail.menu.show.reply")), true, commandShowReply); reply.addStyleName("okm-MenuItem"); mailMenu.addItem(reply); extra = new MenuItem(Util.menuHTML("img/white_page.png", Main.i18n("mail.menu.show.extre")), true, commandShowExtra); extra.addStyleName("okm-MenuItem"); mailMenu.addItem(extra); mailMenu.addStyleName("okm-MenuBar"); initWidget(mailMenu); }
Example 2
Source File: FindToolBarMenu.java From document-management-system with GNU General Public License v2.0 | 6 votes |
/** * ResizeToolBarMenu */ public FindToolBarMenu() { // Establishes auto-close when click outside super(true, true); toolBarOption = new ToolBarOption(); dirMenu = new MenuBar(true); dirMenu.setStyleName("okm-SubMenuBar"); findFolder = new MenuItem(Util.menuHTML("img/icon/actions/folder_find.gif", Main.i18n("general.menu.file.find.folder")), true, findFolderOKM); findDocument = new MenuItem(Util.menuHTML("img/icon/actions/document_find.png", Main.i18n("general.menu.file.find.document")), true, findDocumentOKM); findSimilarDocument = new MenuItem(Util.menuHTML("img/icon/actions/similar_find.png", Main.i18n("general.menu.file.find.similar.document")), true, findSimilarOKM); dirMenu.addItem(findFolder); dirMenu.addItem(findDocument); dirMenu.addItem(findSimilarDocument); setWidget(dirMenu); }
Example 3
Source File: Menu.java From document-management-system with GNU General Public License v2.0 | 6 votes |
/** * Browser menu */ public Menu() { // The item selected must be called on style.css : .okm-MenuBar .gwt-MenuItem-selected // First initialize language values searchMenu = new MenuBar(true); download = new MenuItem(Util.menuHTML("img/icon/actions/download.gif", Main.i18n("search.result.menu.download")), true, downloadFile); download.addStyleName("okm-MenuItem"); go = new MenuItem(Util.menuHTML("img/icon/actions/goto_folder.gif", Main.i18n("search.result.menu.go.folder")), true, goDirectory); go.addStyleName("okm-MenuItem"); findSimilarDocument = new MenuItem(Util.menuHTML("img/icon/actions/similar_find.png", Main.i18n("general.menu.file.find.similar.document")), true, findSimilarOKM); findSimilarDocument.addStyleName("okm-MenuItem"); searchMenu.addItem(download); searchMenu.addItem(go); searchMenu.addItem(findSimilarDocument); searchMenu.setStyleName("okm-MenuBar"); initWidget(searchMenu); }
Example 4
Source File: TrashMenu.java From document-management-system with GNU General Public License v2.0 | 6 votes |
public TrashMenu() { toolBarOption = new ToolBarOption(); // The item selected must be called on style.css : .okm-MenuBar .gwt-MenuItem-selected // First initialize language values dirMenu = new MenuBar(true); restore = new MenuItem(Util.menuHTML("img/icon/actions/restore.gif", Main.i18n("general.menu.file.restore")), true, restoreFolder); restore.addStyleName("okm-MenuItem"); dirMenu.addItem(restore); purge = new MenuItem(Util.menuHTML("img/icon/actions/purge.gif", Main.i18n("general.menu.file.purge")), true, purgeFolder); purge.addStyleName("okm-MenuItem"); dirMenu.addItem(purge); purgeTrash = new MenuItem(Util.menuHTML("img/icon/actions/purge_trash.gif", Main.i18n("general.menu.file.purge.trash")), true, purgeTrashFolder); purgeTrash.addStyleName("okm-MenuItem"); dirMenu.addItem(purgeTrash); dirMenu.setStyleName("okm-MenuBar"); initWidget(dirMenu); }
Example 5
Source File: MailMenu.java From document-management-system with GNU General Public License v2.0 | 6 votes |
public MailMenu() { toolBarOption = new ToolBarOption(); // The item selected must be called on style.css : .okm-MenuBar .gwt-MenuItem-selected // First initialize language values dirMenu = new MenuBar(true); create = new MenuItem(Util.menuHTML("img/icon/actions/add_folder.gif", Main.i18n("tree.menu.directory.create")), true, addFolder); create.addStyleName("okm-MenuItem"); dirMenu.addItem(create); remove = new MenuItem(Util.menuHTML("img/icon/actions/delete.gif", Main.i18n("tree.menu.directory.remove")), true, delFolder); remove.addStyleName("okm-MenuItem-strike"); dirMenu.addItem(remove); rename = new MenuItem(Util.menuHTML("img/icon/actions/rename.gif", Main.i18n("tree.menu.directory.rename")), true, renFolder); rename.addStyleName("okm-MenuItem-strike"); dirMenu.addItem(rename); move = new MenuItem(Util.menuHTML("img/icon/actions/move_folder.gif", Main.i18n("tree.menu.directory.move")), true, moveFolder); move.addStyleName("okm-MenuItem"); dirMenu.addItem(move); copy = new MenuItem(Util.menuHTML("img/icon/actions/copy.gif", Main.i18n("tree.menu.directory.copy")), true, copyFolder); copy.addStyleName("okm-MenuItem"); dirMenu.addItem(copy); dirMenu.setStyleName("okm-MenuBar"); initWidget(dirMenu); }
Example 6
Source File: GwtMenuBarImplConnector.java From consulo with Apache License 2.0 | 5 votes |
public static void addItems(List<Widget> child, MenuBar bar) { for (Widget widget : child) { if (widget instanceof GwtMenuItemImpl) { bar.addItem(((GwtMenuItemImpl)widget).getItem()); } else if (widget instanceof GwtMenuSeparatorImpl) { bar.addSeparator(); } else if(widget instanceof GwtMenuImpl) { bar.addItem(((GwtMenuImpl)widget).getMenu()); } } }
Example 7
Source File: Menu.java From document-management-system with GNU General Public License v2.0 | 5 votes |
/** * Browser menu */ public Menu() { // The item selected must be called on style.css : .okm-MenuBar .gwt-MenuItem-selected // First initialize language values attachMenu = new MenuBar(true); download = new MenuItem(Util.menuHTML("img/icon/actions/download.gif", Main.i18n("filebrowser.menu.download")), true, downloadFile); download.addStyleName("okm-MenuItem"); attachMenu.addItem(download); copy = new MenuItem(Util.menuHTML("img/icon/actions/copy.gif", Main.i18n("general.menu.edit.copy")), true, copyAttachment); copy.addStyleName("okm-MenuItem"); attachMenu.addItem(copy); attachMenu.addStyleName("okm-MenuBar"); initWidget(attachMenu); }
Example 8
Source File: Menu.java From document-management-system with GNU General Public License v2.0 | 5 votes |
/** * Browser menu */ public Menu() { // The item selected must be called on style.css : .okm-MenuBar .gwt-MenuItem-selected // First initialize language values menu = new MenuBar(true); delete = new MenuItem(UtilComunicator.menuHTML("img/icon/actions/delete.png", GeneralComunicator.i18nExtension("messaging.message.delete")), true, deletePropose); delete.addStyleName("okm-MenuItem"); menu.addItem(delete); menu.setStyleName("okm-MenuBar"); initWidget(menu); }
Example 9
Source File: TemplateMenu.java From document-management-system with GNU General Public License v2.0 | 5 votes |
public TemplateMenu() { toolBarOption = new ToolBarOption(); // The item selected must be called on style.css : .okm-MenuBar .gwt-MenuItem-selected // First initialize language values dirMenu = new MenuBar(true); create = new MenuItem(Util.menuHTML("img/icon/actions/add_folder.gif", Main.i18n("tree.menu.directory.create")), true, addFolder); create.addStyleName("okm-MenuItem"); dirMenu.addItem(create); remove = new MenuItem(Util.menuHTML("img/icon/actions/delete.gif", Main.i18n("tree.menu.directory.remove")), true, delFolder); remove.addStyleName("okm-MenuItem-strike"); dirMenu.addItem(remove); rename = new MenuItem(Util.menuHTML("img/icon/actions/rename.gif", Main.i18n("tree.menu.directory.rename")), true, renFolder); rename.addStyleName("okm-MenuItem-strike"); dirMenu.addItem(rename); move = new MenuItem(Util.menuHTML("img/icon/actions/move_folder.gif", Main.i18n("tree.menu.directory.move")), true, moveFolder); move.addStyleName("okm-MenuItem"); dirMenu.addItem(move); copy = new MenuItem(Util.menuHTML("img/icon/actions/copy.gif", Main.i18n("tree.menu.directory.copy")), true, copyFolder); copy.addStyleName("okm-MenuItem"); dirMenu.addItem(copy); export = new MenuItem(Util.menuHTML("img/icon/actions/export.gif", Main.i18n("tree.menu.export")), true, exportToFile); export.addStyleName("okm-MenuItem"); dirMenu.addItem(export); dirMenu.setStyleName("okm-MenuBar"); initWidget(dirMenu); }
Example 10
Source File: TaxonomyMenu.java From document-management-system with GNU General Public License v2.0 | 5 votes |
public TaxonomyMenu() { toolBarOption = new ToolBarOption(); // The item selected must be called on style.css : .okm-MenuBar .gwt-MenuItem-selected // First initialize language values dirMenu = new MenuBar(true); create = new MenuItem(Util.menuHTML("img/icon/actions/add_folder.gif", Main.i18n("tree.menu.directory.create")), true, addFolder); create.addStyleName("okm-MenuItem"); dirMenu.addItem(create); remove = new MenuItem(Util.menuHTML("img/icon/actions/delete.gif", Main.i18n("tree.menu.directory.remove")), true, delFolder); remove.addStyleName("okm-MenuItem-strike"); dirMenu.addItem(remove); rename = new MenuItem(Util.menuHTML("img/icon/actions/rename.gif", Main.i18n("tree.menu.directory.rename")), true, renFolder); rename.addStyleName("okm-MenuItem-strike"); dirMenu.addItem(rename); move = new MenuItem(Util.menuHTML("img/icon/actions/move_folder.gif", Main.i18n("tree.menu.directory.move")), true, moveFolder); move.addStyleName("okm-MenuItem"); dirMenu.addItem(move); copy = new MenuItem(Util.menuHTML("img/icon/actions/copy.gif", Main.i18n("tree.menu.directory.copy")), true, copyFolder); copy.addStyleName("okm-MenuItem"); dirMenu.addItem(copy); addDocument = new MenuItem(Util.menuHTML("img/icon/actions/add_document.gif", Main.i18n("tree.menu.directory.add.document")), true, addDocumentFolder); addDocument.addStyleName("okm-MenuItem"); dirMenu.addItem(addDocument); bookmark = new MenuItem(Util.menuHTML("img/icon/actions/add_bookmark.gif", Main.i18n("tree.menu.add.bookmark")), true, addBookmark); bookmark.addStyleName("okm-MenuItem-strike"); dirMenu.addItem(bookmark); home = new MenuItem(Util.menuHTML("img/icon/actions/bookmark.gif", Main.i18n("tree.menu.set.home")), true, setHome); home.addStyleName("okm-MenuItem-strike"); dirMenu.addItem(home); export = new MenuItem(Util.menuHTML("img/icon/actions/export.gif", Main.i18n("tree.menu.export")), true, exportToFile); export.addStyleName("okm-MenuItem-strike"); dirMenu.addItem(export); dirMenu.setStyleName("okm-MenuBar"); initWidget(dirMenu); }
Example 11
Source File: CubaGridWidget.java From cuba with Apache License 2.0 | 5 votes |
protected void initDefaultToggles() { MenuBar sidebarMenu = getSidebarMenu(); sidebarMenu.addItem(createSelectAllToggle()); sidebarMenu.addItem(createDeselectAllToggle()); sidebarMenu.addSeparator(); }
Example 12
Source File: MassiveOperationsMenu.java From document-management-system with GNU General Public License v2.0 | 5 votes |
/** * Category menu */ public MassiveOperationsMenu() { // The item selected must be called on style.css : .okm-MenuBar .gwt-MenuItem-selected // First initialize language values dirMenu = new MenuBar(true); selectAll = new MenuItem(Util.menuHTML("img/icon/actions/select_all.png", Main.i18n("filebrowser.menu.select.all")), true, massiveSelectAll); selectAll.addStyleName("okm-MenuItem-strike"); dirMenu.addItem(selectAll); selectFolders = new MenuItem(Util.menuHTML("img/menuitem_empty.gif", Main.i18n("filebrowser.menu.select.all.folders")), true, massiveSelectFolders); selectFolders.addStyleName("okm-MenuItem-strike"); dirMenu.addItem(selectFolders); selectDocuments = new MenuItem(Util.menuHTML("img/document.png", Main.i18n("filebrowser.menu.select.all.documents")), true, massiveSelectDocuments); selectDocuments.addStyleName("okm-MenuItem-strike"); dirMenu.addItem(selectDocuments); selectMails = new MenuItem(Util.menuHTML("img/email.gif", Main.i18n("filebrowser.menu.select.all.mails")), true, massiveSelectMails); selectMails.addStyleName("okm-MenuItem-strike"); dirMenu.addItem(selectMails); removeSelection = new MenuItem(Util.menuHTML("img/icon/actions/remove_all.png", Main.i18n("filebrowser.menu.remove.selection")), true, massiveRemoveSelection); removeSelection.addStyleName("okm-MenuItem-strike"); dirMenu.addItem(removeSelection); dirMenu.setStyleName("okm-MenuBar"); initWidget(dirMenu); enable(selectAll); enable(selectFolders); enable(selectDocuments); enable(selectMails); }
Example 13
Source File: CubaTreeGridWidget.java From cuba with Apache License 2.0 | 5 votes |
protected void initDefaultToggles() { MenuBar sidebarMenu = getSidebarMenu(); sidebarMenu.addItem(createSelectAllToggle()); sidebarMenu.addItem(createDeselectAllToggle()); sidebarMenu.addSeparator(); }
Example 14
Source File: Menu.java From document-management-system with GNU General Public License v2.0 | 5 votes |
/** * Browser menu */ public Menu() { // The item selected must be called on style.css : .okm-MenuBar .gwt-MenuItem-selected // First initialize language values menu = new MenuBar(true); delete = new MenuItem(UtilComunicator.menuHTML("img/icon/actions/delete.png", GeneralComunicator.i18nExtension("messaging.message.delete")), true, deletePropose); delete.addStyleName("okm-MenuItem"); menu.addItem(delete); menu.setStyleName("okm-MenuBar"); initWidget(menu); }
Example 15
Source File: Menu.java From document-management-system with GNU General Public License v2.0 | 5 votes |
/** * Browser menu */ public Menu() { // The item selected must be called on style.css : .okm-MenuBar .gwt-MenuItem-selected // First initialize language values menu = new MenuBar(true); delete = new MenuItem(UtilComunicator.menuHTML("img/icon/actions/delete.png", GeneralComunicator.i18nExtension("messaging.message.delete")), true, deleteMessageReceived); delete.addStyleName("okm-MenuItem"); menu.addItem(delete); menu.setStyleName("okm-MenuBar"); initWidget(menu); }
Example 16
Source File: TemplatesMenu.java From document-management-system with GNU General Public License v2.0 | 4 votes |
/** * MenuTemplates */ public TemplatesMenu() { toolBarOption = new ToolBarOption(); // The item selected must be called on style.css : .okm-MenuBar .gwt-MenuItem-selected // First initialize language values dirMenu = new MenuBar(true); download = new MenuItem(Util.menuHTML("img/icon/actions/download.gif", Main.i18n("filebrowser.menu.download")), true, downloadFile); download.addStyleName("okm-MenuItem-strike"); dirMenu.addItem(download); checkout = new MenuItem(Util.menuHTML("img/icon/actions/checkout.gif", Main.i18n("filebrowser.menu.checkout")), true, checkoutFile); checkout.addStyleName("okm-MenuItem-strike"); dirMenu.addItem(checkout); checkin = new MenuItem(Util.menuHTML("img/icon/actions/checkin.gif", Main.i18n("filebrowser.menu.checkin")), true, checkinFile); checkin.addStyleName("okm-MenuItem-strike"); dirMenu.addItem(checkin); cancelCheckout = new MenuItem(Util.menuHTML("img/icon/actions/cancel_checkout.gif", Main.i18n("filebrowser.menu.checkout.cancel")), true, cancelCheckinFile); cancelCheckout.addStyleName("okm-MenuItem-strike"); dirMenu.addItem(cancelCheckout); lock = new MenuItem(Util.menuHTML("img/icon/actions/lock.gif", Main.i18n("filebrowser.menu.lock")), true, lockFile); lock.addStyleName("okm-MenuItem-strike"); dirMenu.addItem(lock); unlock = new MenuItem(Util.menuHTML("img/icon/actions/unlock.gif", Main.i18n("filebrowser.menu.unlock")), true, unlockFile); unlock.addStyleName("okm-MenuItem-strike"); dirMenu.addItem(unlock); delete = new MenuItem(Util.menuHTML("img/icon/actions/delete.gif", Main.i18n("filebrowser.menu.delete")), true, deleteFile); delete.addStyleName("okm-MenuItem-strike"); dirMenu.addItem(delete); rename = new MenuItem(Util.menuHTML("img/icon/actions/rename.gif", Main.i18n("general.menu.edit.rename")), true, renameFile); rename.addStyleName("okm-MenuItem-strike"); dirMenu.addItem(rename); move = new MenuItem(Util.menuHTML("img/icon/actions/move_document.gif", Main.i18n("general.menu.edit.move")), true, moveFile); move.addStyleName("okm-MenuItem-strike"); dirMenu.addItem(move); copy = new MenuItem(Util.menuHTML("img/icon/actions/copy.gif", Main.i18n("general.menu.edit.copy")), true, copyFile); copy.addStyleName("okm-MenuItem-strike"); dirMenu.addItem(copy); convert = new MenuItem(Util.menuHTML("img/icon/menu/convert.png", Main.i18n("general.menu.tools.convert")), true, showConvert); convert.addStyleName("okm-MainMenuItem"); dirMenu.addItem(convert); note = new MenuItem(Util.menuHTML("img/icon/actions/add_note.png", Main.i18n("general.menu.edit.add.note")), true, addNote); note.addStyleName("okm-MenuItem-strike"); dirMenu.addItem(note); category = new MenuItem(Util.menuHTML("img/icon/stackpanel/table_key.gif", Main.i18n("category.add")), true, addCategory); category.addStyleName("okm-MenuItem-strike"); dirMenu.addItem(category); keyword = new MenuItem(Util.menuHTML("img/icon/actions/book_add.png", Main.i18n("keyword.add")), true, addKeyword); keyword.addStyleName("okm-MenuItem-strike"); dirMenu.addItem(keyword); propertyGroup = new MenuItem(Util.menuHTML("img/icon/actions/add_property_group.gif", Main.i18n("general.menu.edit.add.property.group")), true, addPropertyGroup); propertyGroup.addStyleName("okm-MenuItem-strike"); dirMenu.addItem(propertyGroup); updatePropertyGroup = new MenuItem(Util.menuHTML("img/icon/actions/update_property_group.png", Main.i18n("general.menu.edit.update.property.group")), true, updatePropertyGroupOKM); updatePropertyGroup.addStyleName("okm-MenuItem-strike"); dirMenu.addItem(updatePropertyGroup); merge = new MenuItem(Util.menuHTML("img/icon/actions/merge_pdf.png", Main.i18n("general.menu.edit.merge.pdf")), true, mergePdf); merge.addStyleName("okm-MenuItem-strike"); dirMenu.addItem(merge); export = new MenuItem(Util.menuHTML("img/icon/actions/export.gif", Main.i18n("general.menu.file.export")), true, exportToFile); export.addStyleName("okm-MenuItem-strike"); dirMenu.addItem(export); createFromTemplate = new MenuItem(Util.menuHTML("img/icon/actions/create_from_template.gif", Main.i18n("general.menu.file.create.from.template")), true, createFileFromTemplate); createFromTemplate.addStyleName("okm-MenuItem-strike"); dirMenu.addItem(createFromTemplate); dirMenu.setStyleName("okm-MenuBar"); initWidget(dirMenu); }
Example 17
Source File: CategoriesMenu.java From document-management-system with GNU General Public License v2.0 | 4 votes |
/** * Category menu */ public CategoriesMenu() { toolBarOption = new ToolBarOption(); // The item selected must be called on style.css : .okm-MenuBar .gwt-MenuItem-selected // First initialize language values dirMenu = new MenuBar(true); download = new MenuItem(Util.menuHTML("img/icon/actions/download.gif", Main.i18n("filebrowser.menu.download")), true, downloadFile); download.addStyleName("okm-MenuItem-strike"); dirMenu.addItem(download); checkout = new MenuItem(Util.menuHTML("img/icon/actions/checkout.gif", Main.i18n("filebrowser.menu.checkout")), true, checkoutFile); checkout.addStyleName("okm-MenuItem-strike"); dirMenu.addItem(checkout); checkin = new MenuItem(Util.menuHTML("img/icon/actions/checkin.gif", Main.i18n("filebrowser.menu.checkin")), true, checkinFile); checkin.addStyleName("okm-MenuItem-strike"); dirMenu.addItem(checkin); cancelCheckout = new MenuItem(Util.menuHTML("img/icon/actions/cancel_checkout.gif", Main.i18n("filebrowser.menu.checkout.cancel")), true, cancelCheckinFile); cancelCheckout.addStyleName("okm-MenuItem-strike"); dirMenu.addItem(cancelCheckout); lock = new MenuItem(Util.menuHTML("img/icon/actions/lock.gif", Main.i18n("filebrowser.menu.lock")), true, lockFile); lock.addStyleName("okm-MenuItem-strike"); dirMenu.addItem(lock); unlock = new MenuItem(Util.menuHTML("img/icon/actions/unlock.gif", Main.i18n("filebrowser.menu.unlock")), true, unlockFile); unlock.addStyleName("okm-MenuItem-strike"); dirMenu.addItem(unlock); delete = new MenuItem(Util.menuHTML("img/icon/actions/delete.gif", Main.i18n("filebrowser.menu.delete")), true, deleteFile); delete.addStyleName("okm-MenuItem-strike"); dirMenu.addItem(delete); rename = new MenuItem(Util.menuHTML("img/icon/actions/rename.gif", Main.i18n("general.menu.edit.rename")), true, renameFile); rename.addStyleName("okm-MenuItem-strike"); dirMenu.addItem(rename); note = new MenuItem(Util.menuHTML("img/icon/actions/add_note.png", Main.i18n("general.menu.edit.add.note")), true, addNote); note.addStyleName("okm-MenuItem-strike"); dirMenu.addItem(note); category = new MenuItem(Util.menuHTML("img/icon/stackpanel/table_key.gif", Main.i18n("category.add")), true, addCategory); category.addStyleName("okm-MenuItem-strike"); dirMenu.addItem(category); keyword = new MenuItem(Util.menuHTML("img/icon/actions/book_add.png", Main.i18n("keyword.add")), true, addKeyword); keyword.addStyleName("okm-MenuItem-strike"); dirMenu.addItem(keyword); propertyGroup = new MenuItem(Util.menuHTML("img/icon/actions/add_property_group.gif", Main.i18n("general.menu.edit.add.property.group")), true, addPropertyGroup); propertyGroup.addStyleName("okm-MenuItem-strike"); dirMenu.addItem(propertyGroup); updatePropertyGroup = new MenuItem(Util.menuHTML("img/icon/actions/update_property_group.png", Main.i18n("general.menu.edit.update.property.group")), true, updatePropertyGroupOKM); updatePropertyGroup.addStyleName("okm-MenuItem-strike"); dirMenu.addItem(updatePropertyGroup); go = new MenuItem(Util.menuHTML("img/icon/actions/goto_folder.gif", Main.i18n("search.result.menu.go.folder")), true, goDirectory); go.addStyleName("okm-MenuItem-strike"); dirMenu.addItem(go); export = new MenuItem(Util.menuHTML("img/icon/actions/export.gif", Main.i18n("general.menu.file.export")), true, exportToFile); export.addStyleName("okm-MenuItem-strike"); dirMenu.addItem(export); dirMenu.setStyleName("okm-MenuBar"); initWidget(dirMenu); }
Example 18
Source File: PersonalMenu.java From document-management-system with GNU General Public License v2.0 | 4 votes |
/** * PersonalMenu */ public PersonalMenu() { toolBarOption = new ToolBarOption(); // The item selected must be called on style.css : .okm-MenuBar .gwt-MenuItem-selected // First initialize language values dirMenu = new MenuBar(true); download = new MenuItem(Util.menuHTML("img/icon/actions/download.gif", Main.i18n("filebrowser.menu.download")), true, downloadFile); download.addStyleName("okm-MenuItem-strike"); dirMenu.addItem(download); checkout = new MenuItem(Util.menuHTML("img/icon/actions/checkout.gif", Main.i18n("filebrowser.menu.checkout")), true, checkoutFile); checkout.addStyleName("okm-MenuItem-strike"); dirMenu.addItem(checkout); checkin = new MenuItem(Util.menuHTML("img/icon/actions/checkin.gif", Main.i18n("filebrowser.menu.checkin")), true, checkinFile); checkin.addStyleName("okm-MenuItem-strike"); dirMenu.addItem(checkin); cancelCheckout = new MenuItem(Util.menuHTML("img/icon/actions/cancel_checkout.gif", Main.i18n("filebrowser.menu.checkout.cancel")), true, cancelCheckinFile); cancelCheckout.addStyleName("okm-MenuItem-strike"); dirMenu.addItem(cancelCheckout); lock = new MenuItem(Util.menuHTML("img/icon/actions/lock.gif", Main.i18n("filebrowser.menu.lock")), true, lockFile); lock.addStyleName("okm-MenuItem-strike"); dirMenu.addItem(lock); unlock = new MenuItem(Util.menuHTML("img/icon/actions/unlock.gif", Main.i18n("filebrowser.menu.unlock")), true, unlockFile); unlock.addStyleName("okm-MenuItem-strike"); dirMenu.addItem(unlock); delete = new MenuItem(Util.menuHTML("img/icon/actions/delete.gif", Main.i18n("filebrowser.menu.delete")), true, deleteFile); delete.addStyleName("okm-MenuItem-strike"); dirMenu.addItem(delete); rename = new MenuItem(Util.menuHTML("img/icon/actions/rename.gif", Main.i18n("general.menu.edit.rename")), true, renameFile); rename.addStyleName("okm-MenuItem-strike"); dirMenu.addItem(rename); move = new MenuItem(Util.menuHTML("img/icon/actions/move_document.gif", Main.i18n("general.menu.edit.move")), true, moveFile); move.addStyleName("okm-MenuItem-strike"); dirMenu.addItem(move); copy = new MenuItem(Util.menuHTML("img/icon/actions/copy.gif", Main.i18n("general.menu.edit.copy")), true, copyFile); copy.addStyleName("okm-MenuItem-strike"); dirMenu.addItem(copy); convert = new MenuItem(Util.menuHTML("img/icon/menu/convert.png", Main.i18n("general.menu.tools.convert")), true, showConvert); convert.addStyleName("okm-MainMenuItem"); dirMenu.addItem(convert); note = new MenuItem(Util.menuHTML("img/icon/actions/add_note.png", Main.i18n("general.menu.edit.add.note")), true, addNote); note.addStyleName("okm-MenuItem-strike"); dirMenu.addItem(note); category = new MenuItem(Util.menuHTML("img/icon/stackpanel/table_key.gif", Main.i18n("category.add")), true, addCategory); category.addStyleName("okm-MenuItem-strike"); dirMenu.addItem(category); keyword = new MenuItem(Util.menuHTML("img/icon/actions/book_add.png", Main.i18n("keyword.add")), true, addKeyword); keyword.addStyleName("okm-MenuItem-strike"); dirMenu.addItem(keyword); propertyGroup = new MenuItem(Util.menuHTML("img/icon/actions/add_property_group.gif", Main.i18n("general.menu.edit.add.property.group")), true, addPropertyGroup); propertyGroup.addStyleName("okm-MenuItem-strike"); dirMenu.addItem(propertyGroup); updatePropertyGroup = new MenuItem(Util.menuHTML("img/icon/actions/update_property_group.png", Main.i18n("general.menu.edit.update.property.group")), true, updatePropertyGroupOKM); updatePropertyGroup.addStyleName("okm-MenuItem-strike"); dirMenu.addItem(updatePropertyGroup); merge = new MenuItem(Util.menuHTML("img/icon/actions/merge_pdf.png", Main.i18n("general.menu.edit.merge.pdf")), true, mergePdf); merge.addStyleName("okm-MenuItem-strike"); dirMenu.addItem(merge); export = new MenuItem(Util.menuHTML("img/icon/actions/export.gif", Main.i18n("general.menu.file.export")), true, exportToFile); export.addStyleName("okm-MenuItem-strike"); dirMenu.addItem(export); dirMenu.setStyleName("okm-MenuBar"); initWidget(dirMenu); }
Example 19
Source File: MailMenu.java From document-management-system with GNU General Public License v2.0 | 4 votes |
/** * MailMenu */ public MailMenu() { toolBarOption = new ToolBarOption(); // The item selected must be called on style.css : .okm-MenuBar .gwt-MenuItem-selected // First initialize language values dirMenu = new MenuBar(true); delete = new MenuItem(Util.menuHTML("img/icon/actions/delete.gif", Main.i18n("filebrowser.menu.delete")), true, deleteFile); delete.addStyleName("okm-MenuItem-strike"); dirMenu.addItem(delete); rename = new MenuItem(Util.menuHTML("img/icon/actions/rename.gif", Main.i18n("general.menu.edit.rename")), true, renameFile); rename.addStyleName("okm-MenuItem-strike"); dirMenu.addItem(rename); move = new MenuItem(Util.menuHTML("img/icon/actions/move_document.gif", Main.i18n("general.menu.edit.move")), true, moveFile); move.addStyleName("okm-MenuItem-strike"); dirMenu.addItem(move); copy = new MenuItem(Util.menuHTML("img/icon/actions/copy.gif", Main.i18n("general.menu.edit.copy")), true, copyFile); copy.addStyleName("okm-MenuItem-strike"); dirMenu.addItem(copy); convert = new MenuItem(Util.menuHTML("img/icon/menu/convert.png", Main.i18n("general.menu.tools.convert")), true, showConvert); convert.addStyleName("okm-MainMenuItem"); dirMenu.addItem(convert); note = new MenuItem(Util.menuHTML("img/icon/actions/add_note.png", Main.i18n("general.menu.edit.add.note")), true, addNote); note.addStyleName("okm-MenuItem-strike"); dirMenu.addItem(note); category = new MenuItem(Util.menuHTML("img/icon/stackpanel/table_key.gif", Main.i18n("category.add")), true, addCategory); category.addStyleName("okm-MenuItem-strike"); dirMenu.addItem(category); keyword = new MenuItem(Util.menuHTML("img/icon/actions/book_add.png", Main.i18n("keyword.add")), true, addKeyword); keyword.addStyleName("okm-MenuItem-strike"); dirMenu.addItem(keyword); propertyGroup = new MenuItem(Util.menuHTML("img/icon/actions/add_property_group.gif", Main.i18n("general.menu.edit.add.property.group")), true, addPropertyGroup); propertyGroup.addStyleName("okm-MenuItem-strike"); dirMenu.addItem(propertyGroup); updatePropertyGroup = new MenuItem(Util.menuHTML("img/icon/actions/update_property_group.png", Main.i18n("general.menu.edit.update.property.group")), true, updatePropertyGroupOKM); updatePropertyGroup.addStyleName("okm-MenuItem-strike"); dirMenu.addItem(updatePropertyGroup); merge = new MenuItem(Util.menuHTML("img/icon/actions/merge_pdf.png", Main.i18n("general.menu.edit.merge.pdf")), true, mergePdf); merge.addStyleName("okm-MenuItem-strike"); dirMenu.addItem(merge); dirMenu.setStyleName("okm-MenuBar"); initWidget(dirMenu); }
Example 20
Source File: FinderColumn.java From core with GNU Lesser General Public License v2.1 | 4 votes |
private void openTopContextMenu(Element anchor, final NativeEvent event) { Element el = Element.as(event.getEventTarget()); //Element anchor = el.getParentElement().getParentElement(); final PopupPanel popupPanel = new PopupPanel(true); final MenuBar popupMenuBar = new MenuBar(true); popupMenuBar.setStyleName("dropdown-menu"); int i=0; for (final MenuDelegate menuitem : accessibleTopMenuItems) { if(i>0) { // skip the "default" action MenuItem cmd = new MenuItem(menuitem.getTitle(), true, new Command() { @Override public void execute() { Scheduler.get().scheduleDeferred(new Scheduler.ScheduledCommand() { @Override public void execute() { menuitem.getCommand().executeOn(null); } }); popupPanel.hide(); } }); popupMenuBar.addItem(cmd); } i++; } popupMenuBar.setVisible(true); popupPanel.setWidget(popupMenuBar); int left = anchor.getAbsoluteLeft(); int top = anchor.getAbsoluteTop() + 30; popupPanel.setPopupPosition(left, top); popupPanel.setAutoHideEnabled(true); popupPanel.show(); }