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


Java AbstractUIPlugin.getImageRegistry方法代碼示例

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


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

示例1: getImage

import org.eclipse.ui.plugin.AbstractUIPlugin; //導入方法依賴的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

示例2: registImageFile

import org.eclipse.ui.plugin.AbstractUIPlugin; //導入方法依賴的package包/類
public static ImageDescriptor registImageFile(AbstractUIPlugin plugin, File file) throws IOException{
    ImageRegistry registry = plugin.getImageRegistry();
    String rootpath = LocationUtil.getAbsoluteFile(plugin, "").getAbsolutePath();
    if (!file.getAbsolutePath().startsWith(rootpath)) return null;
    String rpath = file.getAbsolutePath().substring(rootpath.length() + 1).replaceAll("\\\\", "/");
    ImageDescriptor descriptor = ImageDescriptor.createFromURL(LocationUtil.getURL(plugin, rpath));
    registry.put(rpath, descriptor);
    return descriptor;
}
 
開發者ID:scouter-project,項目名稱:scouter,代碼行數:10,代碼來源:ImageRegistryUtil.java

示例3: getImage

import org.eclipse.ui.plugin.AbstractUIPlugin; //導入方法依賴的package包/類
public static Image getImage(AbstractUIPlugin plugin, String id){
    ImageRegistry imageRegistry = plugin.getImageRegistry();
    Image image = imageRegistry.get(id);
    if (image == null) {
        try {
            registImage(plugin, id);
            image = imageRegistry.get(id);
        } catch (FileNotFoundException e) {
            image = ImageUtil.UNKNOWN;
        }
    }
    return image;
}
 
開發者ID:scouter-project,項目名稱:scouter,代碼行數:14,代碼來源:ImageRegistryUtil.java

示例4: registImage

import org.eclipse.ui.plugin.AbstractUIPlugin; //導入方法依賴的package包/類
public static ImageDescriptor registImage(AbstractUIPlugin plugin, String path) throws FileNotFoundException{
    ImageRegistry registry = plugin.getImageRegistry();
    ImageDescriptor descriptor = ImageDescriptor.createFromURL(LocationUtil.getURL(plugin, path));
    registry.put(path, descriptor);
    return descriptor;
}
 
開發者ID:scouter-project,項目名稱:scouter,代碼行數:7,代碼來源:ImageRegistryUtil.java

示例5: registImageDescriptor

import org.eclipse.ui.plugin.AbstractUIPlugin; //導入方法依賴的package包/類
public static ImageDescriptor registImageDescriptor(AbstractUIPlugin plugin, String id, ImageDescriptor descriptor){
    ImageRegistry registry = plugin.getImageRegistry();
    registry.put(id, descriptor);
    return descriptor;
}
 
開發者ID:scouter-project,項目名稱:scouter,代碼行數:6,代碼來源:ImageRegistryUtil.java


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