ch.randelshofer.quaqua.color
Class TextureColor
java.lang.Object
java.awt.Color
ch.randelshofer.quaqua.color.PaintableColor
ch.randelshofer.quaqua.color.TextureColor
- All Implemented Interfaces:
- java.awt.Paint, java.awt.Transparency, java.io.Serializable
- Direct Known Subclasses:
- TextureColor.UIResource
public class TextureColor
- extends PaintableColor
This class used to pass TexturePaint's 'through' the Swing API, so that users
of our Look and Feel can work with TexturePaint's like with regular colors,
but Quaqua UI components will paint using the texture instead of with the
color.
- Version:
- $Id: TextureColor.java 104 2009-07-13 20:35:58Z wrandelshofer $
- Author:
- Werner Randelshofer
- See Also:
- Serialized Form
Field Summary |
protected java.awt.Image |
texture
|
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 |
TextureColor(int rgb)
Creates a new instance. |
TextureColor(int r,
int g,
int b)
|
TextureColor(int r,
int g,
int b,
java.awt.Image texture)
|
TextureColor(int r,
int g,
int b,
int a)
|
TextureColor(int r,
int g,
int b,
int a,
java.awt.Image texture)
|
TextureColor(int rgb,
java.lang.String location)
|
Method Summary |
java.awt.Paint |
getPaint(java.awt.Component c,
int x,
int y,
int width,
int height)
|
java.awt.image.BufferedImage |
getTexture()
|
Methods inherited from class java.awt.Color |
brighter, createContext, darker, decode, equals, getAlpha, getBlue, getColor, getColor, getColor, getColorComponents, getColorComponents, getColorSpace, getComponents, getComponents, getGreen, getHSBColor, getRed, getRGB, getRGBColorComponents, getRGBComponents, getTransparency, hashCode, HSBtoRGB, RGBtoHSB, toString |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
texture
protected java.awt.Image texture
TextureColor
public TextureColor(int rgb)
- Creates a new instance.
TextureColor
public TextureColor(int r,
int g,
int b)
TextureColor
public TextureColor(int r,
int g,
int b,
int a)
TextureColor
public TextureColor(int r,
int g,
int b,
java.awt.Image texture)
TextureColor
public TextureColor(int r,
int g,
int b,
int a,
java.awt.Image texture)
TextureColor
public TextureColor(int rgb,
java.lang.String location)
getTexture
public java.awt.image.BufferedImage getTexture()
getPaint
public java.awt.Paint getPaint(java.awt.Component c,
int x,
int y,
int width,
int height)
- Specified by:
getPaint
in class PaintableColor