Package org.jbox2d.testbed.framework
Class TestbedModel
- java.lang.Object
-
- org.jbox2d.testbed.framework.TestbedModel
-
public class TestbedModel extends java.lang.ObjectModel for the testbed
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classTestbedModel.ListItemstatic interfaceTestbedModel.TestChangedListener
-
Field Summary
Fields Modifier and Type Field Description private floatcalculatedFpsprivate boolean[]codedKeysprivate intcurrTestIndexprivate DebugDrawdrawprivate boolean[]keysprivate java.util.Vector<TestbedModel.TestChangedListener>listenersprivate Vec2mouseprivate floatpanelWidthprivate TestbedTestrunningTestprivate TestbedSettingssettingsprivate TestbedTesttestprivate javax.swing.DefaultComboBoxModeltests
-
Constructor Summary
Constructors Constructor Description TestbedModel()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddCategory(java.lang.String argName)voidaddTest(TestbedTest argTest)voidaddTestChangeListener(TestbedModel.TestChangedListener argListener)voidclearTestList()floatgetCalculatedFps()boolean[]getCodedKeys()Gets the array of coded keys, index corresponding to the coded key value.javax.swing.DefaultComboBoxModelgetComboModel()TestbedTestgetCurrTest()intgetCurrTestIndex()DebugDrawgetDebugDraw()boolean[]getKeys()Gets the array of keys, index corresponding to the char value.Vec2getMouse()floatgetPanelWidth()TestbedTestgetRunningTest()TestbedSettingsgetSettings()TestbedTestgetTestAt(int argIndex)intgetTestsSize()booleanisTestAt(int argIndex)voidremoveTestChangeListener(TestbedModel.TestChangedListener argListener)voidsetCalculatedFps(float calculatedFps)voidsetCurrTestIndex(int argCurrTestIndex)voidsetDebugDraw(DebugDraw argDraw)voidsetMouse(Vec2 argMouse)voidsetPanelWidth(float panelWidth)voidsetRunningTest(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()
-
-