Class DoublePendul

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--java.awt.Panel
                    |
                    +--java.applet.Applet
                          |
                          +--DoublePendul

public class DoublePendul
extends java.applet.Applet
implements TimerCallback, java.awt.event.ActionListener

The main applet class. It draws and controls all buttons, panels and textfields. Besides that it communicates with the PhysCalcs class, the class that does all the physics.

See Also:
Serialized Form

Inner classes inherited from class java.awt.Component
java.awt.Component.AWTTreeLock
 
Fields inherited from class java.awt.Container
component, containerListener, layoutMgr, ncomponents
 
Fields inherited from class java.awt.Component
actionListenerK, adjustmentListenerK, appContext, background, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, componentListener, componentListenerK, componentOrientation, containerListenerK, cursor, dropTarget, enabled, eventMask, focusListener, focusListenerK, font, foreground, hasFocus, height, incRate, inputMethodListener, inputMethodListenerK, isInc, isPacked, itemListenerK, keyListener, keyListenerK, LEFT_ALIGNMENT, locale, LOCK, minSize, mouseListener, mouseListenerK, mouseMotionListener, mouseMotionListenerK, newEventsOnly, ownedWindowK, parent, peer, peerFont, popups, prefSize, RIGHT_ALIGNMENT, textListenerK, TOP_ALIGNMENT, valid, visible, width, windowListenerK, x, y
 
Constructor Summary
DoublePendul()
           
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent event)
          This subroutine is called by the JVM if a button is pressed or if a value changes in a textbox.
 void init()
          Routine that is called by the JVM after the construction of the Applet and before the screen is drawn.
 void readTextBoxes()
          Reads out all textboxes without forcing changes
 void readTextBoxes(boolean forceReset)
          Reads all values in the textboxes, compares them to current parameters and if something has changed it resets the simulation.
 void start()
          This subroutine is called by the JVM after all visual components are initialized and are placed on the screen.
 void tick()
          This subroutine is called by the timer object every 50 milliseconds.
 
Methods inherited from class java.applet.Applet
destroy, getAppletContext, getAppletInfo, getAudioClip, getAudioClip, getCodeBase, getDocumentBase, getImage, getImage, getLocale, getParameter, getParameterInfo, isActive, newAudioClip, play, play, resize, resize, setStub, showStatus, stop
 
Methods inherited from class java.awt.Panel
, addNotify, constructComponentName
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, applyOrientation, countComponents, deliverEvent, dispatchEventImpl, dispatchEventToSelf, doLayout, eventEnabled, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents_NoClientCode, getComponents, getCursorTarget, getInsets, getLayout, getMaximumSize, getMinimumSize, getMouseEventTarget, getPreferredSize, getWindow, insets, invalidate, invalidateTree, isAncestorOf, layout, lightweightPrint, list, list, locate, minimumSize, nextFocus, paint, paintComponents, paramString, postProcessKeyEvent, postsOldMouseEvents, preferredSize, preProcessKeyEvent, print, printComponents, processContainerEvent, processEvent, proxyEnableEvents, proxyRequestFocus, remove, remove, removeAll, removeContainerListener, removeNotify, setCursor, setFocusOwner, setFont, setLayout, transferFocus, update, updateCursor, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, addPropertyChangeListener, areInputMethodsEnabled, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont_NoClientCode, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getInputContext, getInputMethodRequests, getIntrinsicCursor, getLocation, getLocation, getLocationOnScreen, getName, getNativeContainer, getParent_NoClientCode, getParent, getPeer, getSize, getSize, getToolkit, getToolkitImpl, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isDisplayable, isDoubleBuffered, isEnabled, isEnabledImpl, isFocusTraversable, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, remove, removeComponentListener, removeFocusListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, setBackground, setBounds, setBounds, setComponentOrientation, setDropTarget, setEnabled, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DoublePendul

public DoublePendul()
Method Detail

init

public void init()
Routine that is called by the JVM after the construction of the Applet and before the screen is drawn.
Overrides:
init in class java.applet.Applet

start

public void start()
This subroutine is called by the JVM after all visual components are initialized and are placed on the screen. It initializes things that cannot be initialized before they are vissible on screen. (For example when you need to know the size of a canvas for initialisation purposes.
Overrides:
start in class java.applet.Applet

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent event)
This subroutine is called by the JVM if a button is pressed or if a value changes in a textbox. It deals with the changes and resets the simulation.
Specified by:
actionPerformed in interface java.awt.event.ActionListener
Parameters:
A - mouse click event or key event.

readTextBoxes

public void readTextBoxes()
Reads out all textboxes without forcing changes
See Also:
readTextBoxes(boolean)

readTextBoxes

public void readTextBoxes(boolean forceReset)
Reads all values in the textboxes, compares them to current parameters and if something has changed it resets the simulation.
Parameters:
forceReset - if true, always force a reset.

tick

public void tick()
This subroutine is called by the timer object every 50 milliseconds. It orders a redraw of the physical simulation.
Specified by:
tick in interface TimerCallback