|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--tapestry.support.util.ColorDice
A class for simulating a die with colors on its sides instead of standard numbers, i.e., an object "rolled" to generate a random color.
Color
Constructor Summary | |
ColorDice()
Creates a single die for creating random colors. |
Method Summary | |
int |
getNumRolls()
Returns the number of times roll() has been called for a specific dice. |
int |
getNumSides()
Returns the number of sides for a specific dice. |
java.awt.Color |
roll()
Returns the random "roll" of the die, a uniformly distributed random color between 1 and number of possible colors. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public ColorDice()
Method Detail |
public java.awt.Color roll()
public int getNumRolls()
public int getNumSides()
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |