diff options
| author | SammysHP <sven@sammyshp.de> | 2011-09-14 21:42:32 +0200 |
|---|---|---|
| committer | SammysHP <sven@sammyshp.de> | 2011-09-14 21:42:32 +0200 |
| commit | 4f7c67407019de18fd53b640edb9682a346fbfef (patch) | |
| tree | 5a1d10843e8f5104e4202211f4792b5bfe830cb6 /src/cgeo/geocaching/cgDistanceView.java | |
| parent | 90e7bf968f6722b8df8b884f37617e7fc78901b5 (diff) | |
| download | cgeo-4f7c67407019de18fd53b640edb9682a346fbfef.zip cgeo-4f7c67407019de18fd53b640edb9682a346fbfef.tar.gz cgeo-4f7c67407019de18fd53b640edb9682a346fbfef.tar.bz2 | |
Formatting
Diffstat (limited to 'src/cgeo/geocaching/cgDistanceView.java')
| -rw-r--r-- | src/cgeo/geocaching/cgDistanceView.java | 71 |
1 files changed, 36 insertions, 35 deletions
diff --git a/src/cgeo/geocaching/cgDistanceView.java b/src/cgeo/geocaching/cgDistanceView.java index 9030bbb..ebdfe78 100644 --- a/src/cgeo/geocaching/cgDistanceView.java +++ b/src/cgeo/geocaching/cgDistanceView.java @@ -1,43 +1,44 @@ package cgeo.geocaching; +import cgeo.geocaching.geopoint.Geopoint; + import android.content.Context; import android.util.AttributeSet; import android.widget.TextView; -import cgeo.geocaching.geopoint.Geopoint; public class cgDistanceView extends TextView { - private cgBase base = null; - private Geopoint cacheCoords = null; - - public cgDistanceView(Context context) { - super(context); - } - - public cgDistanceView(Context context, AttributeSet attrs) { - super(context, attrs); - } - - public cgDistanceView(Context context, AttributeSet attrs, int defStyle) { - super(context, attrs, defStyle); - } - - public void setContent(cgBase baseIn, final Geopoint cacheCoordsIn) { - base = baseIn; - cacheCoords = cacheCoordsIn; - } - - public void update(final Geopoint coords) { - if (cacheCoords == null || coords == null || base == null) { - return; - } - setText(base.getHumanDistance(coords.distanceTo(cacheCoords))); - } - - public void setDistance(Float distance) { - setText("~" + base.getHumanDistance(distance)); - } - - public void clear() { - setText(null); - } + private cgBase base = null; + private Geopoint cacheCoords = null; + + public cgDistanceView(Context context) { + super(context); + } + + public cgDistanceView(Context context, AttributeSet attrs) { + super(context, attrs); + } + + public cgDistanceView(Context context, AttributeSet attrs, int defStyle) { + super(context, attrs, defStyle); + } + + public void setContent(cgBase baseIn, final Geopoint cacheCoordsIn) { + base = baseIn; + cacheCoords = cacheCoordsIn; + } + + public void update(final Geopoint coords) { + if (cacheCoords == null || coords == null || base == null) { + return; + } + setText(base.getHumanDistance(coords.distanceTo(cacheCoords))); + } + + public void setDistance(Float distance) { + setText("~" + base.getHumanDistance(distance)); + } + + public void clear() { + setText(null); + } }
\ No newline at end of file |
