當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。