|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecttesting.physicsEngine.guiTest.TestingUtilities
public class TestingUtilities
Utility class for guiTests. Contains many static methods that are shared by various testing code.
Constructor Summary | |
---|---|
TestingUtilities()
|
Method Summary | |
---|---|
static void |
drawPoints(java.awt.Graphics2D g,
java.util.List<Vector2f> intersection)
|
static void |
drawWorld(java.awt.Graphics2D g,
java.util.List<GeometricParameters> myParameters)
Calls drawWorld with defaultColor for everything. |
static void |
drawWorld(java.awt.Graphics2D g,
java.util.List<GeometricParameters> myParameters,
java.util.Map<GeometricParameters,java.awt.Color> parameterColor)
Render the underlying physical world. |
static void |
fillCircle(java.awt.Graphics2D g,
Vector2f point,
int radius,
java.awt.Color color)
Fill a given circle. |
static javax.swing.JFrame |
getJFrame(javax.swing.JPanel panel,
int width,
int height)
Obtain a JFrame window embedding the given panel, with given width and height. |
static void |
testIntersection(java.awt.Graphics2D g,
GeometricParameters a,
GeometricParameters b)
Test the intersection of two GeometricParameters, drawing the intersection points |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TestingUtilities()
Method Detail |
---|
public static void fillCircle(java.awt.Graphics2D g, Vector2f point, int radius, java.awt.Color color)
g
- point
- centroid of the circleradius
- color
- public static void testIntersection(java.awt.Graphics2D g, GeometricParameters a, GeometricParameters b)
g
- a
- b
- public static void drawPoints(java.awt.Graphics2D g, java.util.List<Vector2f> intersection)
intersection
- public static void drawWorld(java.awt.Graphics2D g, java.util.List<GeometricParameters> myParameters, java.util.Map<GeometricParameters,java.awt.Color> parameterColor)
g
- myParameters
- parameterColor
- public static void drawWorld(java.awt.Graphics2D g, java.util.List<GeometricParameters> myParameters)
g
- myParameters
- public static javax.swing.JFrame getJFrame(javax.swing.JPanel panel, int width, int height)
panel
- width
- height
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |