Quaqua 8.0 2011-10-02

ch.randelshofer.quaqua.util
Class ShadowFilter

java.lang.Object
  extended by java.awt.image.ImageFilter
      extended by java.awt.image.RGBImageFilter
          extended by ch.randelshofer.quaqua.util.ShadowFilter
All Implemented Interfaces:
java.awt.image.ImageConsumer, java.lang.Cloneable

public class ShadowFilter
extends java.awt.image.RGBImageFilter

ShadowFilter changes the color of an image to all black, and reduces the alpha channel to 50 percent. This is used by the Quaqua Look and Feel, to create a shadow image.

Version:
1.0 28 March 2005 Created.
Author:
Werner Randelshofer

Field Summary
 
Fields inherited from class java.awt.image.RGBImageFilter
canFilterIndexColorModel, newmodel, origmodel
 
Fields inherited from class java.awt.image.ImageFilter
consumer
 
Fields inherited from interface java.awt.image.ImageConsumer
COMPLETESCANLINES, IMAGEABORTED, IMAGEERROR, RANDOMPIXELORDER, SINGLEFRAME, SINGLEFRAMEDONE, SINGLEPASS, STATICIMAGEDONE, TOPDOWNLEFTRIGHT
 
Constructor Summary
ShadowFilter()
          Creates a new instance.
 
Method Summary
static java.awt.Image createShadowImage(java.awt.Image i)
          Creates a shadow image
 int filterRGB(int x, int y, int rgb)
           
 
Methods inherited from class java.awt.image.RGBImageFilter
filterIndexColorModel, filterRGBPixels, setColorModel, setPixels, setPixels, substituteColorModel
 
Methods inherited from class java.awt.image.ImageFilter
clone, getFilterInstance, imageComplete, resendTopDownLeftRight, setDimensions, setHints, setProperties
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ShadowFilter

public ShadowFilter()
Creates a new instance.

Method Detail

createShadowImage

public static java.awt.Image createShadowImage(java.awt.Image i)
Creates a shadow image


filterRGB

public int filterRGB(int x,
                     int y,
                     int rgb)
Specified by:
filterRGB in class java.awt.image.RGBImageFilter

Copyright 2003-2007 (c) Werner Randelshofer.
All rights reserved.