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


Java Action.run方法代码示例

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


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

示例1: duplicateView

import org.eclipse.jface.action.Action; //导入方法依赖的package包/类
private void duplicateView() {
	Server server = ServerManager.getInstance().getServer(serverId);
	String counterDisplay = "";
	if(server != null){
		counterDisplay = server.getCounterEngine().getCounterDisplayName(objType, counter);
	}
	
	Action duplicateAction = new OpenPastLongDateAllAction(window, counterDisplay, objType, counter, Images.getCounterImage(objType, counter, serverId), sDate, eDate, serverId);
	duplicateAction.run();
}
 
开发者ID:scouter-project,项目名称:scouter,代码行数:11,代码来源:CounterPastLongDateAllView.java

示例2: duplicateView

import org.eclipse.jface.action.Action; //导入方法依赖的package包/类
private void duplicateView() {
	Server server = ServerManager.getInstance().getServer(serverId);
	String counterDisplay = "";
	if(server != null){
		counterDisplay = server.getCounterEngine().getCounterDisplayName(objType, counter);
	}
	
	Action duplicateAction = new OpenPastTimeTotalAction(window, counterDisplay, objType, counter, Images.getCounterImage(objType, counter, serverId), startTime, endTime, serverId);
	duplicateAction.run();
}
 
开发者ID:scouter-project,项目名称:scouter,代码行数:11,代码来源:CounterPastTimeTotalView.java

示例3: duplicateView

import org.eclipse.jface.action.Action; //导入方法依赖的package包/类
private void duplicateView() {
	Server server = ServerManager.getInstance().getServer(serverId);
	String counterDisplay = "";
	if(server != null){
		counterDisplay = server.getCounterEngine().getCounterDisplayName(objType, counter);
	}
	
	Action duplicateAction = new OpenPastLongDateTotalAction(window, counterDisplay, objType, counter, Images.getCounterImage(objType, counter, serverId), sDate, eDate, serverId);
	duplicateAction.run();
}
 
开发者ID:scouter-project,项目名称:scouter,代码行数:11,代码来源:CounterPastLongDateTotalView.java

示例4: duplicateView

import org.eclipse.jface.action.Action; //导入方法依赖的package包/类
private void duplicateView() {
	Server server = ServerManager.getInstance().getServer(serverId);
	String counterDisplay = "";
	if(server != null){
		counterDisplay = server.getCounterEngine().getCounterDisplayName(objType, counter);
	}
	
	Action duplicateAction = new OpenPastTimeAllAction(window, counterDisplay, objType, counter, Images.getCounterImage(objType, counter, serverId), startTime, endTime, serverId);
	duplicateAction.run();
}
 
开发者ID:scouter-project,项目名称:scouter,代码行数:11,代码来源:CounterPastTimeAllView.java

示例5: createToolbars

import org.eclipse.jface.action.Action; //导入方法依赖的package包/类
public static Composite createToolbars(final IToolbarDecoratedView view, final Composite composite) {
	final Composite intermediateComposite = createIntermediateCompositeFor(view, composite);
	final Composite toolbarComposite = createToolbarComposite(view, intermediateComposite);
	final Composite childComposite = new Composite(intermediateComposite, SWT.None);
	childComposite.setLayoutData(getLayoutDataForChild());
	childComposite.setLayout(getLayoutForChild());

	final GamaToolbar2 tb =
			new GamaToolbar2(toolbarComposite, SWT.FLAT | SWT.HORIZONTAL | SWT.NO_FOCUS, TOOLBAR_HEIGHT);
	final GridData data = new GridData(SWT.FILL, SWT.FILL, true, false);
	data.minimumWidth = TOOLBAR_HEIGHT * 2;
	tb.setLayoutData(data);
	composite.addDisposeListener(e -> disposeToolbar(view, tb));
	buildToolbar(view, tb);

	// Creating the toggles
	final Action toggle = new ToggleAction() {

		@Override
		public void run() {
			show = !show;
			((GridData) toolbarComposite.getLayoutData()).exclude = !show;
			toolbarComposite.setVisible(show);
			toolbarComposite.getParent().layout();
			setIcon();
		}
	};

	// Install the toogles in the view site
	final IWorkbenchSite site = view.getSite();
	if (site instanceof IViewSite) {
		final IToolBarManager tm = ((IViewSite) site).getActionBars().getToolBarManager();
		tm.add(toggle);
		if (view instanceof IGamaView.Display) {
			final Action toggleSideControls = new ToggleSideControls() {
				@Override
				public void run() {
					((IGamaView.Display) view).toggleSideControls();
				}
			};

			final Action toggleOverlay = new ToggleOverlay() {
				@Override
				public void run() {
					((IGamaView.Display) view).toggleOverlay();
				}
			};
			tm.add(toggleOverlay);
			tm.add(toggleSideControls);
		}
		tm.update(true);
	}

	if (!view.toolbarVisible())
		toggle.run();
	return childComposite;
}
 
开发者ID:gama-platform,项目名称:gama,代码行数:58,代码来源:GamaToolbarFactory.java


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