com.ezware.common
Class Icons

java.lang.Object
  extended by com.ezware.common.Icons

public final class Icons
extends java.lang.Object

Utility class for icon manipulation Created on Mar 1, 2010

Author:
Eugene Ryzhikov

Method Summary
static java.awt.Image asImage(javax.swing.Icon icon)
          Converts any icon to image
static java.awt.Image asImage(javax.swing.Icon icon, int newWidth, int newHeight)
          Converts any icon to an image with specified width and height
static javax.swing.Icon scale(javax.swing.Icon icon, int newWidth, int newHeight)
          Scales any icon to specified width and height
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

asImage

public static final java.awt.Image asImage(javax.swing.Icon icon)
Converts any icon to image

Parameters:
icon - icon to convert
Returns:
resulted image

asImage

public static final java.awt.Image asImage(javax.swing.Icon icon,
                                           int newWidth,
                                           int newHeight)
Converts any icon to an image with specified width and height

Parameters:
icon - icon to convert
newWidth - new image width
newHeight - new image height
Returns:
resulted image

scale

public static final javax.swing.Icon scale(javax.swing.Icon icon,
                                           int newWidth,
                                           int newHeight)
Scales any icon to specified width and height

Parameters:
icon - icon to scale
newWidth - new icon width
newHeight - new icon height
Returns:
resulting icon


Copyright © 2010 ezware. All Rights Reserved.