Package com.l2fprod.util
Class ImageUtils
- java.lang.Object
-
- 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
Fields Modifier and Type Field Description static int
PAINT_CENTERED
Description of the Fieldstatic int
PAINT_NONE
Description of the Fieldstatic int
PAINT_NORMAL
Description of the Fieldstatic int
PAINT_STRETCH
Description of the Fieldstatic int
PAINT_TILE
Description of the Fieldstatic java.awt.Component
producer
Description of the Fieldstatic int
TRANSPARENT_BLUE
Description of the Fieldstatic int
TRANSPARENT_GREEN
Description of the Fieldstatic int
TRANSPARENT_PIXEL
Description of the Fieldstatic int
TRANSPARENT_RED
Description of the Fieldstatic int
TRANSPARENT_TO_REMOVE
Description of the Field
-
Constructor Summary
Constructors Constructor Description ImageUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.awt.Image
buildTile(java.awt.Image image, int factor)
Description of the Methodstatic java.awt.Image
convertBytesToImage(java.awt.Component c, int[] pixels, int w, int h)
Description of the Methodstatic java.awt.Image
filterImage(java.awt.image.RGBImageFilter filter, java.awt.Image image)
Description of the Methodstatic java.awt.Image
flipHorizontally(java.awt.Image image)
Description of the Methodstatic javax.swing.ImageIcon
getDisabledIcon(java.awt.Image anImage)
Gets the DisabledIcon attribute of the ImageUtils classstatic javax.swing.ImageIcon
getDisabledIcon(javax.swing.ImageIcon anIcon)
Gets the DisabledIcon attribute of the ImageUtils classstatic java.awt.Image
getDisabledImage(java.awt.Image anImage)
Gets the DisabledImage attribute of the ImageUtils classstatic java.awt.Image
grab(java.awt.Image image, int x, int y, int width, int height)
Description of the Methodstatic void
paint(java.awt.Component c, java.awt.Graphics g, java.awt.Image image)
Description of the Methodstatic void
paint(java.awt.Component c, java.awt.Graphics g, java.awt.Image image, boolean alignWithParent)
Description of the Methodstatic void
paint(java.awt.Component c, java.awt.Graphics g, java.awt.Image image, boolean alignWithParent, int paintType)
Description of the Methodstatic void
paint(java.awt.Component c, java.awt.Graphics g, java.awt.Image image, int paintType)
Description of the Methodstatic 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 Methodstatic 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 Methodstatic 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 Methodstatic 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 Methodstatic 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 Methodstatic java.awt.Image
rotateImage(java.awt.Image anImage, double angle)
Description of the Methodstatic java.awt.Image
rotateLeft(java.awt.Image anImage)
Description of the Methodstatic java.awt.Image
rotateRight(java.awt.Image anImage)
static java.awt.image.BufferedImage
toBufferedImage(java.awt.Image image)
Description of the Methodstatic java.awt.Image
transparent(java.awt.Image image)
Description of the Method
-
-
-
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
-
-
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 Parameterimage
- 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 Parameterangle
- 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 Parameterpixels
- Description of Parameterw
- Description of Parameterh
- 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 Parameterg
- Description of Parameterimage
- 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 Parameterg
- Description of Parameterimage
- Description of ParameterpaintType
- 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 Parameterg
- Description of Parameterimage
- Description of ParameteralignWithParent
- 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 Parameterg
- Description of Parameterimage
- Description of ParameteralignWithParent
- Description of ParameterpaintType
- 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 Parameterg
- Description of Parameterimage
- Description of Parameterx
- Description of Parametery
- Description of Parameterwidth
- Description of Parameterheight
- 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 Parameterg
- Description of Parameterimage
- Description of Parameterx
- Description of Parametery
- Description of Parameterwidth
- Description of Parameterheight
- Description of ParameterpaintType
- 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 Parameterg
- Description of Parameterimage
- Description of Parameterx
- Description of Parametery
- Description of Parameterwidth
- Description of Parameterheight
- Description of ParameteralignWithParent
- Description of ParameterpaintType
- 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 Parameterg
- Description of Parameterimage
- Description of Parameterx
- Description of Parametery
- Description of Parameterwidth
- Description of Parameterheight
- 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 Parameterx
- Description of Parametery
- Description of Parameterwidth
- Description of Parameterheight
- 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 Parameterfactor
- 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)
-
-