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


Java Action.setImageDescriptor方法代码示例

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


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

示例1: createActions

import org.eclipse.jface.action.Action; //导入方法依赖的package包/类
private void createActions() {
    newNodeAction = new NewNodeAction(this);
    renameNodeAction = new RenameNodeAction(this);
    deleteNodeAction = new DeleteNodeAction(this);
    moveUpNodeAction = new MoveUpNodeAction(this);
    moveDownNodeAction = new MoveDownNodeAction(this);
    promoteNodeAction = new PromoteNodeAction(this);
    demoteNodeAction = new DemoteNodeAction(this);
    refreshAction = new Action() {
        @Override
        public void run() {
            refresh();
        }
    };
    refreshAction.setText(Messages.getString("CommonStructureControl.RefreshActionText")); //$NON-NLS-1$
    refreshAction.setImageDescriptor(
        AbstractUIPlugin.imageDescriptorFromPlugin(TFSCommonUIClientPlugin.PLUGIN_ID, "icons/Refresh.gif")); //$NON-NLS-1$
}
 
开发者ID:Microsoft,项目名称:team-explorer-everywhere,代码行数:19,代码来源:CommonStructureControl.java

示例2: createTerminateAction

import org.eclipse.jface.action.Action; //导入方法依赖的package包/类
private Action createTerminateAction() {
  Action terminate = new Action(Messages.getString("action.stop")) {
    @Override
    public void run() {
      DeployJob job = console.getJob();
      if (job != null) {
        job.cancel();
        update();
      }
    }
  };
  terminate.setToolTipText(Messages.getString("action.stop"));
  terminate.setImageDescriptor(getSharedImage(ISharedImages.IMG_ELCL_STOP));
  terminate.setHoverImageDescriptor(getSharedImage(ISharedImages.IMG_ELCL_STOP));
  terminate.setDisabledImageDescriptor(getSharedImage(ISharedImages.IMG_ELCL_STOP_DISABLED));
  return terminate;
}
 
开发者ID:GoogleCloudPlatform,项目名称:google-cloud-eclipse,代码行数:18,代码来源:DeployConsolePageParticipant.java

示例3: configureToolBar

import org.eclipse.jface.action.Action; //导入方法依赖的package包/类
private void configureToolBar(IToolBarManager toolbarManager) {
  terminateAction = new Action(Messages.actionStop) {
    @Override
    public void run() {
      //code to execute when button is pressed
      LocalAppEngineServerBehaviour serverBehaviour = console.getServerBehaviourDelegate();
      if (serverBehaviour != null) {
        // try to initiate a nice shutdown
        boolean force = serverBehaviour.getServer().getServerState() == IServer.STATE_STOPPING;
        serverBehaviour.stop(force);
      }
      update();
    }
  };
  terminateAction.setToolTipText(Messages.actionStopToolTip);
  terminateAction.setImageDescriptor(ImageResource.getImageDescriptor(ImageResource.IMG_ELCL_STOP));
  terminateAction.setHoverImageDescriptor(ImageResource.getImageDescriptor(ImageResource.IMG_CLCL_STOP));
  terminateAction.setDisabledImageDescriptor(ImageResource.getImageDescriptor(ImageResource.IMG_DLCL_STOP));

  toolbarManager.appendToGroup(IConsoleConstants.LAUNCH_GROUP, terminateAction);
}
 
开发者ID:GoogleCloudPlatform,项目名称:google-cloud-eclipse,代码行数:22,代码来源:LocalAppEngineConsolePageParticipant.java

示例4: createActions

import org.eclipse.jface.action.Action; //导入方法依赖的package包/类
private void createActions() {

		_actionTTSpeed_Add = new ActionSpeedTourType_Add();
		_actionTTSpeed_Sort = new ActionSpeedTourType_Sort();

		_actionOpenTourTypePrefs = new ActionOpenPrefDialog(
				Messages.action_tourType_modify_tourTypes,
				ITourbookPreferences.PREF_PAGE_TOUR_TYPE);

		/*
		 * Action: Restore default
		 */
		_actionRestoreDefaults = new Action() {
			@Override
			public void run() {
				resetDashboardToDefaults();
			}
		};

		_actionRestoreDefaults.setImageDescriptor(//
				TourbookPlugin.getImageDescriptor(Messages.Image__App_RestoreDefault));
		_actionRestoreDefaults.setToolTipText(Messages.App_Action_RestoreDefault_Tooltip);
	}
 
开发者ID:wolfgang-ch,项目名称:mytourbook,代码行数:24,代码来源:DialogEasyImportConfig.java

示例5: configureAction

import org.eclipse.jface.action.Action; //导入方法依赖的package包/类
@Override
protected void configureAction(Action action) {
	action.setText("Hide Local Types");
	action.setDescription("Hide Local Types");
	action.setToolTipText("Hide Local (not exported) types");
	action.setImageDescriptor(imageHelper.getImageDescriptor("localtypes_co.png"));
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:8,代码来源:N4JSFilterLocalTypesOutlineContribution.java

示例6: configureAction

import org.eclipse.jface.action.Action; //导入方法依赖的package包/类
@Override
protected void configureAction(Action action) {
	action.setText("Hide Static Members");
	action.setDescription("Hide Static Members");
	action.setToolTipText("Hide Static Fields and Methods");
	action.setImageDescriptor(imageHelper.getImageDescriptor("static_co.png"));
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:8,代码来源:N4JSFilterStaticMembersOutlineContribution.java

示例7: configureAction

import org.eclipse.jface.action.Action; //导入方法依赖的package包/类
@Override
protected void configureAction(Action action) {
	action.setText("Hide Non-Public Members");
	action.setDescription("Hide Non-Public Members");
	action.setToolTipText("Hide Non-Public Fields and Methods");
	action.setImageDescriptor(imageHelper.getImageDescriptor("public_co.png"));
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:8,代码来源:N4JSFilterNonPublicMembersOutlineContribution.java

示例8: configureAction

import org.eclipse.jface.action.Action; //导入方法依赖的package包/类
@Override
protected void configureAction(Action action) {
	action.setText("Show Inherited Members");
	action.setDescription("Show Inherited Members");
	action.setToolTipText("Show inherited, consumed, and polyfilled members");
	action.setImageDescriptor(imageHelper.getImageDescriptor("inher_co.png"));
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:8,代码来源:N4JSShowInheritedMembersOutlineContribution.java

示例9: createAction

import org.eclipse.jface.action.Action; //导入方法依赖的package包/类
/**
 * Creates a single action.
 */
protected Action createAction(String text, int style, String tooltip, ImageDescriptor imageDescriptor,
		Runnable runnable) {
	final Action a = new Action(text, style) {
		@Override
		public void run() {
			if (runnable != null)
				runnable.run();
		}
	};
	a.setToolTipText(tooltip);
	a.setImageDescriptor(imageDescriptor);
	return a;
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:17,代码来源:TestResultsView.java

示例10: createAction

import org.eclipse.jface.action.Action; //导入方法依赖的package包/类
private Action createAction(String label, int style, String tooltip, ImageDescriptor image,
		Consumer<Action> onRun) {
	final Action result = new Action(label, style) {
		@Override
		public void run() {
			onRun.accept(this);
		}
	};
	result.setText(label);
	result.setToolTipText(tooltip);
	result.setImageDescriptor(image);
	getViewSite().getActionBars().getToolBarManager().add(result);
	return result;
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:15,代码来源:PerformanceView.java

示例11: createActions

import org.eclipse.jface.action.Action; //导入方法依赖的package包/类
private void createActions() {
	sampleAction = new Action() {
		public void run() {
			MessageDialog.openInformation(null, "osets-eclipse-plugin", "Sample Action Executed");
		}
	};
	sampleAction.setText("Sample Action");
	sampleAction.setToolTipText("Sample Action tool tip");
	sampleAction.setImageDescriptor(PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(IDE.SharedImages.IMG_OBJS_TASK_TSK));
}
 
开发者ID:dstl,项目名称:Open_Source_ECOA_Toolset_AS5,代码行数:11,代码来源:CompDefEditorContributor.java

示例12: addtoolbarAction

import org.eclipse.jface.action.Action; //导入方法依赖的package包/类
private void addtoolbarAction(ToolBarManager toolBarManager, final ImagePathConstant imagePath, Action action) {

		ImageDescriptor exportImageDescriptor = new ImageDescriptor() {
			@Override
			public ImageData getImageData() {
				return imagePath.getImageFromRegistry().getImageData();
			}
		};
		action.setImageDescriptor(exportImageDescriptor);
		toolBarManager.add(action);
	}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:12,代码来源:DebugDataViewer.java

示例13: addtoolbarAction

import org.eclipse.jface.action.Action; //导入方法依赖的package包/类
/**
 * Addtoolbar action.
 *
 * @param toolBarManager the tool bar manager
 * @param imagePath the image path
 * @param action the action
 */
private void addtoolbarAction(ToolBarManager toolBarManager, final ImagePathConstant imagePath, Action action) {

	ImageDescriptor exportImageDescriptor = new ImageDescriptor() {
		@Override
		public ImageData getImageData() {
			return imagePath.getImageFromRegistry().getImageData();
		}
	};
	action.setImageDescriptor(exportImageDescriptor);
	toolBarManager.add(action);
}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:19,代码来源:ExecutionTrackingConsole.java

示例14: createActions

import org.eclipse.jface.action.Action; //导入方法依赖的package包/类
/**
 * Créé les actions de la page.
 */
private void createActions() {
	/* Créé l'action de tri de l'arborescence */
	sortAction = new Action("Sort", IAction.AS_CHECK_BOX) {
		@Override
		public void run() {
			sortDeclarations();
		}
	};
	sortAction.setImageDescriptor(ImageUtils.getSortImage());
}
 
开发者ID:sebez,项目名称:vertigo-chroma-kspplugin,代码行数:14,代码来源:KspOutlinePage.java

示例15: createControl

import org.eclipse.jface.action.Action; //导入方法依赖的package包/类
@Override
public void createControl(Composite parent) {
	super.createControl(parent);
	this.getTreeViewer().setLabelProvider(new PropertiesOutlineLabelProvider());
	this.getTreeViewer().setContentProvider(new PropsOutlineProvider());
	this.getTreeViewer().setInput(inputPropertyFile);

	IToolBarManager toolbar = getSite().getActionBars().getToolBarManager();
	Action action = new SortAction("Sort", 2);
	action.setText(action.getText());
	action.setImageDescriptor(getDescriptor());
	toolbar.add(action);
}
 
开发者ID:bsteker,项目名称:bdf2,代码行数:14,代码来源:PropertiesOutlinePage.java


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