當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。