altoslib: More frobbing with new map bits
authorKeith Packard <keithp@keithp.com>
Tue, 26 May 2015 03:33:28 +0000 (20:33 -0700)
committerKeith Packard <keithp@keithp.com>
Tue, 26 May 2015 03:33:28 +0000 (20:33 -0700)
Signed-off-by: Keith Packard <keithp@keithp.com>
altoslib/AltosMapTile.java
altosui/AltosFlightUI.java
altosuilib/AltosFlightDisplay.java [deleted file]
altosuilib/AltosFontListener.java [deleted file]
altosuilib/AltosUIMapView.java
altosuilib/Makefile.am
configure.ac

index 923b7c6bf7127611c24d28dbb086ebf144eac29e..92b7a985540897ed9cbc13cedb2929e3e22f5bbc 100644 (file)
@@ -22,13 +22,13 @@ import java.util.*;
 
 public abstract class AltosMapTile implements AltosFontListener {
        AltosMapTileListener    listener;
-       AltosLatLon     upper_left, center;
-       int             px_size;
+       public AltosLatLon      upper_left, center;
+       public int              px_size;
        int             zoom;
        int             maptype;
-       AltosMapStore   store;
-       AltosMapCache   cache;
-       int             status;
+       public AltosMapStore    store;
+       public AltosMapCache    cache;
+       public int      status;
 
        static public final int success = 0;
        static public final int loading = 1;
index 424c57da91db18c36e972044a501610e932c27e4..6ef85a96cb54ce42b37a3f3c30f3eac4d392e406 100644 (file)
@@ -40,7 +40,7 @@ public class AltosFlightUI extends AltosUIFrame implements AltosFlightDisplay {
        AltosDescent    descent;
        AltosLanded     landed;
        AltosCompanionInfo      companion;
-       AltosUIMap      sitemap;
+       AltosUIMapNew      sitemap;
        boolean         has_map;
        boolean         has_companion;
        boolean         has_state;
@@ -319,7 +319,7 @@ public class AltosFlightUI extends AltosUIFrame implements AltosFlightDisplay {
                has_companion = false;
                has_state = false;
 
-               sitemap = new AltosUIMap();
+               sitemap = new AltosUIMapNew();
                displays.add(sitemap);
                has_map = false;
 
diff --git a/altosuilib/AltosFlightDisplay.java b/altosuilib/AltosFlightDisplay.java
deleted file mode 100644 (file)
index ac65c49..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Copyright © 2010 Keith Packard <keithp@keithp.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
- */
-
-package org.altusmetrum.altosuilib_6;
-
-import org.altusmetrum.altoslib_6.*;
-
-public interface AltosFlightDisplay extends AltosUnitsListener, AltosFontListener {
-       void reset();
-
-       void show(AltosState state, AltosListenerState listener_state);
-
-       String getName();
-}
diff --git a/altosuilib/AltosFontListener.java b/altosuilib/AltosFontListener.java
deleted file mode 100644 (file)
index 9362527..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * Copyright © 2011 Keith Packard <keithp@keithp.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
- */
-
-package org.altusmetrum.altosuilib_6;
-
-public interface AltosFontListener {
-       void font_size_changed(int font_size);
-}
index c8632b9962682c32c64b1c27f648cccc45213062..d110f803e2aa745aad9792628b04edc6eee7fcdc 100644 (file)
@@ -426,21 +426,6 @@ public class AltosUIMapView extends Component implements MouseMotionListener, Mo
        }
 
        public void paint(Graphics g) {
-               VolatileImage   back_buffer = create_back_buffer();
-               do {
-                       GraphicsConfiguration gc = getGraphicsConfiguration();
-                       int code = back_buffer.validate(gc);
-                       if (code == VolatileImage.IMAGE_INCOMPATIBLE)
-                               back_buffer = create_back_buffer();
-
-                       Graphics g_back = back_buffer.getGraphics();
-                       g_back.setClip(g.getClip());
-                       do_paint(g_back);
-                       g_back.dispose();
-
-                       g.drawImage(back_buffer, 0, 0, this);
-               } while (back_buffer.contentsLost());
-               back_buffer.flush();
        }
 
        public void update(Graphics g) {
index d51da91de03f636cd81f9539804bcdee0cb42f64..30d003e9a2e23156a05151c2691286638348a973 100644 (file)
@@ -12,8 +12,6 @@ altosuilib_JAVA = \
        GrabNDrag.java \
        AltosDevice.java \
        AltosDeviceDialog.java \
-       AltosFlightDisplay.java \
-       AltosFontListener.java \
        AltosPositionListener.java \
        AltosUIConfigure.java \
        AltosUIAxis.java \
@@ -61,6 +59,7 @@ altosuilib_JAVA = \
        AltosBTManage.java \
        AltosBTKnown.java \
        AltosUIMap.java \
+       AltosUIMapNew.java \
        AltosUIMapView.java \
        AltosUIMapLine.java \
        AltosUIMapMark.java \
@@ -84,6 +83,7 @@ altosuilib_JAVA = \
        AltosUIFreqList.java \
        AltosUITelemetryList.java \
        AltosUIRateList.java \
+       AltosUIImage.java \
        OSXAdapter.java
 
 JAR=altosuilib_$(ALTOSUILIB_VERSION).jar
index 171d1410b8d203b669a869947b558979940810d8..0564f4f870c62f9dcca3161f9c45bcf5614ae7c6 100644 (file)
@@ -29,8 +29,8 @@ AC_SUBST(VERSION_DASH)
 dnl ==========================================================================
 dnl Java library versions
 
-ALTOSUILIB_VERSION=6
-ALTOSLIB_VERSION=6
+ALTOSUILIB_VERSION=7
+ALTOSLIB_VERSION=7
 
 AC_SUBST(ALTOSLIB_VERSION)
 AC_DEFINE(ALTOSLIB_VERSION,$ALTOSLIB_VERSION,[Version of the AltosLib package])