Java Code Examples for com.google.gwt.user.client.ui.MenuBar#setStyleName()

The following examples show how to use com.google.gwt.user.client.ui.MenuBar#setStyleName() . 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: FindToolBarMenu.java    From document-management-system with GNU General Public License v2.0 6 votes vote down vote up
/**
 * 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 2
Source File: Menu.java    From document-management-system with GNU General Public License v2.0 6 votes vote down vote up
/**
 * 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 3
Source File: TrashMenu.java    From document-management-system with GNU General Public License v2.0 6 votes vote down vote up
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 4
Source File: MailMenu.java    From document-management-system with GNU General Public License v2.0 6 votes vote down vote up
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 5
Source File: Menu.java    From document-management-system with GNU General Public License v2.0 5 votes vote down vote up
/**
 * 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 6
Source File: TemplateMenu.java    From document-management-system with GNU General Public License v2.0 5 votes vote down vote up
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 7
Source File: PersonalMenu.java    From document-management-system with GNU General Public License v2.0 5 votes vote down vote up
/**
 * 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);
	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 8
Source File: MainMenu.java    From document-management-system with GNU General Public License v2.0 5 votes vote down vote up
/**
 * createSubMenu
 */
private void createSubMenu(String parentFolderPath, String fldName) {
	MenuBar subMenuFolder = new MenuBar(true);
	subMenuFolder.setStyleName("okm-SubMenuBar");

	MenuItem menuFolder = new MenuItem(Util.menuHTML("img/menuitem_empty.gif", fldName), true, subMenuFolder);
	menuFolder.addStyleName("okm-MainMenuItem");

	fldMenus.put(parentFolderPath + "/" + fldName, subMenuFolder);
	fldMenus.get(parentFolderPath).addItem(menuFolder);
}
 
Example 9
Source File: MassiveOperationsMenu.java    From document-management-system with GNU General Public License v2.0 5 votes vote down vote up
/**
 * 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 10
Source File: Menu.java    From document-management-system with GNU General Public License v2.0 5 votes vote down vote up
/**
 * 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 11
Source File: TaxonomyMenu.java    From document-management-system with GNU General Public License v2.0 5 votes vote down vote up
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 12
Source File: Menu.java    From document-management-system with GNU General Public License v2.0 5 votes vote down vote up
/**
 * 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 13
Source File: MetadataMenu.java    From document-management-system with GNU General Public License v2.0 4 votes vote down vote up
/**
 * MetadataMenu menu
 */
public MetadataMenu() {
	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);

	dirMenu.setStyleName("okm-MenuBar");
	initWidget(dirMenu);
}
 
Example 14
Source File: ThesaurusMenu.java    From document-management-system with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Thesaurus menu
 */
public ThesaurusMenu() {
	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);

	dirMenu.setStyleName("okm-MenuBar");
	initWidget(dirMenu);
}
 
Example 15
Source File: TemplatesMenu.java    From document-management-system with GNU General Public License v2.0 4 votes vote down vote up
/**
 * 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 16
Source File: CategoriesMenu.java    From document-management-system with GNU General Public License v2.0 4 votes vote down vote up
/**
 * 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 17
Source File: PersonalMenu.java    From document-management-system with GNU General Public License v2.0 4 votes vote down vote up
/**
 * 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 18
Source File: MailMenu.java    From document-management-system with GNU General Public License v2.0 4 votes vote down vote up
/**
 * 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 19
Source File: TaxonomyMenu.java    From document-management-system with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Browser menu
 */
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);
	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, cancelCheckoutFile);
	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);
	bookmark = new MenuItem(Util.menuHTML("img/icon/actions/add_bookmark.gif", Main.i18n("general.menu.bookmark.add")), true, addBookmark);
	bookmark.addStyleName("okm-MenuItem-strike");
	dirMenu.addItem(bookmark);
	home = new MenuItem(Util.menuHTML("img/icon/actions/bookmark.gif", Main.i18n("filebrowser.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("general.menu.file.export")), true, exportToFile);
	export.addStyleName("okm-MenuItem-strike");
	dirMenu.addItem(export);

	dirMenu.setStyleName("okm-MenuBar");
	initWidget(dirMenu);
}
 
Example 20
Source File: FinderColumn.java    From core with GNU Lesser General Public License v2.1 4 votes vote down vote up
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();
    }