当前位置: 首页>>代码示例>>Java>>正文


Java MenuBar.addStyleName方法代码示例

本文整理汇总了Java中com.google.gwt.user.client.ui.MenuBar.addStyleName方法的典型用法代码示例。如果您正苦于以下问题:Java MenuBar.addStyleName方法的具体用法?Java MenuBar.addStyleName怎么用?Java MenuBar.addStyleName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.google.gwt.user.client.ui.MenuBar的用法示例。


在下文中一共展示了MenuBar.addStyleName方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: Menu

import com.google.gwt.user.client.ui.MenuBar; //导入方法依赖的package包/类
/**
 * 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);
}
 
开发者ID:openkm,项目名称:document-management-system,代码行数:27,代码来源:Menu.java

示例2: Menu

import com.google.gwt.user.client.ui.MenuBar; //导入方法依赖的package包/类
/**
 * Browser menu
 */
public Menu() {
	// The item selected must be called on style.css : .okm-MenuBar .gwt-MenuItem-selected

	// First initialize language values
	searchSavedMenu = new MenuBar(true);
	run = new MenuItem(Util.menuHTML("img/icon/actions/run.gif", Main.i18n("search.saved.run")), true, runSearch);
	run.addStyleName("okm-MenuItem");
	searchSavedMenu.addItem(run);
	delete = new MenuItem(Util.menuHTML("img/icon/actions/delete.gif", Main.i18n("search.saved.delete")), true, deleteSearch);
	delete.addStyleName("okm-MenuItem");
	searchSavedMenu.addItem(delete);
	share = new MenuItem(Util.menuHTML("img/icon/actions/share_query.gif", GeneralComunicator.i18nExtension("messaging.share.query")), true, shareSearch);
	share.addStyleName("okm-MenuItem");
	searchSavedMenu.addStyleName("okm-MenuBar");
	initWidget(searchSavedMenu);
}
 
开发者ID:openkm,项目名称:document-management-system,代码行数:20,代码来源:Menu.java

示例3: TrashMenu

import com.google.gwt.user.client.ui.MenuBar; //导入方法依赖的package包/类
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);
	restoreItem = new MenuItem(Util.menuHTML("img/icon/actions/restore.gif", Main.i18n("general.menu.file.restore")), true, restore);
	restoreItem.addStyleName("okm-MenuItem");
	dirMenu.addItem(restoreItem);
	purgeItem = new MenuItem(Util.menuHTML("img/icon/actions/purge.gif", Main.i18n("general.menu.file.purge")), true, purge);
	purgeItem.addStyleName("okm-MenuItem");
	dirMenu.addItem(purgeItem);
	dirMenu.addStyleName("okm-MenuBar");
	initWidget(dirMenu);
}
 
开发者ID:openkm,项目名称:document-management-system,代码行数:16,代码来源:TrashMenu.java

示例4: Menu

import com.google.gwt.user.client.ui.MenuBar; //导入方法依赖的package包/类
/**
 * 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);
}
 
开发者ID:openkm,项目名称:document-management-system,代码行数:18,代码来源:Menu.java

示例5: setWidgetToMainPanel

import com.google.gwt.user.client.ui.MenuBar; //导入方法依赖的package包/类
public static void setWidgetToMainPanel(Widget w, WindowGVO windowGVO) {
	if (w != null) {
		clearWidgetFromMainPanel();
		SimplePanel mainPanel = ClientApplicationContext.getInstance().getMainPanel();
		if (mainPanel==null){
			mainPanel = new SimplePanel();
			mainPanel.setWidth(Window.getClientWidth() + "px");
			mainPanel.setHeight(Window.getClientHeight() + "px");

			ClientApplicationContext.getInstance().setMainPanel(mainPanel);
			MenuBar menuBar = ClientApplicationContext.getInstance().getApplicationsMenu();
			if(menuBar != null){
				menuBar.addStyleName("SDIMenu");
				RootPanel.get().add((Widget) mainPanel,0,24);
			} else {
				RootPanel.get().add((Widget) mainPanel,0,0);
			}
		}

		w.setWidth(Window.getClientWidth() + "px");
		w.setHeight(Window.getClientHeight() + "px");
		mainPanel.addStyleName("SDIWrapper");
		mainPanel.setWidget(w);
		w.addStyleName("SDIPanel");
		if(windowGVO != null) {
			RendererHelper.addStyle(windowGVO.getRootPanel(), w);
		}
	}
}
 
开发者ID:qafedev,项目名称:qafe-platform,代码行数:30,代码来源:WindowFactory.java


注:本文中的com.google.gwt.user.client.ui.MenuBar.addStyleName方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。