Class edu.cornell.lassp.houle.HysSym.HysControlBar
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class edu.cornell.lassp.houle.HysSym.HysControlBar

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Canvas
                   |
                   +----edu.cornell.lassp.houle.HysSym.HysControlBar

public class HysControlBar
extends Canvas
implements XyConsumer, RunStopConsumer
HysControlBar controls a HysLattice simulation, and will likely be generalized into a general-purpose controler object. For an example of usage, see the applet hys.

Source code is available.

Version:
0.9a
Author:
Paul Houle (E-mail: ph18@cornell.edu)
See Also:
HysLattice, hys

Method Index

 o attachModel(HysLattice)
Attach a model to the control bar.
 o mouseUp(Event, int, int)
 o paint(Graphics)
 o receiveRunStop(boolean)
 o receiveXy(double, double)
 o setRange(double, double)
Set the range of the control bar.
 o takeControl(boolean)
Tell the Control Bar to enable or disable control over the simulation.
 o update(Graphics)

Methods

 o setRange
  public void setRange(double x1,
                       double x2)
Set the range of the control bar.
Parameters:
x1 - lower limit of range
x2 - upper limit of range
 o takeControl
  public void takeControl(boolean b)
Tell the Control Bar to enable or disable control over the simulation.
Parameters:
b - true to take control, false to relinquish control.
 o attachModel
  public void attachModel(HysLattice l)
Attach a model to the control bar. attachModel() tells the control bar which lattice to control, but does not currently tell the HysLattice to register the control bar as an information consumer.
Parameters:
l - the HysLattice to attach.
 o receiveXy
  public void receiveXy(double x,
                        double y)
See Also:
XyConsumer
 o receiveRunStop
  public void receiveRunStop(boolean rs)
See Also:
RunStopConsumer
 o mouseUp
  public boolean mouseUp(Event evt,
                         int x,
                         int y)
Overrides:
mouseUp in class Component
 o paint
  public void paint(Graphics g)
Overrides:
paint in class Canvas
 o update
  public void update(Graphics g)
Overrides:
update in class Component

All Packages  Class Hierarchy  This Package  Previous  Next  Index