本文整理汇总了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();
}
示例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();
}
示例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();
}
示例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();
}
示例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;
}