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


Java ISharedImages.IMG_OBJ_ELEMENT屬性代碼示例

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


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

示例1: getImage

public Image getImage(Object obj) {
			String imageKey = ISharedImages.IMG_OBJ_ELEMENT;
			if (obj instanceof DockerConnectionImagesTreeParent)
				imageKey = "icons/images.gif";
			else if (obj instanceof DockerConnectionContainersTreeParent)
				imageKey = "icons/containers.gif";
			else if (obj instanceof DockerConnectionImageTreeObject)
				imageKey = "icons/image.gif";
			else if (obj instanceof DockerConnectionContainerTreeObject)
				imageKey = "icons/container.gif";
			else if (obj instanceof DockerConnectionTreeParent)
				imageKey = "icons/server.gif";
			
			return Activator.getImageDescriptor(imageKey).createImage();
//			return PlatformUI.getWorkbench().getSharedImages().getImage(imageKey);
		}
 
開發者ID:osswangxining,項目名稱:dockerfoundry,代碼行數:16,代碼來源:DockerExplorerView.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(final Object element) {
	Bookmark bookmark = (Bookmark) Adapters.adapt(element, Bookmark.class);
	ImageDescriptor imageDescriptor = bookmarkLabelProvider.getImageDescriptor(context, bookmark);
	if (imageDescriptor == null) {
		String imageKey = ISharedImages.IMG_OBJ_ELEMENT;
		imageDescriptor = PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(imageKey);
	}
	ImageDescriptor[] overlayImages = getOverlayImages(element);
	OverlayIconImageDescriptor decorated = new OverlayIconImageDescriptor(imageDescriptor, overlayImages);
	return (Image) this.resourceManager.get(decorated);
}
 
開發者ID:cchabanois,項目名稱:mesfavoris,代碼行數:12,代碼來源:BookmarksPathLabelProvider.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) {
	if(element instanceof TreeNode) {
		final TreeNode vn = (TreeNode)element;
		final ValueData vd = ValueData.of(vn);
		final Thype thype = vd.element().thype();
		if(thype instanceof TraitThypeLike) {
		    return Activator.getImage(IMG_OBJ_TRAIT);
		}
		else if(thype instanceof CollectionThypeLike) {
		    String key = ISharedImages.IMG_OBJ_ELEMENT;
		    return Helper.getSharedImage(key);
		}
		else if(thype instanceof ReferenceThype) {
		    return Activator.getImage(IMG_OBJ_REF);
		}
		else if(thype instanceof LStringThype) {
		    return Activator.getImage(IMG_OBJ_LSTR);
		}
		else if(vn.isLeaf()) {
		    return Activator.getImage(IMG_OBJ_LEAF);
		}
		else {
		    return Activator.getImage(IMG_OBJ_COMPLEX);
		}
	}
	return null;
}
 
開發者ID:insweat,項目名稱:hssd,代碼行數:28,代碼來源:ValueTreeLP.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: getImage

@Override
public Image getImage() {
	String imageKey = ISharedImages.IMG_OBJ_ELEMENT;
	return PlatformUI.getWorkbench().getSharedImages().getImage(imageKey);
}
 
開發者ID:logicalhacking,項目名稱:SecureBPMN,代碼行數:5,代碼來源:AbstractContainerNode.java


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