Package org.jbox2d.testbed.framework
Class TestbedModel
- java.lang.Object
-
- org.jbox2d.testbed.framework.TestbedModel
-
public class TestbedModel extends java.lang.Object
Model for the testbed
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
TestbedModel.ListItem
static interface
TestbedModel.TestChangedListener
-
Field Summary
Fields Modifier and Type Field Description private float
calculatedFps
private boolean[]
codedKeys
private int
currTestIndex
private DebugDraw
draw
private boolean[]
keys
private java.util.Vector<TestbedModel.TestChangedListener>
listeners
private Vec2
mouse
private float
panelWidth
private TestbedTest
runningTest
private TestbedSettings
settings
private TestbedTest
test
private javax.swing.DefaultComboBoxModel
tests
-
Constructor Summary
Constructors Constructor Description TestbedModel()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addCategory(java.lang.String argName)
void
addTest(TestbedTest argTest)
void
addTestChangeListener(TestbedModel.TestChangedListener argListener)
void
clearTestList()
float
getCalculatedFps()
boolean[]
getCodedKeys()
Gets the array of coded keys, index corresponding to the coded key value.javax.swing.DefaultComboBoxModel
getComboModel()
TestbedTest
getCurrTest()
int
getCurrTestIndex()
DebugDraw
getDebugDraw()
boolean[]
getKeys()
Gets the array of keys, index corresponding to the char value.Vec2
getMouse()
float
getPanelWidth()
TestbedTest
getRunningTest()
TestbedSettings
getSettings()
TestbedTest
getTestAt(int argIndex)
int
getTestsSize()
boolean
isTestAt(int argIndex)
void
removeTestChangeListener(TestbedModel.TestChangedListener argListener)
void
setCalculatedFps(float calculatedFps)
void
setCurrTestIndex(int argCurrTestIndex)
void
setDebugDraw(DebugDraw argDraw)
void
setMouse(Vec2 argMouse)
void
setPanelWidth(float panelWidth)
void
setRunningTest(TestbedTest runningTest)
-
-
-
Field Detail
-
tests
private final javax.swing.DefaultComboBoxModel tests
-
settings
private final TestbedSettings settings
-
draw
private DebugDraw draw
-
test
private TestbedTest test
-
mouse
private final Vec2 mouse
-
listeners
private final java.util.Vector<TestbedModel.TestChangedListener> listeners
-
keys
private final boolean[] keys
-
codedKeys
private final boolean[] codedKeys
-
calculatedFps
private float calculatedFps
-
panelWidth
private float panelWidth
-
currTestIndex
private int currTestIndex
-
runningTest
private TestbedTest runningTest
-
-
Method Detail
-
setCalculatedFps
public void setCalculatedFps(float calculatedFps)
-
getCalculatedFps
public float getCalculatedFps()
-
setPanelWidth
public void setPanelWidth(float panelWidth)
-
getPanelWidth
public float getPanelWidth()
-
setDebugDraw
public void setDebugDraw(DebugDraw argDraw)
-
getDebugDraw
public DebugDraw getDebugDraw()
-
getCurrTest
public TestbedTest getCurrTest()
-
getMouse
public Vec2 getMouse()
-
setMouse
public void setMouse(Vec2 argMouse)
-
getKeys
public boolean[] getKeys()
Gets the array of keys, index corresponding to the char value.- Returns:
-
getCodedKeys
public boolean[] getCodedKeys()
Gets the array of coded keys, index corresponding to the coded key value.- Returns:
-
setCurrTestIndex
public void setCurrTestIndex(int argCurrTestIndex)
-
getCurrTestIndex
public int getCurrTestIndex()
-
setRunningTest
public void setRunningTest(TestbedTest runningTest)
-
getRunningTest
public TestbedTest getRunningTest()
-
addTestChangeListener
public void addTestChangeListener(TestbedModel.TestChangedListener argListener)
-
removeTestChangeListener
public void removeTestChangeListener(TestbedModel.TestChangedListener argListener)
-
addTest
public void addTest(TestbedTest argTest)
-
addCategory
public void addCategory(java.lang.String argName)
-
getTestAt
public TestbedTest getTestAt(int argIndex)
-
isTestAt
public boolean isTestAt(int argIndex)
-
clearTestList
public void clearTestList()
-
getTestsSize
public int getTestsSize()
-
getComboModel
public javax.swing.DefaultComboBoxModel getComboModel()
-
getSettings
public TestbedSettings getSettings()
-
-