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


Java ImageRegistry.put方法代碼示例

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


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

示例1: initializeImageRegistry

import org.eclipse.jface.resource.ImageRegistry; //導入方法依賴的package包/類
@Override
protected void initializeImageRegistry(ImageRegistry reg) {
	reg.put(ICON_TEST, imageDescriptor(ICON_TEST));
	reg.put(ICON_TEST_SKIPPED, imageDescriptor(ICON_TEST_SKIPPED));
	reg.put(ICON_TEST_PASSED, imageDescriptor(ICON_TEST_PASSED));
	reg.put(ICON_TEST_SKIPPED_NOT_IMPLEMENTED_YET, imageDescriptor(ICON_TEST_SKIPPED_NOT_IMPLEMENTED_YET));
	reg.put(ICON_TEST_FAILED, imageDescriptor(ICON_TEST_FAILED));
	reg.put(ICON_TEST_ERROR, imageDescriptor(ICON_TEST_ERROR));
	reg.put(ICON_TEST_RUNNING, imageDescriptor(ICON_TEST_RUNNING));
	reg.put(ICON_SUITE, imageDescriptor(ICON_SUITE));
	reg.put(ICON_SUITE_SKIPPED, imageDescriptor(ICON_SUITE_SKIPPED));
	reg.put(ICON_SUITE_PASSED, imageDescriptor(ICON_SUITE_PASSED));
	reg.put(ICON_SUITE_FAILED, imageDescriptor(ICON_SUITE_FAILED));
	reg.put(ICON_SUITE_ERROR, imageDescriptor(ICON_SUITE_ERROR));
	reg.put(ICON_SUITE_RUNNING, imageDescriptor(ICON_SUITE_RUNNING));
	reg.put(ICON_SUITE, imageDescriptor(ICON_SUITE));
	reg.put(ICON_LOCK, imageDescriptor(ICON_LOCK));
	reg.put(ICON_RELAUNCH, imageDescriptor(ICON_RELAUNCH));
	reg.put(ICON_RELAUNCH_FAILED, imageDescriptor(ICON_RELAUNCH_FAILED));
	reg.put(ICON_STOP, imageDescriptor(ICON_STOP));
	reg.put(ICON_HISTORY, imageDescriptor(ICON_HISTORY));
}
 
開發者ID:eclipse,項目名稱:n4js,代碼行數:23,代碼來源:TesterUiActivator.java

示例2: getImage

import org.eclipse.jface.resource.ImageRegistry; //導入方法依賴的package包/類
/**
 * Get image by path from image registry. If not already registered a new
 * image will be created and registered. If not createable a fallback image
 * is used instead
 * 
 * @param path
 * @param pluginId
 *            - plugin id to identify which plugin image should be loaded
 * @return image
 */
public static Image getImage(String path, String pluginId) {
	ImageRegistry imageRegistry = getImageRegistry();
	if (imageRegistry == null) {
		return null;
	}
	Image image = imageRegistry.get(path);
	if (image == null) {
		ImageDescriptor imageDesc = createImageDescriptor(path, pluginId);
		image = imageDesc.createImage();
		if (image == null) {
			image = PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_OBJS_ERROR_TSK);
		}
		imageRegistry.put(path, image);
	}
	return image;
}
 
開發者ID:de-jcup,項目名稱:eclipse-batch-editor,代碼行數:27,代碼來源:EclipseUtil.java

示例3: initializeImageRegistry

import org.eclipse.jface.resource.ImageRegistry; //導入方法依賴的package包/類
@Override
protected void initializeImageRegistry(ImageRegistry imageRegistry) {
    super.initializeImageRegistry(imageRegistry);

    imageRegistry.put(IMAGE_KEY_ACTION_DELETE, getImageDescriptor(IMAGE_PATH_ACTION_DELETE));
    imageRegistry.put(IMAGE_KEY_ACTION_REFRESH, getImageDescriptor(IMAGE_PATH_ACTION_REFRESH));
    imageRegistry.put(IMAGE_KEY_ACTION_TABLE_EDIT, getImageDescriptor(IMAGE_PATH_ACTION_TABLE_EDIT));

    imageRegistry.put(IMAGE_KEY_OBJECT_EDIT, getImageDescriptor(IMAGE_PATH_OBJECT_EDIT));
    imageRegistry.put(IMAGE_KEY_OBJECT_HOME, getImageDescriptor(IMAGE_PATH_OBJECT_HOME));
    imageRegistry.put(IMAGE_KEY_OBJECT_INFORMATION, getImageDescriptor(IMAGE_PATH_OBJECT_INFORMATION));
    imageRegistry.put(IMAGE_KEY_OBJECT_MAIN_TAB, getImageDescriptor(IMAGE_PATH_OBJECT_MAIN_TAB));
    imageRegistry.put(IMAGE_KEY_OBJECT_PROPERTIES, getImageDescriptor(IMAGE_PATH_OBJECT_PROPERTIES));
    imageRegistry.put(IMAGE_KEY_OBJECT_SERVER, getImageDescriptor(IMAGE_PATH_OBJECT_SERVER));
    imageRegistry.put(IMAGE_KEY_OBJECT_SERVER_ADMIN, getImageDescriptor(IMAGE_PATH_OBJECT_SERVER_ADMIN));
    imageRegistry.put(IMAGE_KEY_OBJECT_SERVER_LARGE, getImageDescriptor(IMAGE_PATH_OBJECT_SERVER_LARGE));
    imageRegistry.put(IMAGE_KEY_OBJECT_SERVERS, getImageDescriptor(IMAGE_PATH_OBJECT_SERVERS));
    imageRegistry.put(IMAGE_KEY_OBJECT_SERVERS_LARGE, getImageDescriptor(IMAGE_PATH_OBJECT_SERVERS_LARGE));

    imageRegistry.put(IMAGE_KEY_WIZARD_BANNER_ADD_SERVER, getImageDescriptor(IMAGE_PATH_WIZARD_BANNER_ADD_SERVER));
}
 
開發者ID:baloise,項目名稱:eZooKeeper,代碼行數:22,代碼來源:EclipseCoreActivator.java

示例4: createImageRegistry

import org.eclipse.jface.resource.ImageRegistry; //導入方法依賴的package包/類
@Override
protected ImageRegistry createImageRegistry() {
  String[] images = new String[] {Images.IMAGE_BLACK_ID, "/icons/Black.gif", Images.IMAGE_RED_ID,
      "/icons/Red.gif", Images.IMAGE_MENU_ID, "/icons/Menu.gif", Images.IMAGE_LINK_ID,
      "/icons/Link.gif", Images.IMAGE_DELETE_ID, "/icons/Delete.gif", Images.IMAGE_ANNOTATION_ID,
      "/icons/Annotation.gif", Images.IMAGE_SIG_ID, "/icons/sig.png", Images.IMAGE_RELATION_ID,
      "/icons/relation.png", Images.IMAGE_MODELWRITER_ID, "/icons/modelwriter.gif"};
  ImageRegistry imageRegistry = super.createImageRegistry();
  Iterator<String> i = Arrays.asList(images).iterator();
  while (i.hasNext()) {
    String id = i.next();
    String imagePath = i.next();
    imageRegistry.put(id, ImageDescriptor.createFromFile(getClass(), imagePath));
  }
  return imageRegistry;
}
 
開發者ID:ModelWriter,項目名稱:Tarski,代碼行數:17,代碼來源:MarkerActivator.java

示例5: getImage

import org.eclipse.jface.resource.ImageRegistry; //導入方法依賴的package包/類
/**
 * Get image by path from image registry. If not already registered a new
 * image will be created and registered. If not createable a fallback image
 * is used instead
 * 
 * @param path
 * @param pluginId
 *            - plugin id to identify which plugin image should be loaded
 * @return image
 */
public static Image getImage(String path, String pluginId) {
	ImageRegistry imageRegistry = getImageRegistry();
	if (imageRegistry == null) {
		logWarning("No image registry found!");
		return null;
	}
	Image image = imageRegistry.get(path);
	if (image == null) {
		ImageDescriptor imageDesc = createImageDescriptor(path, pluginId);
		image = imageDesc.createImage();
		if (image == null) {
			image = PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_OBJS_ERROR_TSK);
		}
		imageRegistry.put(path, image);
	}
	return image;
}
 
開發者ID:de-jcup,項目名稱:egradle,代碼行數:28,代碼來源:EclipseUtil.java

示例6: initializeImageRegistry

import org.eclipse.jface.resource.ImageRegistry; //導入方法依賴的package包/類
protected void initializeImageRegistry(ImageRegistry reg) {
	super.initializeImageRegistry(reg);
	reg.put(ISVNUIConstants.IMG_PROPERTIES, getImageDescriptor(ISVNUIConstants.IMG_PROPERTIES));
	reg.put(ISVNUIConstants.IMG_FILEADD_PENDING, getImageDescriptor(ISVNUIConstants.IMG_FILEADD_PENDING));
	reg.put(ISVNUIConstants.IMG_SYNCPANE, getImageDescriptor(ISVNUIConstants.IMG_SYNCPANE));
	reg.put(ISVNUIConstants.IMG_FILEDELETE_PENDING, getImageDescriptor(ISVNUIConstants.IMG_FILEDELETE_PENDING));
	reg.put(ISVNUIConstants.IMG_FILEMODIFIED_PENDING, getImageDescriptor(ISVNUIConstants.IMG_FILEMODIFIED_PENDING));
	reg.put(ISVNUIConstants.IMG_FOLDERADD_PENDING, getImageDescriptor(ISVNUIConstants.IMG_FOLDERADD_PENDING));
	reg.put(ISVNUIConstants.IMG_FOLDERDELETE_PENDING, getImageDescriptor(ISVNUIConstants.IMG_FOLDERDELETE_PENDING));
	reg.put(ISVNUIConstants.IMG_FOLDERMODIFIED_PENDING, getImageDescriptor(ISVNUIConstants.IMG_FOLDERMODIFIED_PENDING));
	reg.put(ISVNUIConstants.IMG_FOLDER, getImageDescriptor(ISVNUIConstants.IMG_FOLDER));
	reg.put(ISVNUIConstants.IMG_AFFECTED_PATHS_COMPRESSED_MODE, getImageDescriptor(ISVNUIConstants.IMG_AFFECTED_PATHS_COMPRESSED_MODE));
	reg.put(ISVNUIConstants.IMG_AFFECTED_PATHS_FLAT_MODE, getImageDescriptor(ISVNUIConstants.IMG_AFFECTED_PATHS_FLAT_MODE));
	reg.put(ISVNUIConstants.IMG_AFFECTED_PATHS_TREE_MODE, getImageDescriptor(ISVNUIConstants.IMG_AFFECTED_PATHS_TREE_MODE));
	reg.put(ISVNUIConstants.IMG_UPDATE_ALL, getImageDescriptor(ISVNUIConstants.IMG_UPDATE_ALL));
	reg.put(ISVNUIConstants.IMG_COMMIT_ALL, getImageDescriptor(ISVNUIConstants.IMG_COMMIT_ALL));
	reg.put(ISVNUIConstants.IMG_PROPERTY_CONFLICTED, getImageDescriptor(ISVNUIConstants.IMG_PROPERTY_CONFLICTED));
}
 
開發者ID:subclipse,項目名稱:subclipse,代碼行數:19,代碼來源:SVNUIPlugin.java

示例7: getImage

import org.eclipse.jface.resource.ImageRegistry; //導入方法依賴的package包/類
public static Image getImage(String path)
{
	ImageRegistry registry = plugin.getImageRegistry();
	Image image = registry.get(path);
	if (image == null)
	{
		ImageDescriptor id = getImageDescriptor(path);
		if (id == null)
		{
			return null;
		}
		registry.put(path, id);
		image = registry.get(path);
	}
	return image;
}
 
開發者ID:apicloudcom,項目名稱:APICloud-Studio,代碼行數:17,代碼來源:XMLPlugin.java

示例8: getImage

import org.eclipse.jface.resource.ImageRegistry; //導入方法依賴的package包/類
/**
 * Returns the image on the specified path.
 * 
 * @param path
 *            the path to the image
 * @return Image the image object
 */
public static Image getImage(String path)
{
	ImageRegistry registry = getDefault().getImageRegistry();

	if (registry.get(path) == null)
	{
		ImageDescriptor id = getImageDescriptor(path);

		if (id != null)
		{
			registry.put(path, id);
		}
	}

	return registry.get(path);
}
 
開發者ID:apicloudcom,項目名稱:APICloud-Studio,代碼行數:24,代碼來源:ScriptingUIPlugin.java

示例9: getImage

import org.eclipse.jface.resource.ImageRegistry; //導入方法依賴的package包/類
/**
 * getImage
 * 
 * @param path
 * @return
 */
public static Image getImage(String path)
{
	ImageRegistry registry = plugin.getImageRegistry();
	Image image = registry.get(path);

	if (image == null)
	{
		ImageDescriptor id = getImageDescriptor(path);

		if (id == null)
		{
			return null;
		}

		registry.put(path, id);
		image = registry.get(path);
	}

	return image;
}
 
開發者ID:apicloudcom,項目名稱:APICloud-Studio,代碼行數:27,代碼來源:CSSPlugin.java

示例10: getImage

import org.eclipse.jface.resource.ImageRegistry; //導入方法依賴的package包/類
/**
 * getImage
 * 
 * @param path
 * @return
 */
public static Image getImage(String path)
{
	ImageRegistry registry = PLUGIN.getImageRegistry();
	Image image = registry.get(path);
	if (image == null)
	{
		ImageDescriptor id = getImageDescriptor(path);
		if (id == null)
		{
			return null;
		}
		registry.put(path, id);
		image = registry.get(path);
	}
	return image;
}
 
開發者ID:apicloudcom,項目名稱:APICloud-Studio,代碼行數:23,代碼來源:JSPlugin.java

示例11: initImageRegistry

import org.eclipse.jface.resource.ImageRegistry; //導入方法依賴的package包/類
private void initImageRegistry() {

		final TourbookPlugin activator = TourbookPlugin.getDefault();
		final ImageRegistry imageRegistry = activator.getImageRegistry();

		if (imageRegistry.get(Messages.Image_POI_Anchor) == null) {

			imageRegistry.put(IMG_KEY_ANCHOR, TourbookPlugin.getImageDescriptor(Messages.Image_POI_Anchor));
			imageRegistry.put(IMG_KEY_CAR, TourbookPlugin.getImageDescriptor(Messages.Image_POI_Car));
			imageRegistry.put(IMG_KEY_CART, TourbookPlugin.getImageDescriptor(Messages.Image_POI_Cart));
			imageRegistry.put(IMG_KEY_FLAG, TourbookPlugin.getImageDescriptor(Messages.Image_POI_Flag));
			imageRegistry.put(IMG_KEY_HOUSE, TourbookPlugin.getImageDescriptor(Messages.Image_POI_House));
			imageRegistry.put(IMG_KEY_SOCCER, TourbookPlugin.getImageDescriptor(Messages.Image_POI_Soccer));
			imageRegistry.put(IMG_KEY_STAR, TourbookPlugin.getImageDescriptor(Messages.Image_POI_Star));
		}
	}
 
開發者ID:wolfgang-ch,項目名稱:mytourbook,代碼行數:17,代碼來源:PoiView.java

示例12: getImage

import org.eclipse.jface.resource.ImageRegistry; //導入方法依賴的package包/類
public static Image getImage(AbstractUIPlugin plugin, String path)
{
	ImageRegistry registry = plugin.getImageRegistry();
	Image image = registry.get(path);
	if (image == null)
	{
		ImageDescriptor id = getImageDescriptor(plugin.getBundle().getSymbolicName(), path);
		if (id == null)
		{
			return null;
		}
		registry.put(path, id);
		image = registry.get(path);
	}
	return image;
}
 
開發者ID:apicloudcom,項目名稱:APICloud-Studio,代碼行數:17,代碼來源:UIUtils.java

示例13: initializeImageRegistry

import org.eclipse.jface.resource.ImageRegistry; //導入方法依賴的package包/類
@Override
protected void initializeImageRegistry(ImageRegistry reg) {
    super.initializeImageRegistry(reg);
    reg.put(BEAN_WIZ_ICON, createImageDescriptor(BEAN_WIZ_ICON).createImage());

    reg.put(DEPEN_ICON, createImageDescriptor(DEPEN_ICON).createImage());
    reg.put(BUNDLE_CP_ICON, createImageDescriptor(BUNDLE_CP_ICON).createImage());
    reg.put(REQUIRE_BD_ICON, createImageDescriptor(REQUIRE_BD_ICON).createImage());
    reg.put(IMPORT_PKG_ICON, createImageDescriptor(IMPORT_PKG_ICON).createImage());
    reg.put(REFRESH_ICON, createImageDescriptor(REFRESH_ICON).createImage());
    reg.put(GRAY_REM_ICON, createImageDescriptor(GRAY_REM_ICON).createImage());
    reg.put(HIGHLIGHT_REM_ICON, createImageDescriptor(HIGHLIGHT_REM_ICON).createImage());
    reg.put(OPTIONAL_OVERLAY_ICON, createImageDescriptor(OPTIONAL_OVERLAY_ICON).createImage());
    reg.put(IMPORT_PACKAGE_OVERLAY_ICON, getOptionalOverlayIcon(getImage(IMPORT_PKG_ICON)));
    reg.put(REQUIRE_BUNDLE_OVERLAY_ICON, getOptionalOverlayIcon(getImage(REQUIRE_BD_ICON)));
}
 
開發者ID:Talend,項目名稱:tesb-studio-se,代碼行數:17,代碼來源:CamelDesignerPlugin.java

示例14: registerImage

import org.eclipse.jface.resource.ImageRegistry; //導入方法依賴的package包/類
/**
 * Register an image with the registry.
 * 
 * @param key
 *            java.lang.String
 * @param partialURL
 *            java.lang.String
 */
private void registerImage(ImageRegistry registry, String key, String partialURL)
{
    if (__ICON_BASE_URL == null)
    {
        String pathSuffix = "icons/";
        __ICON_BASE_URL = getDefault().getBundle().getEntry(pathSuffix);
    }

    try
    {
        ImageDescriptor id = ImageDescriptor.createFromURL(new URL(__ICON_BASE_URL,partialURL));
        registry.put(key,id);
        _imageDescriptors.put(key,id);
    }
    catch (Exception e)
    {
        Trace.trace(Trace.WARNING,"Error registering image",e);
    }
}
 
開發者ID:bengalaviz,項目名稱:JettyWTPPlugin,代碼行數:28,代碼來源:JettyUIPlugin.java

示例15: getImage

import org.eclipse.jface.resource.ImageRegistry; //導入方法依賴的package包/類
/**
 * @generated
 */
private Image getImage(String key, IElementType elementType) {
	ImageRegistry imageRegistry = SmcDiagramEditorPlugin.getInstance()
			.getImageRegistry();
	Image image = imageRegistry.get(key);
	if (image == null && elementType != null
			&& SmcElementTypes.isKnownElementType(elementType)) {
		image = SmcElementTypes.getImage(elementType);
		imageRegistry.put(key, image);
	}

	if (image == null) {
		image = imageRegistry.get("Navigator?ImageNotFound"); //$NON-NLS-1$
		imageRegistry.put(key, image);
	}
	return image;
}
 
開發者ID:road-framework,項目名稱:ROADDesigner,代碼行數:20,代碼來源:SmcNavigatorLabelProvider.java


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