Quaqua 8.0 2011-10-02

ch.randelshofer.quaqua.color
Class InactivatableColorUIResource

java.lang.Object
  extended by java.awt.Color
      extended by ch.randelshofer.quaqua.color.PaintableColor
          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 PaintableColor
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 399 2011-07-24 07:43:24Z 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(java.awt.Color active, java.awt.Color inactive)
           
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()
           
 java.awt.Paint getPaint(java.awt.Component c, int x, int y, int width, int height)
           
 int getRGB()
           
 int getTransparency()
           
 void setActive(boolean newValue)
           
 void setTransparent(boolean newValue)
           
 
Methods inherited from class ch.randelshofer.quaqua.color.PaintableColor
getPaint, getPaint, getPaint, getPaint, getRootPaneOffset
 
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)

InactivatableColorUIResource

public InactivatableColorUIResource(java.awt.Color active,
                                    java.awt.Color inactive)
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

getPaint

public java.awt.Paint getPaint(java.awt.Component c,
                               int x,
                               int y,
                               int width,
                               int height)
Specified by:
getPaint in class PaintableColor

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