本文整理汇总了Java中org.openide.util.ImageUtilities.mergeImages方法的典型用法代码示例。如果您正苦于以下问题:Java ImageUtilities.mergeImages方法的具体用法?Java ImageUtilities.mergeImages怎么用?Java ImageUtilities.mergeImages使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.openide.util.ImageUtilities
的用法示例。
在下文中一共展示了ImageUtilities.mergeImages方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: annotateIcon
import org.openide.util.ImageUtilities; //导入方法依赖的package包/类
@Override
@NonNull
public Image annotateIcon(
@NonNull final Project p,
@NonNull Image original,
final boolean openedNode) {
Boolean type = projectType.get(p);
if (type != null) {
if(type.booleanValue() == true) {
final Image badge = getJFXBadge();
if (badge != null) {
original = ImageUtilities.mergeImages(original, badge, 8, 8);
}
}
} else {
evaluateProjectType(p);
}
return original;
}
示例2: getNotificationsIcon
import org.openide.util.ImageUtilities; //导入方法依赖的package包/类
private Icon getNotificationsIcon(int unread, boolean isError) {
ImageIcon icon;
if (isError) {
icon = ImageUtilities.loadImageIcon("org/netbeans/modules/notifications/resources/notificationsError.png", true);
} else {
icon = ImageUtilities.loadImageIcon("org/netbeans/modules/notifications/resources/notifications.png", true);
}
BufferedImage countIcon = new BufferedImage(16, 16, BufferedImage.TYPE_INT_ARGB);
Graphics2D g = countIcon.createGraphics();
g.setFont(getFont().deriveFont(10f));
Color color;
if ("Nimbus".equals(UIManager.getLookAndFeel().getID())) {
color = isError ? Color.RED : Color.BLACK;
} else {
color = isError ? UIManager.getColor("nb.errorForeground") : UIManager.getColor("Label.foreground");
}
g.setColor(color);
if (unread < 10) {
g.setFont(g.getFont().deriveFont(Font.BOLD));
g.drawString(Integer.toString(unread), 5, 10);
} else if (unread < 100) {
g.drawString(Integer.toString(unread), 3, 10);
} else {
g.drawString("...", 2, 10);
}
return new ImageIcon(ImageUtilities.mergeImages(icon.getImage(), countIcon, 0, 0));
}
示例3: computeIcon
import org.openide.util.ImageUtilities; //导入方法依赖的package包/类
private Image computeIcon( boolean opened, int type ) {
Image image;
Icon icon = group.getIcon( opened );
if ( icon == null ) {
image = opened ? getDataFolderNodeDelegate().getOpenedIcon( type ) :
getDataFolderNodeDelegate().getIcon( type );
image = ImageUtilities.mergeImages(image, ImageUtilities.loadImage(PACKAGE_BADGE), 7, 7);
}
else {
image = ImageUtilities.icon2Image(icon);
}
return image;
}
示例4: getIcon
import org.openide.util.ImageUtilities; //导入方法依赖的package包/类
@Override
public Image getIcon(int type) {
final Icon icon = info.getIcon();
final Image img = icon == null ?
super.getIcon(type) :
ImageUtilities.icon2Image(icon);
return !broken && compileOnSaveDisabled ?
ImageUtilities.mergeImages(img, compileOnSaveDisabledBadge, 8, 0) :
img;
}
示例5: getIcon
import org.openide.util.ImageUtilities; //导入方法依赖的package包/类
private Image getIcon(boolean opened) {
Image badge = ImageUtilities.loadImage("org/netbeans/modules/apisupport/project/ui/resources/libraries-badge.png", true);
Image img = ImageUtilities.mergeImages(ApisupportAntUIUtils.getTreeFolderIcon(opened), badge, 8, 8);
if (missingJUnit4) {
badge = ImageUtilities.loadImage("org/netbeans/modules/java/api/common/project/ui/resources/brokenProjectBadge.gif", true);
img = ImageUtilities.mergeImages(img, badge, 0, 0);
}
return img;
}
示例6: computeIcon
import org.openide.util.ImageUtilities; //导入方法依赖的package包/类
private Image computeIcon(boolean opened, int type) {
Image image = opened ?
getDataFolderNodeDelegate().getOpenedIcon(type) :
getDataFolderNodeDelegate().getIcon(type);
image = ImageUtilities.mergeImages(
image,
ImageUtilities.loadImage(TEST_BADGE),
4, 5);
return image;
}
示例7: getIcon
import org.openide.util.ImageUtilities; //导入方法依赖的package包/类
@Override
public Image getIcon(int type) {
Object server = getServerDefinition().getServerFlag().getFlag();
Image badge = null;
if (server == null) {
badge = getBadgeIcon("Error");
} else {
badge = getBadgeIcon("Running");
}
return ImageUtilities.mergeImages(getServerIcon(), badge, 4, 4);
}
示例8: badgeIcon
import org.openide.util.ImageUtilities; //导入方法依赖的package包/类
private static Image badgeIcon(Image image, DockerContainer.Status status) {
Image badge = null;
switch (status) {
case PAUSED:
badge = ImageUtilities.loadImage(PAUSED_ICON);
break;
case RUNNING:
badge = ImageUtilities.loadImage(RUNNING_ICON);
break;
default:
break;
}
return badge != null ? ImageUtilities.mergeImages(image, badge, 13, 8) : image;
}
示例9: getIcon
import org.openide.util.ImageUtilities; //导入方法依赖的package包/类
@Override
public java.awt.Image getIcon(int param) {
java.awt.Image retValue = super.getIcon(param);
if (isTopLevelNode) {
retValue = ImageUtilities.mergeImages(retValue,
ImageUtilities.loadImage(PSITE_BADGE), //NOI18N
8, 8);
}
return retValue;
}
示例10: getOpenedIcon
import org.openide.util.ImageUtilities; //导入方法依赖的package包/类
@Override
public java.awt.Image getOpenedIcon(int param) {
java.awt.Image retValue = super.getOpenedIcon(param);
if (isTopLevelNode) {
retValue = ImageUtilities.mergeImages(retValue,
ImageUtilities.loadImage(PSITE_BADGE), //NOI18N
8, 8);
}
return retValue;
}
示例11: computeIcon
import org.openide.util.ImageUtilities; //导入方法依赖的package包/类
private Image computeIcon( boolean opened, int type ) {
if (group.getResource() != null) {
Icon icon = group.getIcon( opened );
Image img = ImageUtilities.icon2Image(icon);
if (group.getResource().isFiltering()) {
Image warn = ImageUtilities.loadImage(FILTERED_RESOURCE);
img = ImageUtilities.mergeImages(img, warn , 0, 8);
}
return img;
} else {
return super.getIcon(type);
}
}
示例12: computeIcon
import org.openide.util.ImageUtilities; //导入方法依赖的package包/类
private Image computeIcon(boolean opened, int type) {
Image image = UiUtils.getTreeFolderIcon(opened);
image = ImageUtilities.mergeImages(image, ICON_BADGE, 7, 7);
return image;
}
示例13: createLoopIcon
import org.openide.util.ImageUtilities; //导入方法依赖的package包/类
public static ImageIcon createLoopIcon(ImageIcon icon) {
return new ImageIcon(ImageUtilities.mergeImages(icon.getImage(), ICON_LOOP.getImage(), 0, 0));
}
示例14: getIcon
import org.openide.util.ImageUtilities; //导入方法依赖的package包/类
private Image getIcon(boolean opened) {
Image badge = ImageUtilities.loadImage(CONFIG_BADGE, true); //NOI18N
return ImageUtilities.mergeImages(NodeUtils.getTreeFolderIcon(opened), badge, 8, 8);
}
示例15: getBadge
import org.openide.util.ImageUtilities; //导入方法依赖的package包/类
private Image getBadge(String badgePath, Image origIcon, String toolTip) {
Image ret = ImageUtilities.assignToolTipToImage(ImageUtilities.loadImage(badgePath, true), toolTip);
ret = ImageUtilities.mergeImages(origIcon, ret, 16, 9);
return ret;
}