Search in sources :

Example 1 with DefaultServerImageDescriptor

use of org.eclipse.wst.server.ui.internal.DefaultServerImageDescriptor in project webtools.servertools by eclipse.

the class ServerTypeTreeLabelProvider method getImageImpl.

/**
 */
protected Image getImageImpl(Object element) {
    IServerType type = (IServerType) element;
    Image image = ImageResource.getImage(type.getId());
    DefaultServerImageDescriptor dsid = null;
    if (element instanceof ServerTypeProxy) {
        Image image1 = ImageResource.getImage(ImageResource.IMG_DOWN_ARROW);
        dsid = new DefaultServerImageDescriptor(image, image1);
        dsid.setFlags(DefaultServerImageDescriptor.BOTTOM_RIGHT);
        image = dsid.createImage();
    }
    return image;
}
Also used : ServerTypeProxy(org.eclipse.wst.server.core.internal.ServerTypeProxy) IServerType(org.eclipse.wst.server.core.IServerType) Image(org.eclipse.swt.graphics.Image) DefaultServerImageDescriptor(org.eclipse.wst.server.ui.internal.DefaultServerImageDescriptor)

Example 2 with DefaultServerImageDescriptor

use of org.eclipse.wst.server.ui.internal.DefaultServerImageDescriptor in project webtools.servertools by eclipse.

the class RuntimeTypeTreeLabelProvider method getImageImpl.

/**
 */
protected Image getImageImpl(Object element) {
    IRuntimeType runtimeType = (IRuntimeType) element;
    Image image = ImageResource.getImage(runtimeType.getId());
    DefaultServerImageDescriptor dsid = null;
    if (element instanceof RuntimeTypeWithServerProxy) {
        Image image1 = ImageResource.getImage(ImageResource.IMG_DOWN_ARROW);
        dsid = new DefaultServerImageDescriptor(image, image1);
        dsid.setFlags(DefaultServerImageDescriptor.BOTTOM_RIGHT);
        image = dsid.createImage();
    }
    return image;
}
Also used : RuntimeTypeWithServerProxy(org.eclipse.wst.server.core.internal.RuntimeTypeWithServerProxy) IRuntimeType(org.eclipse.wst.server.core.IRuntimeType) Image(org.eclipse.swt.graphics.Image) DefaultServerImageDescriptor(org.eclipse.wst.server.ui.internal.DefaultServerImageDescriptor)

Aggregations

Image (org.eclipse.swt.graphics.Image)2 DefaultServerImageDescriptor (org.eclipse.wst.server.ui.internal.DefaultServerImageDescriptor)2 IRuntimeType (org.eclipse.wst.server.core.IRuntimeType)1 IServerType (org.eclipse.wst.server.core.IServerType)1 RuntimeTypeWithServerProxy (org.eclipse.wst.server.core.internal.RuntimeTypeWithServerProxy)1 ServerTypeProxy (org.eclipse.wst.server.core.internal.ServerTypeProxy)1