|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.washington.biostr.sig.volume.colors.ColorScheme
edu.washington.biostr.sig.volume.colors.AdvancedColorScheme
public class AdvancedColorScheme
An AdvancedColorScheme allows the user to create a scheme that flows from one
color to another (and maybe to another, etc) by doing a piecewise
interpolation.
The most convenient way to use it is by calling the getWarm() or getCold()
methods.
| Field Summary |
|---|
| Fields inherited from class edu.washington.biostr.sig.volume.colors.ColorScheme |
|---|
alpha |
| Constructor Summary | |
|---|---|
AdvancedColorScheme()
Create a simple grayscale color scheme. |
|
AdvancedColorScheme(int numColors)
Interpolate across the given number of colors (first from black to color 1, then from from color 1 to color 2, etc.) |
|
| Method Summary | |
|---|---|
boolean |
equals(Object o)
|
static AdvancedColorScheme |
getCold(double alpha)
Generate a color scheme that flows from black to blue to cyan to white (it has a cold feel and a large level of granularity). |
static AdvancedColorScheme |
getColor(Color color,
String name)
Generate a color scheme for a single color. |
AlphaComposite |
getComposite()
|
int[] |
getRGB(double value)
Get an RGBA value as 4 ints {R, G, B, A} |
static AdvancedColorScheme |
getWarm(double alpha)
Generate a color scheme that flows from black to red to yellow to white (it has a warm feel and a large level of granularity). |
int |
hashCode()
|
void |
setColor(int i,
Color color,
double start,
double end)
Add a color that will be blended with the existing color. |
void |
setComposite(int composite)
Use one of AlphaComposite's values to mix this in with any existing colors on a palatte based on the rule and alpha level. |
String |
toString()
|
| Methods inherited from class edu.washington.biostr.sig.volume.colors.ColorScheme |
|---|
getAlpha, getAlphaComposite, getARGB, setAlpha, supportsAlpha |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public AdvancedColorScheme()
public AdvancedColorScheme(int numColors)
numColors - The number of colors to interpolate across.| Method Detail |
|---|
public void setComposite(int composite)
composite - The composite value from AlphaComposite
public void setColor(int i,
Color color,
double start,
double end)
i - The color index.color - The color.start - The starting value to blend this (between 0 and 1)end - The ending value to blend this (between 0 and 1)public int[] getRGB(double value)
ColorScheme
getRGB in class ColorSchemepublic String toString()
toString in class Objectpublic boolean equals(Object o)
equals in class Objectpublic AlphaComposite getComposite()
public static AdvancedColorScheme getWarm(double alpha)
alpha - The level of opacity
public static AdvancedColorScheme getCold(double alpha)
alpha - The level of opacity
public static AdvancedColorScheme getColor(Color color,
String name)
color - The desired colorname - The name of this scheme
public int hashCode()
hashCode in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||