All Packages Class Hierarchy This Package Previous Next Index
Interface crw.awt.CustomAWT
- public interface CustomAWT
- extends Runnable
The class that implements this interface acts as a Listener to the UpDown arrow class.
It is either a constantly running Runnable (Thread) object or
one that starts when pressed and stops when released.
The run() method should check on the state of UpDown
button using UpDown.upArrowPressed() and UpDown.downArrowPressed()
and increase/decrease a variable value.
- Version:
- 0.0
- Author:
- C.R.Wie
-
start()
- Should create and start a Thread when the UpDown arrow is pressed.
-
stop()
- Should stop the thread and set the reference to thread to null.
start
public abstract void start()
- Should create and start a Thread when the UpDown arrow is pressed.
Implementation should be like:
public void start() {
if (thread == null)
thread = new Thread(this);
thread.start();
}
Where, thread is an istance variable.
stop
public abstract void stop()
- Should stop the thread and set the reference to thread to null.
Implementation should be like:
public void stop() {
if (thread != null)
thread.stop();
thread = null;
}
All Packages Class Hierarchy This Package Previous Next Index