本文整理匯總了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);
}
示例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);
}
示例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);
}
示例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);
}
示例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;
}
示例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);
}
示例7: getImage
@Override
public Image getImage() {
String imageKey = ISharedImages.IMG_OBJ_ELEMENT;
return PlatformUI.getWorkbench().getSharedImages().getImage(imageKey);
}