Class reg_mod

Class reg_mod

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----java.awt.Window
                           |
                           +----java.awt.Frame
                                   |
                                   +----reg_mod

class reg_mod
extends Frame
implements Runnable
Reg_mod extends the Frame class in order to create a top level window with a title. The runnable interface allows reg_mod to run without subclassing thread by instantiating a thread instance and passing itself in as the target.

Variable Index

 o next_time
next_time is used to create a time delta to compare against rktime
 o raw_back
raw_back is the accumulator back pressure created by the Acc Back + and - buttons it is clipped between 2.5 and 100 and initialized to zero
 o rktime
rktime is displayed on the screen as "Time", it is incremented by DT2 for each integration step and is used as a comparator to update the screen after a redraw

Constructor Index

 o reg_mod()
reg_mod()

Method Index

 o handleEvent(Event)
Window,menu,and button handling.
 o init()
Creates the menu bar and control buttons and adds them to the window.
 o integration()
Integral step time of 15 microseconds
 o paint(Graphics)
Paint the window graphics.
 o run()
Integrate while SS1 is on
 o start()
Start Integral
 o stop()
Stop Integral
 o update(Graphics)
Use double buffering to prevent flickering images.

Variables

 o rktime
  public double rktime
rktime is displayed on the screen as "Time", it is incremented by DT2 for each integration step and is used as a comparator to update the screen after a redraw
 o next_time
  public double next_time
next_time is used to create a time delta to compare against rktime
 o raw_back
  public double raw_back
raw_back is the accumulator back pressure created by the Acc Back + and - buttons it is clipped between 2.5 and 100 and initialized to zero

Constructors

 o reg_mod
  public reg_mod()
reg_mod()

Methods

 o init
  public void init()
Creates the menu bar and control buttons and adds them to the window. Initializes all values to zero.
 o integration
  public void integration()
Integral step time of 15 microseconds
 o run
  public void run()
Integrate while SS1 is on
 o start
  public void start()
Start Integral
 o stop
  public void stop()
Stop Integral
 o update
  public final void update(Graphics g)
Use double buffering to prevent flickering images.
Overrides:
update in class Component
 o paint
  public void paint(Graphics g)
Paint the window graphics. If help is pressed in the menu then also paint valvebody component descriptions.
Overrides:
paint in class Component
 o handleEvent
  public boolean handleEvent(Event event)
Window,menu,and button handling. If the window is closed clean up. If New Graph is selected in the menu then open graph window. If help is selected in the menu then open help window. If exit is selected in the menu clean up and close window.
Overrides:
handleEvent in class Component