com.l2fprod.util
Class ImageUtils

java.lang.Object
  extended by com.l2fprod.util.ImageUtils
All Implemented Interfaces:
javax.swing.SwingConstants

public final class ImageUtils
extends java.lang.Object
implements javax.swing.SwingConstants

Version:
$Revision: 1.8 $, $Date: 2006/07/22 09:52:13 $
Author:
$Author: l2fprod $

Field Summary
static int PAINT_CENTERED
          Description of the Field
static int PAINT_NONE
          Description of the Field
static int PAINT_NORMAL
          Description of the Field
static int PAINT_STRETCH
          Description of the Field
static int PAINT_TILE
          Description of the Field
static java.awt.Component producer
          Description of the Field
static int TRANSPARENT_BLUE
          Description of the Field
static int TRANSPARENT_GREEN
          Description of the Field
static int TRANSPARENT_PIXEL
          Description of the Field
static int TRANSPARENT_RED
          Description of the Field
static int TRANSPARENT_TO_REMOVE
          Description of the Field
 
Fields inherited from interface javax.swing.SwingConstants
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST
 
Constructor Summary
ImageUtils()
           
 
Method Summary
static java.awt.Image buildTile(java.awt.Image image, int factor)
          Description of the Method
static java.awt.Image convertBytesToImage(java.awt.Component c, int[] pixels, int w, int h)
          Description of the Method
static java.awt.Image filterImage(java.awt.image.RGBImageFilter filter, java.awt.Image image)
          Description of the Method
static java.awt.Image flipHorizontally(java.awt.Image image)
          Description of the Method
static javax.swing.ImageIcon getDisabledIcon(java.awt.Image anImage)
          Gets the DisabledIcon attribute of the ImageUtils class
static javax.swing.ImageIcon getDisabledIcon(javax.swing.ImageIcon anIcon)
          Gets the DisabledIcon attribute of the ImageUtils class
static java.awt.Image getDisabledImage(java.awt.Image anImage)
          Gets the DisabledImage attribute of the ImageUtils class
static java.awt.Image grab(java.awt.Image image, int x, int y, int width, int height)
          Description of the Method
static void paint(java.awt.Component c, java.awt.Graphics g, java.awt.Image image)
          Description of the Method
static void paint(java.awt.Component c, java.awt.Graphics g, java.awt.Image image, boolean alignWithParent)
          Description of the Method
static void paint(java.awt.Component c, java.awt.Graphics g, java.awt.Image image, boolean alignWithParent, int paintType)
          Description of the Method
static void paint(java.awt.Component c, java.awt.Graphics g, java.awt.Image image, int paintType)
          Description of the Method
static void paint(java.awt.Component c, java.awt.Graphics g, java.awt.Image image, int x, int y, int width, int height)
          Description of the Method
static void paint(java.awt.Component c, java.awt.Graphics g, java.awt.Image image, int x, int y, int width, int height, boolean alignWithParent, int paintType)
          Description of the Method
static void paint(java.awt.Component c, java.awt.Graphics g, java.awt.Image image, int x, int y, int width, int height, int paintType)
          Description of the Method
static void paintTile(java.awt.Component component, java.awt.Graphics g, java.awt.Image image, int x, int y, int width, int height)
          Description of the Method
static void paintWindow(java.awt.Component c, java.awt.Graphics g, java.awt.Image image, int x, int y, int width, int height, int windowX, int windowY, int windowWidth, int windowsHeight, boolean alignWithParent, int paintType)
           
static java.awt.Image rotateImage(java.awt.Image anImage)
          Description of the Method
static java.awt.Image rotateImage(java.awt.Image anImage, double angle)
          Description of the Method
static java.awt.Image rotateLeft(java.awt.Image anImage)
          Description of the Method
static java.awt.Image rotateRight(java.awt.Image anImage)
           
static java.awt.image.BufferedImage toBufferedImage(java.awt.Image image)
          Description of the Method
static java.awt.Image transparent(java.awt.Image image)
          Description of the Method
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

producer

public static final java.awt.Component producer
Description of the Field


PAINT_NORMAL

public static final int PAINT_NORMAL
Description of the Field

See Also:
Constant Field Values

PAINT_STRETCH

public static final int PAINT_STRETCH
Description of the Field

See Also:
Constant Field Values

PAINT_TILE

public static final int PAINT_TILE
Description of the Field

See Also:
Constant Field Values

PAINT_CENTERED

public static final int PAINT_CENTERED
Description of the Field

See Also:
Constant Field Values

PAINT_NONE

public static final int PAINT_NONE
Description of the Field

See Also:
Constant Field Values

TRANSPARENT_RED

public static final int TRANSPARENT_RED
Description of the Field

See Also:
Constant Field Values

TRANSPARENT_GREEN

public static final int TRANSPARENT_GREEN
Description of the Field

See Also:
Constant Field Values

TRANSPARENT_BLUE

public static final int TRANSPARENT_BLUE
Description of the Field

See Also:
Constant Field Values

TRANSPARENT_TO_REMOVE

public static final int TRANSPARENT_TO_REMOVE
Description of the Field


TRANSPARENT_PIXEL

public static final int TRANSPARENT_PIXEL
Description of the Field

Constructor Detail

ImageUtils

public ImageUtils()
Method Detail

getDisabledIcon

public static javax.swing.ImageIcon getDisabledIcon(javax.swing.ImageIcon anIcon)
Gets the DisabledIcon attribute of the ImageUtils class

Parameters:
anIcon - Description of Parameter
Returns:
The DisabledIcon value

getDisabledIcon

public static javax.swing.ImageIcon getDisabledIcon(java.awt.Image anImage)
Gets the DisabledIcon attribute of the ImageUtils class

Parameters:
anImage - Description of Parameter
Returns:
The DisabledIcon value

getDisabledImage

public static java.awt.Image getDisabledImage(java.awt.Image anImage)
Gets the DisabledImage attribute of the ImageUtils class

Parameters:
anImage - Description of Parameter
Returns:
The DisabledImage value

filterImage

public static java.awt.Image filterImage(java.awt.image.RGBImageFilter filter,
                                         java.awt.Image image)
Description of the Method

Parameters:
filter - Description of Parameter
image - Description of Parameter
Returns:
Description of the Returned Value

rotateImage

public static java.awt.Image rotateImage(java.awt.Image anImage)
Description of the Method

Parameters:
anImage - Description of Parameter
Returns:
Description of the Returned Value

rotateImage

public static java.awt.Image rotateImage(java.awt.Image anImage,
                                         double angle)
Description of the Method

Parameters:
anImage - Description of Parameter
angle - Description of Parameter
Returns:
Description of the Returned Value

convertBytesToImage

public static java.awt.Image convertBytesToImage(java.awt.Component c,
                                                 int[] pixels,
                                                 int w,
                                                 int h)
Description of the Method

Parameters:
c - Description of Parameter
pixels - Description of Parameter
w - Description of Parameter
h - Description of Parameter
Returns:
Description of the Returned Value

paint

public static void paint(java.awt.Component c,
                         java.awt.Graphics g,
                         java.awt.Image image)
Description of the Method

Parameters:
c - Description of Parameter
g - Description of Parameter
image - Description of Parameter

paint

public static void paint(java.awt.Component c,
                         java.awt.Graphics g,
                         java.awt.Image image,
                         int paintType)
Description of the Method

Parameters:
c - Description of Parameter
g - Description of Parameter
image - Description of Parameter
paintType - Description of Parameter

paint

public static void paint(java.awt.Component c,
                         java.awt.Graphics g,
                         java.awt.Image image,
                         boolean alignWithParent)
Description of the Method

Parameters:
c - Description of Parameter
g - Description of Parameter
image - Description of Parameter
alignWithParent - Description of Parameter

paint

public static void paint(java.awt.Component c,
                         java.awt.Graphics g,
                         java.awt.Image image,
                         boolean alignWithParent,
                         int paintType)
Description of the Method

Parameters:
c - Description of Parameter
g - Description of Parameter
image - Description of Parameter
alignWithParent - Description of Parameter
paintType - Description of Parameter

paint

public static void paint(java.awt.Component c,
                         java.awt.Graphics g,
                         java.awt.Image image,
                         int x,
                         int y,
                         int width,
                         int height)
Description of the Method

Parameters:
c - Description of Parameter
g - Description of Parameter
image - Description of Parameter
x - Description of Parameter
y - Description of Parameter
width - Description of Parameter
height - Description of Parameter

paint

public static void paint(java.awt.Component c,
                         java.awt.Graphics g,
                         java.awt.Image image,
                         int x,
                         int y,
                         int width,
                         int height,
                         int paintType)
Description of the Method

Parameters:
c - Description of Parameter
g - Description of Parameter
image - Description of Parameter
x - Description of Parameter
y - Description of Parameter
width - Description of Parameter
height - Description of Parameter
paintType - Description of Parameter

paint

public static void paint(java.awt.Component c,
                         java.awt.Graphics g,
                         java.awt.Image image,
                         int x,
                         int y,
                         int width,
                         int height,
                         boolean alignWithParent,
                         int paintType)
Description of the Method

Parameters:
c - Description of Parameter
g - Description of Parameter
image - Description of Parameter
x - Description of Parameter
y - Description of Parameter
width - Description of Parameter
height - Description of Parameter
alignWithParent - Description of Parameter
paintType - Description of Parameter

paintWindow

public static void paintWindow(java.awt.Component c,
                               java.awt.Graphics g,
                               java.awt.Image image,
                               int x,
                               int y,
                               int width,
                               int height,
                               int windowX,
                               int windowY,
                               int windowWidth,
                               int windowsHeight,
                               boolean alignWithParent,
                               int paintType)

paintTile

public static void paintTile(java.awt.Component component,
                             java.awt.Graphics g,
                             java.awt.Image image,
                             int x,
                             int y,
                             int width,
                             int height)
Description of the Method

Parameters:
component - Description of Parameter
g - Description of Parameter
image - Description of Parameter
x - Description of Parameter
y - Description of Parameter
width - Description of Parameter
height - Description of Parameter

transparent

public static java.awt.Image transparent(java.awt.Image image)
Description of the Method

Parameters:
image - Description of Parameter
Returns:
Description of the Returned Value

grab

public static java.awt.Image grab(java.awt.Image image,
                                  int x,
                                  int y,
                                  int width,
                                  int height)
Description of the Method

Parameters:
image - Description of Parameter
x - Description of Parameter
y - Description of Parameter
width - Description of Parameter
height - Description of Parameter
Returns:
Description of the Returned Value

buildTile

public static java.awt.Image buildTile(java.awt.Image image,
                                       int factor)
Description of the Method

Parameters:
image - Description of Parameter
factor - Description of Parameter
Returns:
Description of the Returned Value

toBufferedImage

public static java.awt.image.BufferedImage toBufferedImage(java.awt.Image image)
Description of the Method

Parameters:
image - Description of Parameter
Returns:
Description of the Returned Value

flipHorizontally

public static java.awt.Image flipHorizontally(java.awt.Image image)
Description of the Method

Parameters:
image - Description of Parameter
Returns:
Description of the Returned Value

rotateLeft

public static java.awt.Image rotateLeft(java.awt.Image anImage)
Description of the Method

Parameters:
anImage - Description of Parameter
Returns:
Description of the Returned Value

rotateRight

public static java.awt.Image rotateRight(java.awt.Image anImage)