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

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

源代码1 项目: 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;
}
 
/**
 * 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;
}
 
源代码7 项目: netbeans   文件: DefaultPlatformImplBeanInfo.java
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;
    }
}
 
源代码8 项目: netbeans   文件: J2SEPlatformImplBeanInfo.java
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;
    }
}
 
源代码9 项目: netbeans   文件: BIDataLoaderBeanInfo.java
@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
    }

}
 
源代码10 项目: netbeans   文件: VisualizerNode.java
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;
}
 
源代码11 项目: netbeans   文件: BadgingSupport.java
public @Override Image annotateIconSynch(Image icon, int type, Set<? extends FileObject> files) {
    final boolean big;
    if (type == BeanInfo.ICON_COLOR_16x16) {
        big = false;
    } else if (type == BeanInfo.ICON_COLOR_32x32) {
        big = true;
    } else {
        return icon;
    }
    // XXX could participate in bigIcons/smallIcons cache
    return annotateIconGeneral(icon, big, files);
}
 
源代码12 项目: netbeans   文件: JaxWsDataLoaderBeanInfo.java
/** @param type Desired type of the icon
* @return returns the Java loader's icon
*/
@Override
public Image getIcon(final int type) {
    if ((type == BeanInfo.ICON_COLOR_16x16) || (type == BeanInfo.ICON_MONO_16x16)) {
        return ImageUtilities.loadImage( "org/netbeans/modules/websvc/core/webservices/ui/resources/XMLServiceDataIcon.png"); // NOI18N
    }
    else {
        return ImageUtilities.loadImage( "org/netbeans/modules/websvc/core/webservices/ui/resources/XMLServiceDataIcon.png"); // NOI18N
    }
}
 
源代码13 项目: netbeans   文件: BreadcrumbProvider.java
@Override
public Image getIcon(int type) {
    if (type != BeanInfo.ICON_COLOR_16x16) {
        return null;
    }
    String resource;
    
    switch (docEl.getType()) {
        case XML_TAG:
        case XML_EMPTY_TAG:
            resource = TAG_16; 
            break;
        case XML_PI:
            resource = PI_16;
            break;
        case XML_CDATA:
            resource = CDATA_16;
            break;
        case XML_DOCTYPE:
            resource = DOCTYPE_16;
            break;
        default:
            // unsupported nodes
            throw new IllegalArgumentException();
    }
    return ImageUtilities.loadImage(resource, true);
}
 
源代码14 项目: netbeans   文件: JBManagerNode.java
public Image getIcon(int type) {
    if (type == BeanInfo.ICON_COLOR_16x16) {
        if (isJB7x()) {
            return ImageUtilities.loadImage("org/netbeans/modules/j2ee/jboss4/resources/as7_16x16.png"); // NOI18N
        }
        return ImageUtilities.loadImage("org/netbeans/modules/j2ee/jboss4/resources/16x16.gif"); // NOI18N
    }
    return super.getIcon(type);
}
 
源代码15 项目: netbeans   文件: RepositoryBrowserPanel.java
protected Image getFolderIcon (int type) {
    Image img = null;
    if (type == BeanInfo.ICON_COLOR_16x16) {
        img = findIcon("Nb.Explorer.Folder.icon", "Tree.closedIcon"); //NOI18N
    }
    if (img == null) {
        img = super.getIcon(type);
    }
    return img;
}
 
源代码16 项目: netbeans   文件: RepositoryBrowserPanel.java
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;
}
 
@Override
public Image getIcon(int type) {
    if (type == BeanInfo.ICON_COLOR_16x16 || type == BeanInfo.ICON_MONO_16x16) {
        return ImageUtilities.loadImage(IMAGE_ICON_BASE);
    } else {
        return null;
    }
}
 
源代码18 项目: netbeans   文件: DriverListNode.java
@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;
}
 
源代码19 项目: 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;
}
 
源代码20 项目: 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;
}