當前位置: 首頁>>代碼示例>>Java>>正文


Java ISharedImages.getImageDescriptor方法代碼示例

本文整理匯總了Java中org.eclipse.ui.ISharedImages.getImageDescriptor方法的典型用法代碼示例。如果您正苦於以下問題:Java ISharedImages.getImageDescriptor方法的具體用法?Java ISharedImages.getImageDescriptor怎麽用?Java ISharedImages.getImageDescriptor使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.eclipse.ui.ISharedImages的用法示例。


在下文中一共展示了ISharedImages.getImageDescriptor方法的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: getItem

import org.eclipse.ui.ISharedImages; //導入方法依賴的package包/類
private IContributionItem getItem(String actionId, String commandId,
		String image, String disabledImage, String label, String tooltip,
		String helpContextId) {
	ISharedImages sharedImages = getWindow().getWorkbench()
			.getSharedImages();

	IActionCommandMappingService acms = (IActionCommandMappingService) getWindow()
			.getService(IActionCommandMappingService.class);
	acms.map(actionId, commandId);

	CommandContributionItemParameter commandParm = new CommandContributionItemParameter(
			getWindow(), actionId, commandId, null,
			sharedImages.getImageDescriptor(image),
			sharedImages.getImageDescriptor(disabledImage), null, label,
			null, tooltip, CommandContributionItem.STYLE_PUSH, null, false);
	return new CommandContributionItem(commandParm);
}
 
開發者ID:OpenSoftwareSolutions,項目名稱:PDFReporter-Studio,代碼行數:18,代碼來源:ApplicationActionBarAdvisor.java

示例2: getItem

import org.eclipse.ui.ISharedImages; //導入方法依賴的package包/類
private IContributionItem getItem(String actionId, String commandId,
    String image, String disabledImage, String label, String tooltip,
    String helpContextId)
{
  ISharedImages sharedImages = getWindow().getWorkbench().getSharedImages();

  IActionCommandMappingService acms =
      (IActionCommandMappingService) getWindow().getService(
          IActionCommandMappingService.class);
  acms.map(actionId, commandId);

  CommandContributionItemParameter commandParm =
      new CommandContributionItemParameter(getWindow(), actionId, commandId,
          null, sharedImages.getImageDescriptor(image),
          sharedImages.getImageDescriptor(disabledImage), null, label, null,
          tooltip, CommandContributionItem.STYLE_PUSH, null, false);
  return new CommandContributionItem(commandParm);
}
 
開發者ID:debrief,項目名稱:limpet,代碼行數:19,代碼來源:ApplicationActionBarAdvisor.java

示例3: prepareExportMenu

import org.eclipse.ui.ISharedImages; //導入方法依賴的package包/類
protected MenuManager prepareExportMenu(ISharedImages sharedImages) {
    final MenuManager exportMenu =
            new MenuManager(DisplayMessages.getMessage("action.title.export"), sharedImages.getImageDescriptor("IMG_ETOOL_EXPORT_WIZ"),
                    "Export");

    exportMenu.add(getAction(ExportToDDLAction.ID));
    exportMenu.add(getAction(ExportToImageAction.ID));

    // #deleted
    //exportMenu.add(this.getAction(ExportToExcelAction.ID));
    //exportMenu.add(this.getAction(ExportToHtmlAction.ID));
    //exportMenu.add(this.getAction(ExportToDictionaryAction.ID));
    //exportMenu.add(this.getAction(ExportToTranslationDictionaryAction.ID));
    //exportMenu.add(this.getAction(ExportToTestDataAction.ID));
    //exportMenu.add(this.getAction(ExportToJavaAction.ID));

    exportMenu.add(new GroupMarker("export"));

    return exportMenu;
}
 
開發者ID:dbflute-session,項目名稱:erflute,代碼行數:21,代碼來源:ERVirtualDiagramPopupMenuManager.java

示例4: ErrorImageComposite

import org.eclipse.ui.ISharedImages; //導入方法依賴的package包/類
/**
 * Creates a new {@link ErrorImageComposite}
 *
 * @param baseImage the base image to overlay an icon on top of
 * @param warning if true, add a warning icon, otherwise an error icon
 */
public ErrorImageComposite(Image baseImage, boolean warning) {
    mBaseImage = baseImage;
    ISharedImages sharedImages = PlatformUI.getWorkbench().getSharedImages();
    mErrorImageDescriptor = sharedImages.getImageDescriptor(
            warning ? IMG_DEC_FIELD_WARNING : IMG_DEC_FIELD_ERROR);
    if (mErrorImageDescriptor == null) {
        mErrorImageDescriptor = sharedImages.getImageDescriptor(
                warning ? IMG_OBJS_WARN_TSK : IMG_OBJS_ERROR_TSK);
    }
    mSize = new Point(baseImage.getBounds().width, baseImage.getBounds().height);
}
 
開發者ID:thahn0720,項目名稱:agui_eclipse_plugin,代碼行數:18,代碼來源:ErrorImageComposite.java

示例5: updateFwdBackButtons

import org.eclipse.ui.ISharedImages; //導入方法依賴的package包/類
/**
 * updateFwdBackButtons() will grey-out or make visible the step forward/backward buttons based
 * on the current frame + entry context.
 * @param stackBrowserView the view object (for context)
 */
private void updateFwdBackButtons(StackBrowserView stackBrowserView){
	// Eclipse's shared images
	ISharedImages images = PlatformUI.getWorkbench().getSharedImages();
	
	// determine which of the fwd/bwd buttons should be enabled
	ImageDescriptor fwd;
	boolean fwdEnabled;
	ImageDescriptor bwd;
	boolean bwdEnabled;
	final FrameModel frame = stackBrowserView.currentFrame;
	if(!localAction.isChecked() || frame == null || stackBrowserView.currentPathEntry < 1){
		fwd = images.getImageDescriptor(ISharedImages.IMG_TOOL_FORWARD_DISABLED);
		fwdEnabled = false;
	}
	else{
		fwd = images.getImageDescriptor(ISharedImages.IMG_TOOL_FORWARD);
		fwdEnabled = true;
	}
	if(!localAction.isChecked() || frame == null || !frame.hasChildren() ||
			stackBrowserView.currentPathEntry > frame.getChildren().length-2){
		bwd = images.getImageDescriptor(ISharedImages.IMG_TOOL_BACK_DISABLED);
		bwdEnabled = false;
	}
	else{
		bwd = images.getImageDescriptor(ISharedImages.IMG_TOOL_BACK);
		bwdEnabled = true;
	}
	
	forwardAction.setImageDescriptor(fwd);
	forwardAction.setEnabled(fwdEnabled);
	backwardAction.setImageDescriptor(bwd);
	backwardAction.setEnabled(bwdEnabled);
}
 
開發者ID:pohmann,項目名稱:CSIclipse,代碼行數:39,代碼來源:StackBrowserView.java

示例6: getDebugTargetWarningImage

import org.eclipse.ui.ISharedImages; //導入方法依賴的package包/類
private Image getDebugTargetWarningImage(BfDebugTarget debugTarget) {
	ISharedImages sharedImages = PlatformUI.getWorkbench().getSharedImages();
	ImageDescriptor warningOverlay = sharedImages.getImageDescriptor(ISharedImages.IMG_DEC_FIELD_WARNING);
	ImageDescriptor targetDescriptor = DebugUITools.getDefaultImageDescriptor(debugTarget);
	if (this.overlayedImages.containsKey(targetDescriptor)) {
		return this.overlayedImages.get(targetDescriptor);
	}
	Image targetImage = targetDescriptor.createImage();
	this.disposeImages.add(targetImage);
	ImageDescriptor all = new DecorationOverlayIcon(targetImage, warningOverlay, IDecoration.TOP_LEFT);
	Image overlayedImage = all.createImage();
	this.disposeImages.add(overlayedImage);
	this.overlayedImages.put(targetDescriptor, overlayedImage);
	return overlayedImage;
}
 
開發者ID:RichardBirenheide,項目名稱:brainfuck,代碼行數:16,代碼來源:BfDebugModelPresentation.java

示例7: prepareImportMenu

import org.eclipse.ui.ISharedImages; //導入方法依賴的package包/類
private MenuManager prepareImportMenu(final ISharedImages sharedImages) {
    final MenuManager importMenu = new MenuManager("Import", sharedImages.getImageDescriptor("IMG_ETOOL_IMPORT_WIZ"), "Import");
    importMenu.add(getAction(ImportFromDBAction.ID));

    // #deleted only from DB
    //importMenu.add(getAction(ImportFromFileAction.ID));
    return importMenu;
}
 
開發者ID:dbflute-session,項目名稱:erflute,代碼行數:9,代碼來源:ERVirtualDiagramPopupMenuManager.java

示例8: prepareImportMenu

import org.eclipse.ui.ISharedImages; //導入方法依賴的package包/類
private MenuManager prepareImportMenu(final ISharedImages sharedImages) {
    final String message = "Import";
    final MenuManager importMenu = new MenuManager(message, sharedImages.getImageDescriptor("IMG_ETOOL_IMPORT_WIZ"), "Import");
    importMenu.add(getAction(ImportFromDBAction.ID));
    importMenu.add(getAction(ImportFromFileAction.ID));
    return importMenu;
}
 
開發者ID:dbflute-session,項目名稱:erflute,代碼行數:8,代碼來源:ERDiagramPopupMenuManager.java

示例9: prepareExportMenu

import org.eclipse.ui.ISharedImages; //導入方法依賴的package包/類
private MenuManager prepareExportMenu(final ISharedImages sharedImages) {
    final String message = "Export";
    final MenuManager exportMenu = new MenuManager(message, sharedImages.getImageDescriptor("IMG_ETOOL_EXPORT_WIZ"), "Export");
    exportMenu.add(getAction(ExportToDDLAction.ID));
    exportMenu.add(getAction(ExportToImageAction.ID));
    exportMenu.add(new GroupMarker("export"));
    return exportMenu;
}
 
開發者ID:dbflute-session,項目名稱:erflute,代碼行數:9,代碼來源:ERDiagramPopupMenuManager.java


注:本文中的org.eclipse.ui.ISharedImages.getImageDescriptor方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。