Quaqua 7.4.2 2011-07-05

ch.randelshofer.quaqua.color
Class InactivatableColorUIResource

java.lang.Object
  extended by java.awt.Color
      extended by ch.randelshofer.quaqua.color.InactivatableColorUIResource
All Implemented Interfaces:
java.awt.Paint, java.awt.Transparency, java.io.Serializable, javax.swing.plaf.UIResource

public class InactivatableColorUIResource
extends java.awt.Color
implements javax.swing.plaf.UIResource

InactivatableColorUIResource is a color, that can be rendered using an an active state and an inactive state.

Version:
$Id: InactivatableColorUIResource.java 361 2010-11-21 11:19:20Z wrandelshofer $
Author:
Werner Randelshofer
See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.awt.Color
black, BLACK, blue, BLUE, cyan, CYAN, DARK_GRAY, darkGray, gray, GRAY, green, GREEN, LIGHT_GRAY, lightGray, magenta, MAGENTA, orange, ORANGE, pink, PINK, red, RED, white, WHITE, yellow, YELLOW
 
Fields inherited from interface java.awt.Transparency
BITMASK, OPAQUE, TRANSLUCENT
 
Constructor Summary
InactivatableColorUIResource(int activeRGB, int inactiveRGB)
          Creates a new instance.
InactivatableColorUIResource(int activeRGB, int inactiveRGB, boolean hasAlpha)
           
 
Method Summary
 java.awt.PaintContext createContext(java.awt.image.ColorModel cm, java.awt.Rectangle r, java.awt.geom.Rectangle2D r2d, java.awt.geom.AffineTransform xform, java.awt.RenderingHints hints)
           
 int getAlpha()
           
 int getRGB()
           
 int getTransparency()
           
 void setActive(boolean newValue)
           
 void setTransparent(boolean newValue)
           
 
Methods inherited from class java.awt.Color
brighter, darker, decode, equals, getBlue, getColor, getColor, getColor, getColorComponents, getColorComponents, getColorSpace, getComponents, getComponents, getGreen, getHSBColor, getRed, getRGBColorComponents, getRGBComponents, hashCode, HSBtoRGB, RGBtoHSB, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

InactivatableColorUIResource

public InactivatableColorUIResource(int activeRGB,
                                    int inactiveRGB)
Creates a new instance.


InactivatableColorUIResource

public InactivatableColorUIResource(int activeRGB,
                                    int inactiveRGB,
                                    boolean hasAlpha)
Method Detail

setActive

public void setActive(boolean newValue)

setTransparent

public void setTransparent(boolean newValue)

getTransparency

public int getTransparency()
Specified by:
getTransparency in interface java.awt.Transparency
Overrides:
getTransparency in class java.awt.Color

getAlpha

public int getAlpha()
Overrides:
getAlpha in class java.awt.Color

getRGB

public int getRGB()
Overrides:
getRGB in class java.awt.Color

createContext

public java.awt.PaintContext createContext(java.awt.image.ColorModel cm,
                                           java.awt.Rectangle r,
                                           java.awt.geom.Rectangle2D r2d,
                                           java.awt.geom.AffineTransform xform,
                                           java.awt.RenderingHints hints)
Specified by:
createContext in interface java.awt.Paint
Overrides:
createContext in class java.awt.Color

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