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


Java ImageUtilities.mergeImages方法代码示例

本文整理汇总了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;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:20,代码来源:JFXProjectIconAnnotator.java

示例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));
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:28,代码来源:FlashingIcon.java

示例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;        
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:16,代码来源:PackageRootNode.java

示例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;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:11,代码来源:LogicalViewProviders.java

示例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;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:10,代码来源:UnitTestLibrariesNode.java

示例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;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:11,代码来源:MultiModuleNodeFactory.java

示例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);
}
 
开发者ID:kefik,项目名称:Pogamut3,代码行数:14,代码来源:ServerNode.java

示例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;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:15,代码来源:DockerContainerNode.java

示例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;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:11,代码来源:SiteDocsNode.java

示例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;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:11,代码来源:SiteDocsNode.java

示例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);
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:14,代码来源:OthersRootChildren.java

示例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;
}
 
开发者ID:NBANDROIDTEAM,项目名称:NBANDROID-V2,代码行数:6,代码来源:DependenciesNode.java

示例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));
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:4,代码来源:BrowserUtils.java

示例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);
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:5,代码来源:ImportantFilesNodeFactory.java

示例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;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:6,代码来源:Annotator.java


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