|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.unihalle.informatik.MiToBo.drawing.DynamicColorLUT
public class DynamicColorLUT
A color lookup table that generates colors dynamically and randomly for indices that do not exist.
Field Summary | |
---|---|
private int |
coffset
|
private java.util.HashMap<java.lang.Integer,java.lang.Integer> |
colors
|
private java.util.Random |
rand
|
Constructor Summary | |
---|---|
DynamicColorLUT()
Constructor with a (seeded) random generator and channel offset = 20. |
|
DynamicColorLUT(java.util.Random rand)
Constructor for a specific random generator and channel offset = 20.. |
|
DynamicColorLUT(java.util.Random rand,
int channeloffset)
Constructor for a specific random generator and a given channel offset |
Method Summary | |
---|---|
int |
getColor(int key)
Get the color for a given key. |
void |
setColor(int key,
int color)
Set the color for given key. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private int coffset
private java.util.HashMap<java.lang.Integer,java.lang.Integer> colors
private java.util.Random rand
Constructor Detail |
---|
public DynamicColorLUT()
public DynamicColorLUT(java.util.Random rand)
public DynamicColorLUT(java.util.Random rand, int channeloffset)
rand
- random generatorchanneloffset
- the minimum value of R, G and BMethod Detail |
---|
public int getColor(int key)
key
is not present.
key
- lookup table key (or index)
public void setColor(int key, int color)
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |