|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectColorKey
public class ColorKey
Constructor Summary | |
---|---|
ColorKey(java.util.List<java.lang.String> l)
Construct a color key for the specified list of labels. |
Method Summary | |
---|---|
void |
drawColorKey(GenDraw gd,
double x,
double y,
double w,
double h)
Draw a color key in the specified rectangle |
java.awt.Color |
getColor(int i)
Get the ith color. |
java.awt.Color |
getColor(java.lang.String s)
Gets color associated with string s. |
static void |
main(java.lang.String[] args)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ColorKey(java.util.List<java.lang.String> l)
l
- A list of labels for the colors.Method Detail |
---|
public java.awt.Color getColor(java.lang.String s)
s
- a string
public java.awt.Color getColor(int i)
i
-
public void drawColorKey(GenDraw gd, double x, double y, double w, double h)
gd
- canvas to draw on.(x,y)
- lower left corner of the rectanglew
- width of the rectangleh
- height of the rectanglepublic static void main(java.lang.String[] args)
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |