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


Java ISharedImages.IMG_OBJ_FOLDER屬性代碼示例

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


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

示例1: getImage

public Image getImage(Object element) {
	final String s;
	switch (((PreviewFile)element).type) {
	case IResource.PROJECT:
		s= SharedImages.IMG_OBJ_PROJECT; break;
	case IResource.FOLDER:
		s= ISharedImages.IMG_OBJ_FOLDER; break;
	default:
		s= ISharedImages.IMG_OBJ_FILE; break;
	}
	final Image baseImage= PlatformUI.getWorkbench().getSharedImages().getImage(s);
	final ImageDescriptor overlay = getOverlay(element);
	if (overlay == null)
		return baseImage;
	try {
              return fImageCache.createImage(new OverlayIcon(baseImage, new ImageDescriptor[] {overlay}, new int[] {OverlayIcon.BOTTOM_RIGHT}, new Point(baseImage.getBounds().width, baseImage.getBounds().height)));
          } catch (Exception e) {
          	SVNUIPlugin.log(e.getMessage());
          }
          return null;
}
 
開發者ID:subclipse,項目名稱:subclipse,代碼行數:21,代碼來源:SVNDecoratorPreferencesPage.java

示例2: getImage

public Image getImage(Object obj) {
	String imageKey = null;
	if (obj instanceof GroupItem) {
	   imageKey = ISharedImages.IMG_OBJ_FOLDER;
	} else {
        String imgName = obj.getClass().getSimpleName().replace("Item", "").toLowerCase();
		Image image = imageCache.get(imgName);
		if(image==null) {
			ImageDescriptor imageDesc = UIActivator.getImageDescriptor("icons/" + imgName + ".png");
			if(imageDesc!=null) {
				image = imageDesc.createImage();
				imageCache.put(imgName, image);
				return image;
			}
		} else {
			return image;
		}
		// use the shared image as a default
		imageKey = ISharedImages.IMG_OBJ_ELEMENT;
	}
	return PlatformUI.getWorkbench().getSharedImages().getImage(imageKey);
}
 
開發者ID:andrey-desman,項目名稱:openhab-hdl,代碼行數:22,代碼來源:ItemView.java

示例3: getImage

@Override
public Image getImage(Object obj) {
    if (obj instanceof TreePlugin) {
        return pluginImage;
    }
    if (obj instanceof TreePackage) {
        return packageImage;
    }
    if (obj instanceof TreeFeature) {
        return featureImage;
    }
    if (obj instanceof TreeProblem) {
        TreeProblem tp = (TreeProblem) obj;
        Problem p = tp.getProblem();
        return p.isError()? errorImage : warningImage;
    }
    String imageKey = ISharedImages.IMG_OBJ_FOLDER;
    return PlatformUI.getWorkbench().getSharedImages().getImage(imageKey);
}
 
開發者ID:iloveeclipse,項目名稱:plugindependencies,代碼行數:19,代碼來源:ViewLabelProvider.java

示例4: getImage

public Image getImage(Object obj) {
	String imageKey = ISharedImages.IMG_OBJ_ELEMENT;

	if (obj instanceof TreeParent)
		imageKey = ISharedImages.IMG_OBJ_FOLDER;
	return PlatformUI.getWorkbench().getSharedImages().getImage(imageKey);
}
 
開發者ID:k4v,項目名稱:Sus,代碼行數:7,代碼來源:SDD.java

示例5: getImage

@Override
public Image getImage(Object element) {
    String imageKey = null;
    if(element instanceof Chunk) {
        imageKey = ISharedImages.IMG_OBJ_FOLDER;
    }
    else if(element instanceof Row) {
        imageKey = ISharedImages.IMG_OBJ_FILE;
    }
    if(imageKey != null) {
        return Helper.getSharedImage(imageKey);
    }
    return null;
}
 
開發者ID:insweat,項目名稱:hssd,代碼行數:14,代碼來源:L10NViewLP.java

示例6: getImage

public Image getImage(Object obj) {
    String imageKey = ISharedImages.IMG_OBJ_ELEMENT;
    if (obj instanceof String || obj instanceof SearchList || obj instanceof ReportInfo) // TODO: provide better images
        imageKey = ISharedImages.IMG_OBJ_FOLDER;
    return PlatformUI.getWorkbench().getSharedImages().getImage(imageKey);
}
 
開發者ID:Ericsson,項目名稱:CodeCheckerEclipsePlugin,代碼行數:6,代碼來源:BasicViewLabelProvider.java

示例7: getImageDescriptor

@Override
public ImageDescriptor getImageDescriptor(Context context, Bookmark bookmark) {
	String imageKey = ISharedImages.IMG_OBJ_FOLDER;
	return PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(imageKey);
}
 
開發者ID:cchabanois,項目名稱:mesfavoris,代碼行數:5,代碼來源:BookmarkFolderLabelProvider.java


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