|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectvitro.ColorScheme
public class ColorScheme
ColorSchemes collect a group of Colors together and provide an easy way to make Views customizable.
Field Summary | |
---|---|
Color |
background
|
Color |
inactive
|
Color |
outline
|
Color |
secondary
|
Map<Object,Color> |
uniqueColors
|
Constructor Summary | |
---|---|
ColorScheme()
Create a new ColorScheme with a default grayscale palette. |
|
ColorScheme(Color outline,
Color secondary,
Color background)
Create a new ColorScheme with specified theme colors. |
Method Summary | |
---|---|
void |
drawKey(Graphics g,
int x,
int y)
Draw a key representing the color mappings in this ColorScheme at a specified location onscreen. |
void |
setColor(Object o,
Color color)
Manually configure the key color for a specific object. |
Color |
unique(Object o)
Produce a unique, consistent color based on an object reference. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public Color outline
public Color secondary
public Color background
public Color inactive
public final Map<Object,Color> uniqueColors
Constructor Detail |
---|
public ColorScheme()
public ColorScheme(Color outline, Color secondary, Color background)
outline
- the color to use for drawing shapes and text.secondary
- the color to use for less important or prominent information.background
- the background color for the associated View.Method Detail |
---|
public void setColor(Object o, Color color)
o
- the object to associate with a color.color
- the color to assign to the object.public Color unique(Object o)
o
- the object to associate with a color.
public void drawKey(Graphics g, int x, int y)
g
- the destination Graphics surface.x
- the x-offset of the key, in pixels.y
- the y-offset of the key, in pixels.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |