Java Code Examples for java.beans.BeanInfo#ICON_MONO_16x16

The following examples show how to use java.beans.BeanInfo#ICON_MONO_16x16 . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: JOutlookBarBeanInfo.java    From orbit-image-analysis with GNU General Public License v3.0 6 votes vote down vote up
/**
 * 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;
}
 
Example 2
Source File: JDirectoryChooserBeanInfo.java    From orbit-image-analysis with GNU General Public License v3.0 6 votes vote down vote up
/**
 * 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;
}
 
Example 3
Source File: JLinkButtonBeanInfo.java    From orbit-image-analysis with GNU General Public License v3.0 6 votes vote down vote up
/**
 * 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;
}
 
Example 4
Source File: PaletteItemNode.java    From netbeans with Apache License 2.0 6 votes vote down vote up
@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;
}
 
Example 5
Source File: JTaskPaneGroupBeanInfo.java    From orbit-image-analysis with GNU General Public License v3.0 6 votes vote down vote up
/**
 * 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;
}
 
Example 6
Source File: JCollapsiblePaneBeanInfo.java    From orbit-image-analysis with GNU General Public License v3.0 6 votes vote down vote up
/**
 * 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;
}
 
Example 7
Source File: PercentLayoutBeanInfo.java    From orbit-image-analysis with GNU General Public License v3.0 6 votes vote down vote up
/**
 * 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;
}
 
Example 8
Source File: JButtonBarBeanInfo.java    From orbit-image-analysis with GNU General Public License v3.0 6 votes vote down vote up
/**
 * 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;
}
 
Example 9
Source File: JTaskPaneBeanInfo.java    From orbit-image-analysis with GNU General Public License v3.0 6 votes vote down vote up
/**
 * 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;
}
 
Example 10
Source File: J2SEPlatformImplBeanInfo.java    From netbeans with Apache License 2.0 5 votes vote down vote up
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;
    }
}
 
Example 11
Source File: JOutlookBarBeanInfo.java    From CodenameOne with GNU General Public License v2.0 5 votes vote down vote up
/**
 * 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;
}
 
Example 12
Source File: GlslGeometryShaderDataLoaderBeanInfo.java    From MikuMikuStudio with BSD 2-Clause "Simplified" License 5 votes vote down vote up
@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;
    }
}
 
Example 13
Source File: GlslVertexShaderDataLoaderBeanInfo.java    From MikuMikuStudio with BSD 2-Clause "Simplified" License 5 votes vote down vote up
@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;
    }
}
 
Example 14
Source File: PropertiesDataLoaderBeanInfo.java    From netbeans with Apache License 2.0 5 votes vote down vote up
/** @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
    }
}
 
Example 15
Source File: SunResourceDataLoaderBeanInfo.java    From netbeans with Apache License 2.0 5 votes vote down vote up
public Image getIcon(int type) {
    if (type == BeanInfo.ICON_COLOR_16x16 || type == BeanInfo.ICON_MONO_16x16) {
        return ImageUtilities.loadImage("org/netbeans/modules/j2ee/sun/share/resources/sun-cluster_16_pad.gif", true); //NOI18N
    } else {
        return ImageUtilities.loadImage("org/netbeans/modules/j2ee/sun/share/resources/sun-cluster_16_pad32.gif", true); //NOI18N
    }
}
 
Example 16
Source File: GlslFragmentShaderDataLoaderBeanInfo.java    From MikuMikuStudio with BSD 2-Clause "Simplified" License 5 votes vote down vote up
@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;
    }
}
 
Example 17
Source File: JnlpDataLoaderBeanInfo.java    From netbeans with Apache License 2.0 5 votes vote down vote up
public Image getIcon(int type) {
    if (type == BeanInfo.ICON_COLOR_16x16 || type == BeanInfo.ICON_MONO_16x16) {
        return ImageUtilities.loadImage("org/netbeans/modules/javawebstart/resources/jnlp.gif"); // NOI18N
    } else {
        return null;
    }
    
}
 
Example 18
Source File: BIDataLoaderBeanInfo.java    From netbeans with Apache License 2.0 5 votes vote down vote up
@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
    }

}
 
Example 19
Source File: DefaultPlatformImplBeanInfo.java    From netbeans with Apache License 2.0 5 votes vote down vote up
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;
    }
}
 
Example 20
Source File: AbstractMetaData.java    From pentaho-reporting with GNU Lesser General Public License v2.1 4 votes vote down vote up
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;
}