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


Java ImageRegistry類代碼示例

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


ImageRegistry類屬於org.eclipse.jface.resource包,在下文中一共展示了ImageRegistry類的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: initialize

import org.eclipse.jface.resource.ImageRegistry; //導入依賴的package包/類
private static final void initialize() {
	PLUGIN_REGISTRY = new ImageRegistry();
	manage(OBJ_DESC_SERVICE_LOADED, DESC_SERVICE_LOADED_OBJ);
	manage(OBJ_DESC_SERVICE_NOT_LOADED, DESC_SERVICE_NOT_LOADED_OBJ);
	manage(OBJ_DESC_LANGUAGE, DESC_LANGUAGE_OBJ);
	manage(OBJ_CORRECTION_CHANGE, DESC_CORRECTION_CHANGE);
	manage(OBJ_FIXABLE_ERROR, DESC_FIXABLE_ERROR);
	manage(OBJ_FIXABLE_WARNING, DESC_FIXABLE_WARNING);
	manage(OBJ_FIXABLE_INFO, DESC_FIXABLE_INFO);
	
	//cp
	manage(OBJ_DESC_ERROR, DESC_ERROR);
	manage(OBJ_DESC_EXCLAMATION, DESC_EXCLAMATION);
	manage(OBJ_DESC_INFORMATION, DESC_INFORMATION);
	
	initializeImageMaps();
}
 
開發者ID:cplutte,項目名稱:bts,代碼行數:18,代碼來源:XtextPluginImages.java

示例8: getImage

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

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

示例9: XYGraphMediaFactory

import org.eclipse.jface.resource.ImageRegistry; //導入依賴的package包/類
/**
 * Private constructor to avoid instantiation.
 */
private XYGraphMediaFactory() {
	_colorRegistry = new ColorRegistry();
	_imageRegistry = new ImageRegistry();
	_fontRegistry = new FontRegistry();

	_imageCache = new HashMap<ImageDescriptor, Image>();

	// dispose all images from the image cache, when the display is disposed
	Display.getDefault().addListener(SWT.Dispose, new Listener() {
		public void handleEvent(final Event event) {
			for (Image img : _imageCache.values()) {
				img.dispose();
			}
			disposeResources();
		}
	});

}
 
開發者ID:scouter-project,項目名稱:scouter,代碼行數:22,代碼來源:XYGraphMediaFactory.java

示例10: getImageFromRegistry

import org.eclipse.jface.resource.ImageRegistry; //導入依賴的package包/類
public static Image getImageFromRegistry(final ImageDescriptor name)
{
  Image res = null;

  // do we already have an image
  if (getRegistry() == null)
  {
    plugin._imageRegistry = new ImageRegistry();
  }

  // ok - do we have it already?
  res = getRegistry().get(name.toString());

  if (res == null)
  {
    getRegistry().put(name.toString(), name);
    res = getRegistry().get(name.toString());
  }

  // and return it..
  return res;
}
 
開發者ID:debrief,項目名稱:limpet,代碼行數:23,代碼來源:Activator.java

示例11: getImageFromRegistry

import org.eclipse.jface.resource.ImageRegistry; //導入依賴的package包/類
public static Image getImageFromRegistry(final ImageDescriptor name)
{
	Image res = null;

	// do we already have an image
	if (getRegistry() == null)
	{
		plugin._imageRegistry = new ImageRegistry();
	}

	// ok - do we have it already?
	res = getRegistry().get(name.toString());

	if (res == null)
	{
		getRegistry().put(name.toString(), name);
		res = getRegistry().get(name.toString());
	}

	// and return it..
	return res;
}
 
開發者ID:debrief,項目名稱:limpet,代碼行數:23,代碼來源:Activator.java

示例12: 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

示例13: 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)
		{
			registry.put(path, id);
			image = registry.get(path);
		}
	}

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

示例14: 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

示例15: 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


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