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


Java JFaceResources.getImageRegistry方法代码示例

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


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

示例1: registerIconForFamily

import org.eclipse.jface.resource.JFaceResources; //导入方法依赖的package包/类
@Override
public void registerIconForFamily(ImageDescriptor icon, Object family) {
	String key = IMAGE_KEY + String.valueOf(imageKeyTable.size());
	imageKeyTable.put(family, key);
	ImageRegistry registry = JFaceResources.getImageRegistry();

	// Avoid registering twice
	if (registry.getDescriptor(key) == null) {
		registry.put(key, icon);
	}
}
 
开发者ID:termsuite,项目名称:termsuite-ui,代码行数:12,代码来源:ProgressServiceImpl.java

示例2: getImage

import org.eclipse.jface.resource.JFaceResources; //导入方法依赖的package包/类
/**
 * Returns an image stored in the classpath at the specified path
 * 
 * @param clazz Class The class relative to which to find the image
 * @param path String The path to the image file
 * @return Image The image stored in the file at the specified path
 */
public static Image getImage(Class<?> clazz, String path) {
	String key = clazz.getName() + '|' + path;
	final ImageRegistry imageRegistry = JFaceResources.getImageRegistry();
	Image image = imageRegistry.get(key);
	if (image == null) {
		imageRegistry.put(key, ImageDescriptor.createFromFile(clazz, path));
		image = imageRegistry.get(key);
	}
	return image;
}
 
开发者ID:nresare,项目名称:javapasswordsafe,代码行数:18,代码来源:IOUtils.java

示例3: registerImageDescriptor

import org.eclipse.jface.resource.JFaceResources; //导入方法依赖的package包/类
private static void registerImageDescriptor(String key, ImageDescriptor descriptor) {
	ImageRegistry imageRegistry = JFaceResources.getImageRegistry();
	imageRegistry.put(key, descriptor);
}
 
开发者ID:angelozerr,项目名称:typescript.java,代码行数:5,代码来源:TypeScriptImagesRegistry.java

示例4: getImage

import org.eclipse.jface.resource.JFaceResources; //导入方法依赖的package包/类
/**
 * Returns the image from the image registry with the given key.
 * 
 * @param key
 *            of the image
 * @return the image from the image registry with the given key.
 */
public static Image getImage(String key) {
	ImageRegistry imageRegistry = JFaceResources.getImageRegistry();
	return imageRegistry.get(key);
}
 
开发者ID:angelozerr,项目名称:typescript.java,代码行数:12,代码来源:TypeScriptImagesRegistry.java

示例5: getImageDescriptor

import org.eclipse.jface.resource.JFaceResources; //导入方法依赖的package包/类
/**
 * Returns the image descriptor from the image registry with the given key.
 * 
 * @param key
 *            of the image
 * @return the image descriptor from the image registry with the given key.
 */
public static ImageDescriptor getImageDescriptor(String key) {
	ImageRegistry imageRegistry = JFaceResources.getImageRegistry();
	return imageRegistry.getDescriptor(key);
}
 
开发者ID:angelozerr,项目名称:typescript.java,代码行数:12,代码来源:TypeScriptImagesRegistry.java


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