|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--java.awt.Component
|
+--java.awt.Container
|
+--java.awt.Panel
|
+--java.applet.Applet
|
+--javax.swing.JApplet
|
+--Turntable
Turntable simulation applet.
| Nested Class Summary | |
class |
Turntable.FloatSlider
Slider that only has values between 0 and 1. |
class |
Turntable.TurntablePanel
Draws a diagram of the turntable. |
| Field Summary | |
private float |
angularMomentum
Angular momentum of system. |
private static float |
DELTA_TIME_PAUSE
Milliseconds that pass each simulation frame when it is paused. |
private static float |
DELTA_TIME_PLAY
Milliseconds that pass each simulation frame when it is playing. |
private float |
deltaTime
Milliseconds that pass each simulation frame. |
private static float |
FAN_HEIGHT
Height of fan ellipse. |
private static float |
FAN_WIDTH
Width of fan ellipse. |
private Turntable.FloatSlider |
fanAngleSlider
Fan angle slider. |
private float |
fanForce
Force exert by fan. |
private Turntable.FloatSlider |
fanForceSlider
Fan force slider. |
private float |
fanPositionX
X polar co-ordinate of fan on turntable. |
private float |
fanPositionY
Y polar co-ordinate of fan on turntable. |
private Turntable.FloatSlider |
fanRadiusSlider
Fan distance from turntable center slider. |
private static int |
FRAME_DELAY
Millisecond delay between each frame. |
private JTextArea |
informationText
Text area containing information about turntable. |
private static float |
MASS_MASS
Mass of point mass. |
private float |
massPositionX
X polar co-ordinate of mass on turntable. |
private float |
massPositionY
Y polar co-ordinate of mass on turntable. |
private float |
massRadius
Mass representation radius. |
private Turntable.FloatSlider |
massRadiusSlider
Mass distance from turntable center slider. |
private static float |
MAX_FAN_FORCE
Maximum force fan can exert. |
private static DecimalFormat |
numberFormat
Number format for displaying values. |
private float |
orientation
Orientation of the turntable. |
private static RenderingHints |
renderHints
Rendering hints to turn on antialiasing. |
private static String |
STRING_ALMOST_EQUAL
Almost equal symbol. |
private static String |
STRING_ANGULAR_ACCELERATION
Angular acceleration symbol. |
private static String |
STRING_ANGULAR_VELOCITY
Angular velocity symbol. |
private static String |
STRING_DEGREES
Degrees symbol. |
private static String |
STRING_DELTA
Delta symbol. |
private static String |
STRING_INVERSE
Inverse symbol. |
private static String |
STRING_INVERSE_SQUARED
Inverse squared symbol. |
private static String |
STRING_SQUARED
Squared symbol. |
private static String |
STRING_THETA
Theta symbol. |
private static String |
STRING_TIMES
Multiplication symbol. |
private static String |
STRING_TORQUE
Torque symbol. |
private Turntable.TurntablePanel |
turntableDiagram
Diagram of turntable. |
private float |
turntableMomentOfInteria
Moment of inertia of turntable. |
private float |
turntableRadius
Turntable radius. |
private Thread |
updateThread
Thread to update simulation. |
private String |
valueFanAngle
Value of fan angle. |
private String |
valueFanForce
Value of fan force. |
private String |
valueFanPosition
Value of fan position. |
private String |
valueMassPosition
Value of mass position. |
| Fields inherited from class javax.swing.JApplet |
accessibleContext, rootPane, rootPaneCheckingEnabled |
| Fields inherited from class java.applet.Applet |
|
| Fields inherited from class java.awt.Panel |
|
| Fields inherited from class java.awt.Container |
|
| Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
Turntable()
|
|
| Method Summary | |
void |
destroy()
Stops update thread |
static String |
format(float number)
Returns formatted number. |
String |
getAppletInfo()
Returns applet information |
void |
init()
Initialises applet |
void |
run()
Updates simulation |
void |
start()
Starts update thread |
void |
stop()
Stops update thread |
void |
updateSimulation()
Updates simulation by one step. |
void |
updateSliders()
Updates all slider labels with new values and sets simulation values. |
| Methods inherited from class javax.swing.JApplet |
addImpl, createRootPane, getAccessibleContext, getContentPane, getGlassPane, getJMenuBar, getLayeredPane, getRootPane, isRootPaneCheckingEnabled, paramString, remove, setContentPane, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, update |
| Methods inherited from class java.applet.Applet |
getAppletContext, getAudioClip, getAudioClip, getCodeBase, getDocumentBase, getImage, getImage, getLocale, getParameter, getParameterInfo, isActive, newAudioClip, play, play, resize, resize, setStub, showStatus |
| Methods inherited from class java.awt.Panel |
addNotify |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
private static RenderingHints renderHints
private static DecimalFormat numberFormat
private static int FRAME_DELAY
private static float DELTA_TIME_PLAY
private static float DELTA_TIME_PAUSE
private static String STRING_DELTA
private static String STRING_TORQUE
private static String STRING_ANGULAR_ACCELERATION
private static String STRING_ANGULAR_VELOCITY
private static String STRING_SQUARED
private static String STRING_INVERSE
private static String STRING_INVERSE_SQUARED
private static String STRING_THETA
private static String STRING_TIMES
private static String STRING_ALMOST_EQUAL
private static String STRING_DEGREES
private static float FAN_WIDTH
private static float FAN_HEIGHT
private static float MASS_MASS
private static float MAX_FAN_FORCE
private float turntableRadius
private float massRadius
private float fanForce
private float orientation
private float angularMomentum
private float turntableMomentOfInteria
private float deltaTime
private float fanPositionX
private float fanPositionY
private float massPositionX
private float massPositionY
private Turntable.TurntablePanel turntableDiagram
private Turntable.FloatSlider fanForceSlider
private Turntable.FloatSlider fanAngleSlider
private Turntable.FloatSlider fanRadiusSlider
private Turntable.FloatSlider massRadiusSlider
private JTextArea informationText
private String valueFanAngle
private String valueFanForce
private String valueMassPosition
private String valueFanPosition
private Thread updateThread
| Constructor Detail |
public Turntable()
| Method Detail |
public void init()
init in class Appletpublic static String format(float number)
public void updateSliders()
public void updateSimulation()
public void run()
run in interface Runnablepublic void start()
start in class Appletpublic void stop()
stop in class Appletpublic void destroy()
destroy in class Appletpublic String getAppletInfo()
getAppletInfo in class Applet
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||