de.htwdd.rosenkoenig.util
Class Graphics

java.lang.Object
  extended by de.htwdd.rosenkoenig.util.Graphics

public class Graphics
extends java.lang.Object

Utility class for image processing.


Field Summary
private static int PERCENTAGE
          default brightening percentage, 20%.
 
Constructor Summary
Graphics()
           
 
Method Summary
static java.awt.Image cloneImage(java.awt.Image sourceImage, java.awt.image.ImageFilter filter)
          Creates a copy of the given images.
static java.awt.Image createColorizedImage(java.awt.Image image)
          Creates a "colorized" copy of the given image.
static java.awt.Image createColorizedImage(java.awt.Image image, int mask)
          Creates a "colorized" copy of the given image.
static java.awt.Image createDisabledImage(java.awt.Image image)
          Creates a greyed and brightened copy of the given image, using the default brightening percentage of 20%.
static java.awt.Image createDisabledImage(java.awt.Image image, int percentage)
          Creates a greyed and brightened copy of the given image.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PERCENTAGE

private static final int PERCENTAGE
default brightening percentage, 20%.

See Also:
Constant Field Values
Constructor Detail

Graphics

public Graphics()
Method Detail

createDisabledImage

public static java.awt.Image createDisabledImage(java.awt.Image image)
Creates a greyed and brightened copy of the given image, using the default brightening percentage of 20%.

Parameters:
image - source image
Returns:
greyed copy

createDisabledImage

public static java.awt.Image createDisabledImage(java.awt.Image image,
                                                 int percentage)
Creates a greyed and brightened copy of the given image.

Parameters:
image - source image
percentage - brightening percentage
Returns:
greyed copy

cloneImage

public static java.awt.Image cloneImage(java.awt.Image sourceImage,
                                        java.awt.image.ImageFilter filter)
Creates a copy of the given images. If provided, an image filter is applied on the new image.

Parameters:
sourceImage - the image to be copied
filter - if not null, the copied image will be filtered
Returns:
the copied (and perhaps filtered) image

createColorizedImage

public static java.awt.Image createColorizedImage(java.awt.Image image)
Creates a "colorized" copy of the given image.

Parameters:
image - source image
Returns:
"colorized" copy

createColorizedImage

public static java.awt.Image createColorizedImage(java.awt.Image image,
                                                  int mask)
Creates a "colorized" copy of the given image.

Parameters:
image - source image
mask - color mask
Returns:
"colorized" copy