當前位置: 首頁>>代碼示例>>Java>>正文


Java BeanInfo.ICON_COLOR_16x16方法代碼示例

本文整理匯總了Java中java.beans.BeanInfo.ICON_COLOR_16x16方法的典型用法代碼示例。如果您正苦於以下問題:Java BeanInfo.ICON_COLOR_16x16方法的具體用法?Java BeanInfo.ICON_COLOR_16x16怎麽用?Java BeanInfo.ICON_COLOR_16x16使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在java.beans.BeanInfo的用法示例。


在下文中一共展示了BeanInfo.ICON_COLOR_16x16方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: writeResponseResult

import java.beans.BeanInfo; //導入方法依賴的package包/類
@Override
protected void writeResponseResult(HttpServletRequest request, HttpServletResponse response)
		throws IOException, ServiceException {

	String className = request.getParameter("className");
	String large = request.getParameter("large");

	if (className == null || !className.startsWith("com.twinsoft.convertigo.beans"))
		throw new ServiceException("Must provide className parameter", null);

	try {
		BeanInfo bi = CachedIntrospector.getBeanInfo(GenericUtils.<Class<? extends DatabaseObject>>cast(Class.forName(className)));
		int iconType = large != null && large.equals("true") ? BeanInfo.ICON_COLOR_32x32 : BeanInfo.ICON_COLOR_16x16;
		IOUtils.copy(bi.getBeanDescriptor().getBeanClass().getResourceAsStream(MySimpleBeanInfo.getIconName(bi, iconType)), response.getOutputStream());
	} catch (Exception e) {
		throw new ServiceException("Icon unreachable", e);
	}

	Engine.logAdmin.info("The image has been exported");
}
 
開發者ID:convertigo,項目名稱:convertigo-engine,代碼行數:21,代碼來源:GetIcon.java

示例2: getIcon

import java.beans.BeanInfo; //導入方法依賴的package包/類
@Override
public Image getIcon(int type) {

    Image icon = null;
    
    if (type == BeanInfo.ICON_COLOR_16x16 || type == BeanInfo.ICON_MONO_16x16) {
        if (icon16 == null) {
            icon16 = _getIcon(type, icon16URL);
            if (icon16 == null)
                icon16 = ImageUtilities.loadImage("org/netbeans/modules/palette/resources/unknown16.gif"); // NOI18N
        }
        icon = icon16;
    }
    else if (type == BeanInfo.ICON_COLOR_32x32 || type == BeanInfo.ICON_MONO_32x32) {
        if (icon32 == null) {
            icon32 = _getIcon(type, icon32URL);
            if (icon32 == null)
                icon32 = ImageUtilities.loadImage("org/netbeans/modules/palette/resources/unknown32.gif"); // NOI18N
        }
        icon = icon32;
    }
    
    return icon;
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:25,代碼來源:PaletteItemNode.java

示例3: getIcon

import java.beans.BeanInfo; //導入方法依賴的package包/類
public Image getIcon(int iconKind) {
    if ((iconKind == BeanInfo.ICON_COLOR_16x16) || (iconKind == BeanInfo.ICON_MONO_16x16)) {
        return ImageUtilities.loadImage("org/netbeans/modules/java/j2seplatform/resources/platform.gif"); // NOI18N
    } else {
        return null;
    }
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:8,代碼來源:DefaultPlatformImplBeanInfo.java

示例4: getIcon

import java.beans.BeanInfo; //導入方法依賴的package包/類
public Image getIcon(int type)
{
    Image image = null;
    
    if (type == BeanInfo.ICON_COLOR_16x16) {
        image = ImageUtilities.loadImage("org/netbeans/modules/derby/resources/optionsIcon16.png"); // NOI18N
    } else if (type == BeanInfo.ICON_COLOR_32x32) {
        image = ImageUtilities.loadImage("org/netbeans/modules/derby/resources/optionsIcon32.png"); // NOI18N
    }
    
    return image != null ? image : super.getIcon(type);
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:13,代碼來源:DerbyOptionsBeanInfo.java

示例5: getIcon

import java.beans.BeanInfo; //導入方法依賴的package包/類
Icon getIcon(boolean opened, boolean large) {
    int newCacheType = getCacheType(opened, large);

    if (cachedIconType != newCacheType) {
        int iconType = large ? BeanInfo.ICON_COLOR_32x32 : BeanInfo.ICON_COLOR_16x16;

        Image image;
        try {
            image = opened ? node.getOpenedIcon(iconType) : node.getIcon(iconType);

            // bugfix #28515, check if getIcon contract isn't broken
            if (image == null) {
                String method = opened ? "getOpenedIcon" : "getIcon"; // NOI18N
                LOG.warning(
                    "Node \"" + node.getName() + "\" [" + node.getClass().getName() + "] cannot return null from " +
                    method + "(). See Node." + method + " contract."
                    ); // NOI18N
            }
        } catch (RuntimeException x) {
            LOG.log(Level.INFO, null, x);
            image = null;
        }

        if (image == null) {
            icon = getDefaultIcon();
        } else {
            icon = ImageUtilities.image2Icon(image);
        }
    }

    cachedIconType = newCacheType;

    return icon;
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:35,代碼來源:VisualizerNode.java

示例6: annotateIcon

import java.beans.BeanInfo; //導入方法依賴的package包/類
private Image annotateIcon(FileObject fo, int type) {
    String attr = null;
    if (type == BeanInfo.ICON_COLOR_16x16) {
        attr = "SystemFileSystem.icon"; // NOI18N
    } else if (type == BeanInfo.ICON_COLOR_32x32) {
        attr = "SystemFileSystem.icon32"; // NOI18N
    }
    if (attr != null) {
        Object value = fo.getAttribute(attr);
        if (value != null) {
            if (value instanceof URL) {
                return Toolkit.getDefaultToolkit().getImage((URL) value);
            } else if (value instanceof Image) {
                // #18832
                return (Image) value;
            } else {
                LOG.warning("Attribute " + attr + " on " + fo + " expected to be a URL or Image; was: " + value);
            }
        }
    }
    String base = (String) fo.getAttribute("iconBase"); // NOI18N
    if (base != null) {
        if (type == BeanInfo.ICON_COLOR_16x16) {
            return ImageUtilities.loadImage(base, true);
        } else if (type == BeanInfo.ICON_COLOR_32x32) {
            return ImageUtilities.loadImage(insertBeforeSuffix(base, "_32"), true); // NOI18N
        }
    }
    return null;
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:31,代碼來源:FileSystemCompat.java

示例7: getOpenedFolderIcon

import java.beans.BeanInfo; //導入方法依賴的package包/類
protected Image getOpenedFolderIcon (int type) {
    Image img = null;
    if (type == BeanInfo.ICON_COLOR_16x16) {
        img = findIcon("Nb.Explorer.Folder.openedIcon", "Tree.openIcon"); //NOI18N
    }
    if (img == null) {
        img = super.getOpenedIcon(type);
    }
    return img;
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:11,代碼來源:RepositoryBrowserPanel.java

示例8: getIcon

import java.beans.BeanInfo; //導入方法依賴的package包/類
@Override
public Image getIcon(int type) {
    if ((type == BeanInfo.ICON_COLOR_16x16) || (type == BeanInfo.ICON_MONO_16x16)) {
        // XXX new icons would be great!
        return ImageUtilities.loadImage("org/netbeans/modules/java/resources/class.png"); // NOI18N
    }
    else {
        return ImageUtilities.loadImage("org/netbeans/modules/java/resources/class.png"); // NOI18N
    }

}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:12,代碼來源:BIDataLoaderBeanInfo.java

示例9: getDynamicIconName

import java.beans.BeanInfo; //導入方法依賴的package包/類
@Override
public String getDynamicIconName(int iconType) {
   	if (ionBean != null) {
		if (iconType == BeanInfo.ICON_COLOR_16x16) {
			return ionBean.getIconColor16Path();
		}
		else if (iconType == BeanInfo.ICON_COLOR_32x32) {
			return ionBean.getIconColor32Path();
		}
   	}
	return null;
}
 
開發者ID:convertigo,項目名稱:convertigo-engine,代碼行數:13,代碼來源:UIDynamicElement.java

示例10: getIcon

import java.beans.BeanInfo; //導入方法依賴的package包/類
/** @param type Desired type of the icon
 * @return returns the properties loader's icon */
public Image getIcon(final int type) {
    if((type == BeanInfo.ICON_COLOR_16x16) || (type == BeanInfo.ICON_MONO_16x16)) {
        return ImageUtilities.loadImage("org/netbeans/modules/properties/propertiesObject.png"); // NOI18N
    } else {
        return ImageUtilities.loadImage("org/netbeans/modules/properties/propertiesObject32.gif"); // NOI18N
    }
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:10,代碼來源:PropertiesDataLoaderBeanInfo.java

示例11: getIcon

import java.beans.BeanInfo; //導入方法依賴的package包/類
@Override
public Image getIcon(int type) {
    Image result = null;
    if (type == BeanInfo.ICON_COLOR_16x16) {
        result = icon2Image("Nb.Explorer.Folder.icon"); // NOI18N
    }
    if (result == null) {
        result = icon2Image("Tree.closedIcon"); // NOI18N
    }
    if (result == null) {
        result = super.getIcon(type);
    }
    return result;
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:15,代碼來源:DriverListNode.java

示例12: getOpenedIcon

import java.beans.BeanInfo; //導入方法依賴的package包/類
@Override
public Image getOpenedIcon(int type) {
    Image result = null;
    if (type == BeanInfo.ICON_COLOR_16x16) {
        result = icon2Image("Nb.Explorer.Folder.openedIcon"); // NOI18N
    }
    if (result == null) {
        result = icon2Image("Tree.openIcon"); // NOI18N
    }
    if (result == null) {
        result = super.getOpenedIcon(type);
    }
    return result;
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:15,代碼來源:DriverListNode.java

示例13: getIcon

import java.beans.BeanInfo; //導入方法依賴的package包/類
@Override
public Image getIcon(int type) {
    if (type == BeanInfo.ICON_COLOR_16x16 || type == BeanInfo.ICON_MONO_16x16) {
        return ImageUtilities.loadImage("org/netbeans/modules/hibernate/resources/hibernate-configuration.png");
    } else {
        return null;
    }

}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:10,代碼來源:HibernateCfgDataLoaderBeanInfo.java

示例14: getIcon

import java.beans.BeanInfo; //導入方法依賴的package包/類
@Override
public Image getIcon(int type) {
    if (type == BeanInfo.ICON_COLOR_16x16 || type == BeanInfo.ICON_MONO_16x16) {
        return ImageUtilities.loadImage("org/netbeans/modules/hibernate/resources/hibernate-mapping.png");
    } else {
        return null;
    }

}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:10,代碼來源:HibernateMappingDataLoaderBeanInfo.java

示例15: getIcon

import java.beans.BeanInfo; //導入方法依賴的package包/類
@Override
public Image getIcon(int type) {
    if (type == BeanInfo.ICON_COLOR_16x16 || type == BeanInfo.ICON_MONO_16x16) {
        return ImageUtilities.loadImage("org/netbeans/modules/hibernate/resources/hibernate-reveng.png");
    } else {
        return null;
    }

}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:10,代碼來源:HibernateRevengDataLoaderBeanInfo.java


注:本文中的java.beans.BeanInfo.ICON_COLOR_16x16方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。