simulation_MVC_Basic
Class Utility
java.lang.Object
simulation_MVC_Basic.Utility
public class Utility
- extends java.lang.Object
Method Summary |
static java.awt.Dimension |
getQuarterOfScreen()
This method determines the dimensions of the screen that is being used by
the VM and returns a dimension that is half the width and half the
height. |
static ShapeSprite |
getRandomShapeSprite(int width,
int height)
|
static int |
getRandomValue(int min,
int max)
This method returns a displacement value from the range [min,...,max]. |
static ShapeSprite |
getShapeSprite(int width,
int height)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
getRandomValue
public static int getRandomValue(int min,
int max)
- This method returns a displacement value from the range [min,...,max].
For instance, if the values -3, 3 are passed, then a value in the range
[-3,3] is returned. If min >= max, the value 0 is returned.
- Parameters:
min
- max
-
- Returns:
- as described above
getQuarterOfScreen
public static java.awt.Dimension getQuarterOfScreen()
- This method determines the dimensions of the screen that is being used by
the VM and returns a dimension that is half the width and half the
height.
- Returns:
- as described above
getShapeSprite
public static ShapeSprite getShapeSprite(int width,
int height)
getRandomShapeSprite
public static ShapeSprite getRandomShapeSprite(int width,
int height)