当前位置: 首页>>代码示例>>Java>>正文


Java ResourceManager.createImage方法代码示例

本文整理汇总了Java中org.eclipse.jface.resource.ResourceManager.createImage方法的典型用法代码示例。如果您正苦于以下问题:Java ResourceManager.createImage方法的具体用法?Java ResourceManager.createImage怎么用?Java ResourceManager.createImage使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.eclipse.jface.resource.ResourceManager的用法示例。


在下文中一共展示了ResourceManager.createImage方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: ThemeColorBlock

import org.eclipse.jface.resource.ResourceManager; //导入方法依赖的package包/类
public ThemeColorBlock(StyleDefinition def, Device device, ResourceManager resourceManager) {
    this.def = def;
    for (ThemeColor color : def.getColors()) {
        RGB rgb = color.getRGB();
        if (!colorMap.containsKey(rgb)) {
            colorMap.put(rgb, resourceManager.createColor(rgb));
        }
    }

    upImage = resourceManager.createImage(RCPUtils.getImageDescriptor(ThemeColorBlock.class, "icons/up.gif"));
    downImage = resourceManager.createImage(RCPUtils.getImageDescriptor(ThemeColorBlock.class, "icons/down.gif"));
}
 
开发者ID:yamcs,项目名称:yamcs-studio,代码行数:13,代码来源:ThemeColorBlock.java

示例2: create

import org.eclipse.jface.resource.ResourceManager; //导入方法依赖的package包/类
@Override
public void create() {
    super.create();
    setTitle("Connect to " + nvl(conf.getName(), conf.getPrimaryConnectionString()));
    setMessage("Please provide your credentials");
    ResourceManager resourceManager = new LocalResourceManager(JFaceResources.getResources(), getShell());
    Image titleImage = resourceManager
            .createImage(RCPUtils.getImageDescriptor(LoginDialog.class, "icons/yamcs_banner.png"));
    setTitleImage(titleImage);
}
 
开发者ID:yamcs,项目名称:yamcs-studio,代码行数:11,代码来源:LoginDialog.java

示例3: draw

import org.eclipse.jface.resource.ResourceManager; //导入方法依赖的package包/类
@Override
public void draw(ImageAttribute imageAttr, Graphics graphics, ResourceManager resourceManager) {
  try {
    Image img = resourceManager.createImage(buildImageDescriptor(imageAttr));
    Point tlp = getTopLeftLocation(imageAttr);
    graphics.drawImage(img, tlp);
  } catch (IllegalActionException e) {
    LOGGER.error("Error reading image for " + imageAttr.getFullName(), e);
  }
}
 
开发者ID:eclipse,项目名称:triquetrum,代码行数:11,代码来源:ImageDrawingStrategy.java

示例4: getDimension

import org.eclipse.jface.resource.ResourceManager; //导入方法依赖的package包/类
@Override
protected Dimension getDimension(ImageAttribute imageAttr, ResourceManager resourceManager) {
  try {
    Image img = resourceManager.createImage(buildImageDescriptor(imageAttr));
    return new Dimension(img.getBounds().width, img.getBounds().height);
  } catch (IllegalActionException e) {
    LOGGER.error("Error reading dimensions for " + imageAttr.getFullName(), e);
    return new Dimension(0, 0);
  }
}
 
开发者ID:eclipse,项目名称:triquetrum,代码行数:11,代码来源:ImageDrawingStrategy.java

示例5: findOrCreateImage

import org.eclipse.jface.resource.ResourceManager; //导入方法依赖的package包/类
private Image findOrCreateImage(final ImageDescriptor imageDescriptor, final ResourceManager resourceManager) {
	if (imageDescriptor == null) { return null; }
	Image image = (Image) resourceManager.find(imageDescriptor);
	if (image == null) {
		try {
			image = resourceManager.createImage(imageDescriptor);
		} catch (final DeviceResourceException e) {
			// WorkbenchPlugin.log(e);
		}
	}
	return image;
}
 
开发者ID:gama-platform,项目名称:gama,代码行数:13,代码来源:GamlAccessEntry.java


注:本文中的org.eclipse.jface.resource.ResourceManager.createImage方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。