Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.arranger.jarl.trait.base
Class GradientColor  view GradientColor download GradientColor.java

java.lang.Object
  extended bycom.arranger.jarl.trait.base.GradientColor
All Implemented Interfaces:
java.awt.Paint, java.awt.Transparency

public class GradientColor
extends java.lang.Object
implements java.awt.Paint

GradientColor Note: This is heavily based on java.awt.GradientPaintContext & java.awt.GradientPaint


Nested Class Summary
protected static class GradientColor.GradientPaintContext
           
 
Field Summary
(package private) static java.lang.ref.WeakReference cached
           
(package private) static java.awt.image.ColorModel cachedModel
           
protected  Gradient m_gradient
           
 
Fields inherited from interface java.awt.Transparency
BITMASK, OPAQUE, TRANSLUCENT
 
Constructor Summary
GradientColor(Gradient gradient)
           
 
Method Summary
 java.awt.PaintContext createContext(java.awt.image.ColorModel cm, java.awt.Rectangle deviceBounds, java.awt.geom.Rectangle2D userBounds, java.awt.geom.AffineTransform xform, java.awt.RenderingHints hints)
          Create the context necessary for performing the color pattern generation.
(package private) static java.awt.image.Raster getCachedRaster(java.awt.image.ColorModel cm, int w, int h)
           
 Gradient getGradient()
           
 int getTransparency()
          Return the transparency type.
(package private) static void putCachedRaster(java.awt.image.ColorModel cm, java.awt.image.Raster ras)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_gradient

protected Gradient m_gradient

cachedModel

static java.awt.image.ColorModel cachedModel

cached

static java.lang.ref.WeakReference cached
Constructor Detail

GradientColor

public GradientColor(Gradient gradient)
Method Detail

createContext

public java.awt.PaintContext createContext(java.awt.image.ColorModel cm,
                                           java.awt.Rectangle deviceBounds,
                                           java.awt.geom.Rectangle2D userBounds,
                                           java.awt.geom.AffineTransform xform,
                                           java.awt.RenderingHints hints)
Description copied from interface: java.awt.Paint
Create the context necessary for performing the color pattern generation. The color model is a hint, and may be null for Classpath implementations; however some legacy code may throw a NullPointerException when passed a null. Leaving the color model null provides the most efficiency and leeway in the generation of the color pattern.

Specified by:
createContext in interface java.awt.Paint

getTransparency

public int getTransparency()
Description copied from interface: java.awt.Transparency
Return the transparency type.

Specified by:
getTransparency in interface java.awt.Transparency

getGradient

public Gradient getGradient()

getCachedRaster

static java.awt.image.Raster getCachedRaster(java.awt.image.ColorModel cm,
                                             int w,
                                             int h)

putCachedRaster

static void putCachedRaster(java.awt.image.ColorModel cm,
                            java.awt.image.Raster ras)