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


Java MenuItem类代码示例

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


MenuItem类属于com.google.gwt.user.client.ui包,在下文中一共展示了MenuItem类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: create

import com.google.gwt.user.client.ui.MenuItem; //导入依赖的package包/类
public static MenuItem create(final ProgramLeaf node, final ProgramTree tree) {

		Command command = new MenuItemCommand(node) {

			@Override
			public void execute() {
				UpdateProgramPanel panel = new UpdateProgramPanel(tree,node);
				panel.show(node.getModule());
				this.component.getContextMenu().hide();
			}

		};

		MenuItem item = new MenuItem("Update", command);
		return item;
	}
 
开发者ID:ICT-BDA,项目名称:EasyML,代码行数:17,代码来源:ProgramUpdateMenu.java

示例2: createDeleteItem

import com.google.gwt.user.client.ui.MenuItem; //导入依赖的package包/类
/**
 * Create DeleteItem
 * @param com
 * @return delete item
 */
public static MenuItem createDeleteItem(HasRightMouseUpMenu com) {
	Command command = new MenuItemCommand(com) {

		@Override
		public void execute() {
			BaseWidget widget = (BaseWidget) this.component;
			DiagramController controller = widget.getController();
			controller.deleteWidget(widget);
			widget.getContextMenu().hide();
		}

	};

	MenuItem item = new MenuItem("Delete", command);
	return item;
}
 
开发者ID:ICT-BDA,项目名称:EasyML,代码行数:22,代码来源:BaseWidgetMenuItemFactory.java

示例3: createPremeterItem

import com.google.gwt.user.client.ui.MenuItem; //导入依赖的package包/类
/**
 * Create PremeterItem
 * @param com
 * @return PremeterItem
 */
public static MenuItem createPremeterItem(HasRightMouseUpMenu com) {
	Command command = new MenuItemCommand(com) {

		@Override
		public void execute() {
			ProgramWidget widget = (ProgramWidget) this.component;
			widget.getParameterPanel();
			widget.setETLPanel();
			widget.getContextMenu().hide();
		}

	};

	MenuItem item = new MenuItem("Configure parameters", command);
	return item;
}
 
开发者ID:ICT-BDA,项目名称:EasyML,代码行数:22,代码来源:BaseWidgetMenuItemFactory.java

示例4: createDownloadData

import com.google.gwt.user.client.ui.MenuItem; //导入依赖的package包/类
/**
 * Create DownloadDataItem
 * @param com
 * @return DownloadDataItem
 */
public static MenuItem createDownloadData(HasRightMouseUpMenu com) {
	Command command = new MenuItemCommand(com) {

		@Override
		public void execute() {

			DatasetWidget widget = (DatasetWidget) this.component;
			widget.getContextMenu().hide();
			OutNodeShape shape = widget.getOutNodeShapes().get(0);
			String filename = shape.getAbsolutePath() + "/" + shape.getFileId();
			String url = GWT.getModuleBaseURL().split("EMLStudio")[0]
					+ "EMLStudioMonitor/filedownload?filename=" + filename;
			Window.open(url, "_blank", "status=0,toolbar=0,menubar=0,location=0");

		}

	};

	MenuItem item = new MenuItem("Download", command);
	return item;
}
 
开发者ID:ICT-BDA,项目名称:EasyML,代码行数:27,代码来源:BaseWidgetMenuItemFactory.java

示例5: createStderrItem

import com.google.gwt.user.client.ui.MenuItem; //导入依赖的package包/类
/**
 * Create StderrItem
 * @param com
 * @return StderrItem
 */
public static MenuItem createStderrItem(HasRightMouseUpMenu com) {
	Command command = new MenuItemCommand(com) {

		@Override
		public void execute() {
			ProgramWidget widget = (ProgramWidget) this.component;
			MonitorController controller = (MonitorController) widget
					.getController();
			String oozJobId = widget.getAction().getJobId();
			String actionid = widget.getId();
			controller.getStdErr(oozJobId, actionid);
			widget.getContextMenu().hide();
		}

	};

	MenuItem item = new MenuItem("Show Stderr", command);
	return item;
}
 
开发者ID:ICT-BDA,项目名称:EasyML,代码行数:25,代码来源:BaseWidgetMenuItemFactory.java

示例6: createStdoutItem

import com.google.gwt.user.client.ui.MenuItem; //导入依赖的package包/类
/**
 * Create StdoutItem
 * @param com
 * @return StdoutItem
 */
public static MenuItem createStdoutItem(HasRightMouseUpMenu com) {
	Command command = new MenuItemCommand(com) {

		@Override
		public void execute() {
			ProgramWidget widget = (ProgramWidget) this.component;
			MonitorController controller = (MonitorController) widget
					.getController();
			String oozJobId = widget.getAction().getJobId();
			String actionid = widget.getId();
			controller.getStdOut(oozJobId, actionid);
			widget.getContextMenu().hide();
		}

	};

	MenuItem item = new MenuItem("Show Stdout", command);
	return item;
}
 
开发者ID:ICT-BDA,项目名称:EasyML,代码行数:25,代码来源:BaseWidgetMenuItemFactory.java

示例7: createShowResultItem

import com.google.gwt.user.client.ui.MenuItem; //导入依赖的package包/类
/**
 * Create result preview popup menuitem
 * 
 * @param com
 * @return
 */
public static MenuItem createShowResultItem(HasRightMouseUpMenu com) {
	Command command = new MenuItemCommand(com) {
		@Override
		public void execute() {
			NodeShape nodeShape = (NodeShape) this.component;
			//If the shape node is output node shape
			if(nodeShape instanceof OutNodeShape) {
				OutNodeShape outShape  = (OutNodeShape) nodeShape;
				String fileId = outShape.getFileId();
				String path = outShape.getAbsolutePath();
				DBController.showPreviewPopup(path,fileId);
			}
			nodeShape.getContextMenu().hide();
		}
	};

	MenuItem item = new MenuItem("Results preview", command);
	return item;
}
 
开发者ID:ICT-BDA,项目名称:EasyML,代码行数:26,代码来源:BaseShapeMenuItemFactory.java

示例8: createVisuallizeItem

import com.google.gwt.user.client.ui.MenuItem; //导入依赖的package包/类
/**
 * Create data visualization popup menuitem
 * 
 * @param com
 * @return
 */
public static MenuItem createVisuallizeItem(HasRightMouseUpMenu com) {
	Command command = new MenuItemCommand(com) {
		@Override
		public void execute() {
			NodeShape nodeShape = (NodeShape) this.component;
			// If the node shape is output node shape
			if(nodeShape instanceof OutNodeShape) {
				OutNodeShape outShape  = (OutNodeShape) nodeShape;
				String fileId = outShape.getFileId();
				String path = outShape.getAbsolutePath();
				String fPath = path +"/"+fileId;
				DBController.showDataVisualPopup(fPath,fileId);
			}
			nodeShape.getContextMenu().hide();
		}
	};
	MenuItem item = new MenuItem("Visualization", command);
	return item;
}
 
开发者ID:ICT-BDA,项目名称:EasyML,代码行数:26,代码来源:BaseShapeMenuItemFactory.java

示例9: DropDownButton

import com.google.gwt.user.client.ui.MenuItem; //导入依赖的package包/类
public DropDownButton(String widgetName, String caption, List<DropDownItem> toolbarItems,
                      boolean rightAlign) {
  super(caption + " \u25BE ");  // drop down triangle

  this.menu = new ContextMenu();
  this.items = new ArrayList<MenuItem>();
  this.rightAlign = rightAlign;

  for (DropDownItem item : toolbarItems) {
    if (item != null) {
      this.items.add(menu.addItem(item.caption, true, item.command));
    } else {
      menu.addSeparator();
    }
  }

  addClickHandler(new ClickHandler() {
    @Override
    public void onClick(ClickEvent event) {
      menu.setPopupPositionAndShow(new DropDownPositionCallback(getElement()));
    }
  });
}
 
开发者ID:mit-cml,项目名称:appinventor-extensions,代码行数:24,代码来源:DropDownButton.java

示例10: TrashMenu

import com.google.gwt.user.client.ui.MenuItem; //导入依赖的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);
	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);
}
 
开发者ID:openkm,项目名称:document-management-system,代码行数:19,代码来源:TrashMenu.java

示例11: MailMenu

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

示例12: Menu

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

示例13: Menu

import com.google.gwt.user.client.ui.MenuItem; //导入依赖的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

示例14: FindToolBarMenu

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

示例15: Menu

import com.google.gwt.user.client.ui.MenuItem; //导入依赖的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


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