diff options
author | Keith Packard <keithp@keithp.com> | 2015-05-25 20:10:37 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2015-05-25 20:10:37 -0700 |
commit | 00aca369c4070901e0400f291d5f269b5fb8015c (patch) | |
tree | f75b418df8d7cc6e8cbd47133f7fa1fce804035a /altoslib/AltosMapPath.java | |
parent | 6ca2c42061b3c0160bf0137c9cd65989c522b826 (diff) |
altoslib: Get new abstract mapping code compiling
Not useful yet, but at least it compiles now?
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'altoslib/AltosMapPath.java')
-rw-r--r-- | altoslib/AltosMapPath.java | 25 |
1 files changed, 4 insertions, 21 deletions
diff --git a/altoslib/AltosMapPath.java b/altoslib/AltosMapPath.java index 272a4316..e7224b57 100644 --- a/altoslib/AltosMapPath.java +++ b/altoslib/AltosMapPath.java @@ -22,34 +22,17 @@ import java.lang.Math; import java.util.*; import java.util.concurrent.*; -class PathPoint { - AltosLatLon lat_lon; - int state; - - public PathPoint(AltosLatLon lat_lon, int state) { - this.lat_lon = lat_lon; - this.state = state; - } - - public boolean equals(PathPoint other) { - if (other == null) - return false; - - return lat_lon.equals(other.lat_lon) && state == other.state; - } -} - public abstract class AltosMapPath { - LinkedList<PathPoint> points = new LinkedList<PathPoint>(); - PathPoint last_point = null; + public LinkedList<AltosMapPathPoint> points = new LinkedList<AltosMapPathPoint>(); + public AltosMapPathPoint last_point = null; static public int stroke_width = 6; public abstract void paint(AltosMapTransform t); public AltosMapRectangle add(double lat, double lon, int state) { - PathPoint point = new PathPoint(new AltosLatLon (lat, lon), state); + AltosMapPathPoint point = new AltosMapPathPoint(new AltosLatLon (lat, lon), state); AltosMapRectangle rect = null; if (!point.equals(last_point)) { @@ -62,6 +45,6 @@ public abstract class AltosMapPath { } public void clear () { - points = new LinkedList<PathPoint>(); + points = new LinkedList<AltosMapPathPoint>(); } } |