public void set_visible(boolean visible) {
FragmentTransaction ft = AltosDroid.fm.beginTransaction();
+ AltosDebug.debug("set visible %b %s\n", visible, tab_name());
if (visible) {
AltosState state = last_state;
AltosGreatCircle from_receiver = last_from_receiver;
return map_interface.height();
}
+ public void debug(String format, Object ... arguments) {
+ map_interface.debug(format, arguments);
+ }
+
public AltosPointInt floor(AltosPointDouble point) {
return new AltosPointInt ((int) Math.floor(point.x / AltosMap.px_size) * AltosMap.px_size,
(int) Math.floor(point.y / AltosMap.px_size) * AltosMap.px_size);
}
public void set_transform() {
+ debug("set_transform, centre is %s\n", centre);
if (centre != null) {
transform = new AltosMapTransform(width(), height(), zoom, centre);
repaint();
int dx = x - drag_start.x;
int dy = y - drag_start.y;
+ if (transform == null) {
+ debug("Transform not set in drag\n");
+ return;
+ }
+
AltosLatLon new_centre = transform.screen_lat_lon(new AltosPointInt(width() / 2 - dx, height() / 2 - dy));
centre(new_centre);
drag_start = new AltosPointInt(x, y);
public abstract void repaint(AltosRectangle damage);
public abstract void set_zoom_label(String label);
+
+ public abstract void debug(String format, Object ... arguments);
}
zoom_label.setText(label);
}
+ public void debug(String format, Object ... arguments) {
+ System.out.printf(format, arguments);
+ }
+
/* AltosFlightDisplay interface */
public void set_font() {