|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.threerings.media.image.ColorPository.ClassRecord
public static class ColorPository.ClassRecord
Used to store information on a class of colors. These are public to simplify the XML parsing process, so pay them no mind.
| Field Summary | |
|---|---|
protected ColorPository.ColorRecord[] |
_starters
|
int |
classId
An integer identifier for this class. |
HashIntMap<ColorPository.ColorRecord> |
colors
A table of target colors included in this class. |
int |
defaultId
The default colorId to use for recoloration in this class, or 0 if there is no default defined. |
String |
name
The name of the color class. |
float[] |
range
Data identifying the range of colors around the source color that will be recolored when recoloring using this class. |
Color |
source
The source color to use when recoloring colors in this class. |
boolean |
starter
The default starting legality value for this color class. |
| Constructor Summary | |
|---|---|
ColorPository.ClassRecord()
|
|
| Method Summary | |
|---|---|
void |
addColor(ColorPository.ColorRecord record)
Used when parsing the color definitions. |
int |
compareTo(ColorPository.ClassRecord other)
|
int |
getColorId(String name)
Translates a color identified in string form into the id that should be used to look up its information. |
ColorPository.ColorRecord |
getDefault()
Get the default ColorRecord defined for this color class, or null if none. |
ColorPository.ColorRecord |
randomStartingColor()
Returns a random starting id from the entries in this class. |
ColorPository.ColorRecord |
randomStartingColor(Random rand)
Returns a random starting id from the entries in this class. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public int classId
public String name
public Color source
public float[] range
public boolean starter
ColorPository.ColorRecord.starter.
public int defaultId
public HashIntMap<ColorPository.ColorRecord> colors
protected transient ColorPository.ColorRecord[] _starters
| Constructor Detail |
|---|
public ColorPository.ClassRecord()
| Method Detail |
|---|
public void addColor(ColorPository.ColorRecord record)
public int getColorId(String name)
throws ParseException
ParseExceptionpublic ColorPository.ColorRecord randomStartingColor()
public ColorPository.ColorRecord randomStartingColor(Random rand)
public ColorPository.ColorRecord getDefault()
public int compareTo(ColorPository.ClassRecord other)
compareTo in interface Comparable<ColorPository.ClassRecord>public String toString()
toString in class Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||