java.beans.BeanInfo#ICON_MONO_32x32 ( )源码实例Demo

下面列出了java.beans.BeanInfo#ICON_MONO_32x32 ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: netbeans   文件: PaletteItemNode.java
@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;
}
 
/**
 * Gets the icon
 *
 * @param type  Description of the Parameter
 * @return      The icon value
 */
public Image getIcon(int type)
{
   if (type == BeanInfo.ICON_COLOR_16x16)
   {
      return iconColor16;
   }
   if (type == BeanInfo.ICON_MONO_16x16)
   {
      return iconMono16;
   }
   if (type == BeanInfo.ICON_COLOR_32x32)
   {
      return iconColor32;
   }
   if (type == BeanInfo.ICON_MONO_32x32)
   {
      return iconMono32;
   }
   return null;
}
 
/**
 * Gets the icon
 *
 * @param type  Description of the Parameter
 * @return      The icon value
 */
public Image getIcon(int type)
{
   if (type == BeanInfo.ICON_COLOR_16x16)
   {
      return iconColor16;
   }
   if (type == BeanInfo.ICON_MONO_16x16)
   {
      return iconMono16;
   }
   if (type == BeanInfo.ICON_COLOR_32x32)
   {
      return iconColor32;
   }
   if (type == BeanInfo.ICON_MONO_32x32)
   {
      return iconMono32;
   }
   return null;
}
 
源代码4 项目: orbit-image-analysis   文件: JButtonBarBeanInfo.java
/**
 * Gets the icon
 *
 * @param type  Description of the Parameter
 * @return      The icon value
 */
public Image getIcon(int type)
{
   if (type == BeanInfo.ICON_COLOR_16x16)
   {
      return iconColor16;
   }
   if (type == BeanInfo.ICON_MONO_16x16)
   {
      return iconMono16;
   }
   if (type == BeanInfo.ICON_COLOR_32x32)
   {
      return iconColor32;
   }
   if (type == BeanInfo.ICON_MONO_32x32)
   {
      return iconMono32;
   }
   return null;
}
 
源代码5 项目: orbit-image-analysis   文件: JTaskPaneBeanInfo.java
/**
 * Gets the icon
 *
 * @param type  Description of the Parameter
 * @return      The icon value
 */
public Image getIcon(int type)
{
   if (type == BeanInfo.ICON_COLOR_16x16)
   {
      return iconColor16;
   }
   if (type == BeanInfo.ICON_MONO_16x16)
   {
      return iconMono16;
   }
   if (type == BeanInfo.ICON_COLOR_32x32)
   {
      return iconColor32;
   }
   if (type == BeanInfo.ICON_MONO_32x32)
   {
      return iconMono32;
   }
   return null;
}
 
/**
 * Gets the icon
 *
 * @param type  Description of the Parameter
 * @return      The icon value
 */
public Image getIcon(int type)
{
   if (type == BeanInfo.ICON_COLOR_16x16)
   {
      return iconColor16;
   }
   if (type == BeanInfo.ICON_MONO_16x16)
   {
      return iconMono16;
   }
   if (type == BeanInfo.ICON_COLOR_32x32)
   {
      return iconColor32;
   }
   if (type == BeanInfo.ICON_MONO_32x32)
   {
      return iconMono32;
   }
   return null;
}
 
/**
 * Gets the icon
 *
 * @param type  Description of the Parameter
 * @return      The icon value
 */
public Image getIcon(int type)
{
   if (type == BeanInfo.ICON_COLOR_16x16)
   {
      return iconColor16;
   }
   if (type == BeanInfo.ICON_MONO_16x16)
   {
      return iconMono16;
   }
   if (type == BeanInfo.ICON_COLOR_32x32)
   {
      return iconColor32;
   }
   if (type == BeanInfo.ICON_MONO_32x32)
   {
      return iconMono32;
   }
   return null;
}
 
/**
 * Gets the icon
 *
 * @param type  Description of the Parameter
 * @return      The icon value
 */
public Image getIcon(int type)
{
   if (type == BeanInfo.ICON_COLOR_16x16)
   {
      return iconColor16;
   }
   if (type == BeanInfo.ICON_MONO_16x16)
   {
      return iconMono16;
   }
   if (type == BeanInfo.ICON_COLOR_32x32)
   {
      return iconColor32;
   }
   if (type == BeanInfo.ICON_MONO_32x32)
   {
      return iconMono32;
   }
   return null;
}
 
/**
 * Gets the icon
 *
 * @param type  Description of the Parameter
 * @return      The icon value
 */
public Image getIcon(int type)
{
   if (type == BeanInfo.ICON_COLOR_16x16)
   {
      return iconColor16;
   }
   if (type == BeanInfo.ICON_MONO_16x16)
   {
      return iconMono16;
   }
   if (type == BeanInfo.ICON_COLOR_32x32)
   {
      return iconColor32;
   }
   if (type == BeanInfo.ICON_MONO_32x32)
   {
      return iconMono32;
   }
   return null;
}
 
源代码10 项目: orbit-image-analysis   文件: JOutlookBarBeanInfo.java
/**
 * Gets the icon
 *
 * @param type  Description of the Parameter
 * @return      The icon value
 */
public Image getIcon(int type)
{
   if (type == BeanInfo.ICON_COLOR_16x16)
   {
      return iconColor16;
   }
   if (type == BeanInfo.ICON_MONO_16x16)
   {
      return iconMono16;
   }
   if (type == BeanInfo.ICON_COLOR_32x32)
   {
      return iconColor32;
   }
   if (type == BeanInfo.ICON_MONO_32x32)
   {
      return iconMono32;
   }
   return null;
}
 
源代码11 项目: netbeans   文件: SaasUtil.java
public static Image loadIcon(SaasGroup saasGroup, int type) {
    String path = saasGroup.getIcon16Path();
    if (type == BeanInfo.ICON_COLOR_32x32 || type == BeanInfo.ICON_MONO_32x32) {
        path =  saasGroup.getIcon32Path();
    }
    if (path != null) {
        URL url = Thread.currentThread().getContextClassLoader().getResource(path);
        if (url != null) {
            return new ImageIcon(url).getImage();
        }
        return ImageUtilities.loadImage(path);
    }
    return null;
}
 
源代码12 项目: netbeans-mmd-plugin   文件: MMFileDataNode.java
@Override
public Image getIcon(final int type) {
  switch (type) {
    case BeanInfo.ICON_COLOR_32x32:
    case BeanInfo.ICON_MONO_32x32:
      return NODE_ICON32;
    default:
      return NODE_ICON16;
  }
}
 
源代码13 项目: CodenameOne   文件: JCollapsiblePaneBeanInfo.java
/**
 * Gets the icon
 * 
 * @param type
 *          Description of the Parameter
 * @return The icon value
 */
public Image getIcon(int type) {
  if (type == BeanInfo.ICON_COLOR_16x16) { return iconColor16; }
  if (type == BeanInfo.ICON_MONO_16x16) { return iconMono16; }
  if (type == BeanInfo.ICON_COLOR_32x32) { return iconColor32; }
  if (type == BeanInfo.ICON_MONO_32x32) { return iconMono32; }
  return null;
}
 
源代码14 项目: CodenameOne   文件: JOutlookBarBeanInfo.java
/**
 * Gets the icon
 * 
 * @param type
 *          Description of the Parameter
 * @return The icon value
 */
public Image getIcon(int type) {
  if (type == BeanInfo.ICON_COLOR_16x16) { return iconColor16; }
  if (type == BeanInfo.ICON_MONO_16x16) { return iconMono16; }
  if (type == BeanInfo.ICON_COLOR_32x32) { return iconColor32; }
  if (type == BeanInfo.ICON_MONO_32x32) { return iconMono32; }
  return null;
}
 
源代码15 项目: pentaho-reporting   文件: AbstractMetaData.java
public synchronized Image getIcon( final Locale locale, final int iconKind ) {
  if ( iconKind < 1 || iconKind > 4 ) {
    throw new IllegalArgumentException();
  }

  if ( icons != null ) {
    final Image cachedIcon = icons[iconKind - 1];
    if ( cachedIcon != null ) {
      return cachedIcon;
    }
  }

  final String iconKey;
  if ( StringUtils.isEmpty( keyPrefixAndName ) == false ) {
    switch ( iconKind ) {
      case BeanInfo.ICON_COLOR_16x16:
        iconKey = ( keyPrefixAndName + ".icon-color-16" );
        break;
      case BeanInfo.ICON_COLOR_32x32:
        iconKey = ( keyPrefixAndName + ".icon-color-32" );
        break;
      case BeanInfo.ICON_MONO_16x16:
        iconKey = ( keyPrefixAndName + ".icon-mono-16" );
        break;
      case BeanInfo.ICON_MONO_32x32:
        iconKey = ( keyPrefixAndName + ".icon-mono-32" );
        break;
      default:
        throw new IllegalArgumentException();
    }
  } else {
    switch ( iconKind ) {
      case BeanInfo.ICON_COLOR_16x16:
        iconKey = ( "icon-color-16" );
        break;
      case BeanInfo.ICON_COLOR_32x32:
        iconKey = ( "icon-color-32" );
        break;
      case BeanInfo.ICON_MONO_16x16:
        iconKey = ( "icon-mono-16" );
        break;
      case BeanInfo.ICON_MONO_32x32:
        iconKey = ( "icon-mono-32" );
        break;
      default:
        throw new IllegalArgumentException();
    }
  }

  URL url = null;

  final String iconName = getOptionalString( locale, iconKey );
  if ( iconName != null ) {
    url = ObjectUtilities.getResource( iconName, DefaultElementMetaData.class );
  }
  if ( url == null ) {
    final String fallbackIcon = getOptionalString( locale, getKeyPrefix() + getName() + ".icon" );
    if ( fallbackIcon != null ) {
      url = ObjectUtilities.getResource( fallbackIcon, DefaultElementMetaData.class );
    }
    if ( url == null ) {
      return null;
    }
  }
  if ( icons == null ) {
    icons = new Image[4];
  }
  final Image retval = Toolkit.getDefaultToolkit().createImage( url );
  icons[iconKind - 1] = retval;
  return retval;
}