this.series = null;
this.axis_index = 0;
- enable.register_shape_listener(this);
+ if (enable != null)
+ enable.register_shape_listener(this);
axes_added = new Hashtable<Integer,Boolean>();
public void mouseMoved(MouseEvent e) {
AltosMapPathPoint point = map.nearest(e.getPoint().x, e.getPoint().y);
- if (nearest_mark == null)
- nearest_mark = map.add_mark(point.gps.lat,
- point.gps.lon,
- point.state);
- else {
- nearest_mark.lat_lon.lat = point.gps.lat;
- nearest_mark.lat_lon.lon = point.gps.lon;
- nearest_mark.state = point.state;
- }
if (point != null) {
+ if (nearest_mark == null)
+ nearest_mark = map.add_mark(point.gps.lat,
+ point.gps.lon,
+ point.state);
+ else {
+ nearest_mark.lat_lon.lat = point.gps.lat;
+ nearest_mark.lat_lon.lon = point.gps.lon;
+ nearest_mark.state = point.state;
+ }
nearest_label.setText(String.format("%9.2f sec %s%s%s%s",
point.time,
pos(point.gps.lat,