Tracker.java
Go to the documentation of this file.00001 package theba.core;
00002
00003 import java.awt.Graphics;
00004 import java.io.FileNotFoundException;
00005 import java.io.FileOutputStream;
00006 import java.io.PrintStream;
00007
00008 import theba.core.gui.ThebaGUI;
00009 import theba.core.math.Point3D;
00010
00011
00019 public abstract class Tracker {
00020 protected ThebaGUI control;
00021
00022 protected boolean keepTracking = false;
00023
00024 protected PrintStream log = null;
00025
00026 protected boolean paused = false;
00027
00033 public Tracker(ThebaGUI f) {
00034 this.control = f;
00035 }
00036
00042 public short getCurrentId() {
00043 return 0;
00044 }
00045
00052 public void log(String line) {
00053 if (log == null) {
00054 try {
00055 log = new PrintStream(new FileOutputStream("log.txt"));
00056 } catch (FileNotFoundException e1) {
00057 e1.printStackTrace();
00058 }
00059 }
00060 if (log != null)
00061 log.println(line);
00062 }
00063
00068 public abstract void mouseClicked(Point3D point3D);
00069
00080 public void paint(Graphics g, int selectedSlice) {
00081 }
00082
00088 public void pause(boolean var) {
00089 paused = var;
00090 }
00091
00095 public abstract void reset();
00096
00102 public abstract void setup();
00103
00108 public abstract void stop();
00109
00113 public abstract void track();
00114 }