|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--tapestry.support.util.PointDice
A class for simulating a die with points within a given bounds on its sides instead of standard numbers, i.e., an object "rolled" to generate a random position.
Color
Constructor Summary | |
PointDice(java.awt.Rectangle bounds)
Creates a single die for creating random points. |
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.Point |
roll()
Returns the random "roll" of the die, a uniformly distributed point within the given bounds. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public PointDice(java.awt.Rectangle bounds)
Method Detail |
public java.awt.Point roll()
public int getNumRolls()
public int getNumSides()
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |