diff options
Diffstat (limited to 'src/cgeo/geocaching/mapinterfaces')
13 files changed, 126 insertions, 110 deletions
diff --git a/src/cgeo/geocaching/mapinterfaces/ActivityImpl.java b/src/cgeo/geocaching/mapinterfaces/ActivityImpl.java index a3e772c..e99c018 100644 --- a/src/cgeo/geocaching/mapinterfaces/ActivityImpl.java +++ b/src/cgeo/geocaching/mapinterfaces/ActivityImpl.java @@ -10,33 +10,34 @@ import android.view.View; /** * Defines the common functions of the provider-specific * MapActivity implementations. + * * @author rsudev - * + * */ public interface ActivityImpl { - Resources getResources(); + Resources getResources(); - Activity getActivity(); + Activity getActivity(); - void superOnCreate(Bundle savedInstanceState); + void superOnCreate(Bundle savedInstanceState); - void superOnResume(); + void superOnResume(); - void superOnDestroy(); + void superOnDestroy(); - void superOnStop(); + void superOnStop(); - void superOnPause(); + void superOnPause(); - boolean superOnCreateOptionsMenu(Menu menu); + boolean superOnCreateOptionsMenu(Menu menu); - boolean superOnPrepareOptionsMenu(Menu menu); + boolean superOnPrepareOptionsMenu(Menu menu); - boolean superOnOptionsItemSelected(MenuItem item); - - public abstract void goHome(View view); + boolean superOnOptionsItemSelected(MenuItem item); - public abstract void goManual(View view); + public abstract void goHome(View view); + + public abstract void goManual(View view); } diff --git a/src/cgeo/geocaching/mapinterfaces/CacheOverlayItemImpl.java b/src/cgeo/geocaching/mapinterfaces/CacheOverlayItemImpl.java index bdb8511..efe5c12 100644 --- a/src/cgeo/geocaching/mapinterfaces/CacheOverlayItemImpl.java +++ b/src/cgeo/geocaching/mapinterfaces/CacheOverlayItemImpl.java @@ -4,14 +4,15 @@ import cgeo.geocaching.cgCoord; /** * Covers the common functions of the provider-specific - * CacheOverlayItem implementations + * CacheOverlayItem implementations + * * @author rsudev - * + * */ public interface CacheOverlayItemImpl extends OverlayItemImpl { - public cgCoord getCoord(); - - public String getType(); + public cgCoord getCoord(); + + public String getType(); } diff --git a/src/cgeo/geocaching/mapinterfaces/GeoPointImpl.java b/src/cgeo/geocaching/mapinterfaces/GeoPointImpl.java index c6e80d4..b45b0fd 100644 --- a/src/cgeo/geocaching/mapinterfaces/GeoPointImpl.java +++ b/src/cgeo/geocaching/mapinterfaces/GeoPointImpl.java @@ -3,13 +3,14 @@ package cgeo.geocaching.mapinterfaces; /** * Defines the common functions of the provider-specific * GeoPoint implementations + * * @author rsudev - * + * */ public interface GeoPointImpl { - int getLatitudeE6(); + int getLatitudeE6(); - int getLongitudeE6(); + int getLongitudeE6(); } diff --git a/src/cgeo/geocaching/mapinterfaces/ItemizedOverlayImpl.java b/src/cgeo/geocaching/mapinterfaces/ItemizedOverlayImpl.java index 08e28ad..c4adcef 100644 --- a/src/cgeo/geocaching/mapinterfaces/ItemizedOverlayImpl.java +++ b/src/cgeo/geocaching/mapinterfaces/ItemizedOverlayImpl.java @@ -1,33 +1,35 @@ package cgeo.geocaching.mapinterfaces; +import cgeo.geocaching.mapcommon.ItemizedOverlayBase; + import android.graphics.Canvas; import android.graphics.Point; import android.graphics.drawable.Drawable; -import cgeo.geocaching.mapcommon.ItemizedOverlayBase; /** * Defines the common functions to access the provider-specific * ItemizedOverlay implementation + * * @author rsudev - * + * */ public interface ItemizedOverlayImpl extends OverlayImpl { - ItemizedOverlayBase getBase(); + ItemizedOverlayBase getBase(); - void superPopulate(); + void superPopulate(); - void superSetLastFocusedItemIndex(int i); + void superSetLastFocusedItemIndex(int i); - Drawable superBoundCenter(Drawable markerIn); + Drawable superBoundCenter(Drawable markerIn); - Drawable superBoundCenterBottom(Drawable marker); + Drawable superBoundCenterBottom(Drawable marker); - boolean superOnTap(int index); + boolean superOnTap(int index); - void superDraw(Canvas canvas, MapViewImpl mapView, boolean shadow); + void superDraw(Canvas canvas, MapViewImpl mapView, boolean shadow); - void superDrawOverlayBitmap(Canvas canvas, Point drawPosition, MapProjectionImpl projection, - byte drawZoomLevel); + void superDrawOverlayBitmap(Canvas canvas, Point drawPosition, MapProjectionImpl projection, + byte drawZoomLevel); } diff --git a/src/cgeo/geocaching/mapinterfaces/MapControllerImpl.java b/src/cgeo/geocaching/mapinterfaces/MapControllerImpl.java index dbdb955..18a4ab6 100644 --- a/src/cgeo/geocaching/mapinterfaces/MapControllerImpl.java +++ b/src/cgeo/geocaching/mapinterfaces/MapControllerImpl.java @@ -3,17 +3,18 @@ package cgeo.geocaching.mapinterfaces; /** * Defines the common functions of the provider-specific * MapController implementations + * * @author rsudev - * + * */ public interface MapControllerImpl { - void setZoom(int mapzoom); + void setZoom(int mapzoom); - void setCenter(GeoPointImpl geoPoint); + void setCenter(GeoPointImpl geoPoint); - void animateTo(GeoPointImpl geoPoint); + void animateTo(GeoPointImpl geoPoint); - void zoomToSpan(int latSpanE6, int lonSpanE6); + void zoomToSpan(int latSpanE6, int lonSpanE6); } diff --git a/src/cgeo/geocaching/mapinterfaces/MapFactory.java b/src/cgeo/geocaching/mapinterfaces/MapFactory.java index f43ceaf..26703c5 100644 --- a/src/cgeo/geocaching/mapinterfaces/MapFactory.java +++ b/src/cgeo/geocaching/mapinterfaces/MapFactory.java @@ -1,30 +1,32 @@ package cgeo.geocaching.mapinterfaces; -import android.app.Activity; -import android.content.Context; import cgeo.geocaching.cgCoord; import cgeo.geocaching.cgUser; import cgeo.geocaching.geopoint.Geopoint; +import android.app.Activity; +import android.content.Context; + /** * Defines functions of a factory class to get implementation specific objects * (GeoPoints, OverlayItems, ...) + * * @author rsudev - * + * */ public interface MapFactory { - public Class<?extends Activity> getMapClass(); + public Class<? extends Activity> getMapClass(); - public int getMapViewId(); + public int getMapViewId(); - public int getMapLayoutId(); + public int getMapLayoutId(); - public GeoPointImpl getGeoPointBase(final Geopoint coords); + public GeoPointImpl getGeoPointBase(final Geopoint coords); - CacheOverlayItemImpl getCacheOverlayItem(cgCoord coordinate, String type); + CacheOverlayItemImpl getCacheOverlayItem(cgCoord coordinate, String type); - public UserOverlayItemImpl getUserOverlayItemBase(Context context, - cgUser userOne); + public UserOverlayItemImpl getUserOverlayItemBase(Context context, + cgUser userOne); } diff --git a/src/cgeo/geocaching/mapinterfaces/MapProjectionImpl.java b/src/cgeo/geocaching/mapinterfaces/MapProjectionImpl.java index 10d36ee..cad29f7 100644 --- a/src/cgeo/geocaching/mapinterfaces/MapProjectionImpl.java +++ b/src/cgeo/geocaching/mapinterfaces/MapProjectionImpl.java @@ -5,13 +5,14 @@ import android.graphics.Point; /** * Defines common functions of the provider-specific * MapProjection implementations + * * @author rsudev - * + * */ public interface MapProjectionImpl { - - Object getImpl(); - void toPixels(GeoPointImpl leftGeo, Point left); + Object getImpl(); + + void toPixels(GeoPointImpl leftGeo, Point left); } diff --git a/src/cgeo/geocaching/mapinterfaces/MapViewImpl.java b/src/cgeo/geocaching/mapinterfaces/MapViewImpl.java index 4c23f63..9a1d4f8 100644 --- a/src/cgeo/geocaching/mapinterfaces/MapViewImpl.java +++ b/src/cgeo/geocaching/mapinterfaces/MapViewImpl.java @@ -1,70 +1,72 @@ package cgeo.geocaching.mapinterfaces; -import android.app.Activity; -import android.content.Context; -import android.graphics.drawable.Drawable; import cgeo.geocaching.cgSettings; import cgeo.geocaching.mapcommon.cgMapMyOverlay; import cgeo.geocaching.mapcommon.cgMapOverlay; import cgeo.geocaching.mapcommon.cgOverlayScale; import cgeo.geocaching.mapcommon.cgUsersOverlay; +import android.app.Activity; +import android.content.Context; +import android.graphics.drawable.Drawable; + /** * Defines common functions of the provider-specific * MapView implementations + * * @author rsudev - * + * */ public interface MapViewImpl { - void invalidate(); + void invalidate(); + + void setBuiltInZoomControls(boolean b); + + void displayZoomControls(boolean b); - void setBuiltInZoomControls(boolean b); + void preLoad(); - void displayZoomControls(boolean b); + void clearOverlays(); - void preLoad(); + void addOverlay(OverlayImpl ovl); - void clearOverlays(); - - void addOverlay(OverlayImpl ovl); + MapControllerImpl getMapController(); - MapControllerImpl getMapController(); + void destroyDrawingCache(); - void destroyDrawingCache(); + GeoPointImpl getMapViewCenter(); - GeoPointImpl getMapViewCenter(); + int getLatitudeSpan(); - int getLatitudeSpan(); + int getLongitudeSpan(); - int getLongitudeSpan(); + int getMapZoomLevel(); - int getMapZoomLevel(); + int getWidth(); - int getWidth(); + int getHeight(); - int getHeight(); + MapProjectionImpl getMapProjection(); - MapProjectionImpl getMapProjection(); + Context getContext(); - Context getContext(); + cgMapOverlay createAddMapOverlay(cgSettings settings, Context context, + Drawable drawable, boolean fromDetailIntent); - cgMapOverlay createAddMapOverlay(cgSettings settings, Context context, - Drawable drawable, boolean fromDetailIntent); + cgUsersOverlay createAddUsersOverlay(Context context, Drawable markerIn); - cgUsersOverlay createAddUsersOverlay(Context context, Drawable markerIn); - - cgOverlayScale createAddScaleOverlay(Activity activity, cgSettings settingsIn); + cgOverlayScale createAddScaleOverlay(Activity activity, cgSettings settingsIn); - cgMapMyOverlay createAddPositionOverlay(Activity activity, cgSettings settingsIn); + cgMapMyOverlay createAddPositionOverlay(Activity activity, cgSettings settingsIn); - boolean needsScaleOverlay(); + boolean needsScaleOverlay(); - void setBuiltinScale(boolean b); + void setBuiltinScale(boolean b); - void setMapSource(cgSettings settings); + void setMapSource(cgSettings settings); - void repaintRequired(OverlayBase overlay); + void repaintRequired(OverlayBase overlay); - void setOnDragListener(OnDragListener onDragListener); + void setOnDragListener(OnDragListener onDragListener); } diff --git a/src/cgeo/geocaching/mapinterfaces/OnDragListener.java b/src/cgeo/geocaching/mapinterfaces/OnDragListener.java index ebeb13f..04c4469 100644 --- a/src/cgeo/geocaching/mapinterfaces/OnDragListener.java +++ b/src/cgeo/geocaching/mapinterfaces/OnDragListener.java @@ -2,11 +2,12 @@ package cgeo.geocaching.mapinterfaces; /** * Notifies the parent class when a MapView has been dragged + * * @author cachapa - * + * */ public interface OnDragListener { - - public void onDrag(); - + + public void onDrag(); + } diff --git a/src/cgeo/geocaching/mapinterfaces/OverlayBase.java b/src/cgeo/geocaching/mapinterfaces/OverlayBase.java index 17a4d85..024ec40 100644 --- a/src/cgeo/geocaching/mapinterfaces/OverlayBase.java +++ b/src/cgeo/geocaching/mapinterfaces/OverlayBase.java @@ -5,16 +5,17 @@ import android.graphics.Point; /** * Defines the base functions of the provider-independent - * Overlay implementations + * Overlay implementations + * * @author rsudev - * + * */ public interface OverlayBase { - void draw(Canvas canvas, MapViewImpl mapView, boolean shadow); + void draw(Canvas canvas, MapViewImpl mapView, boolean shadow); - void drawOverlayBitmap(Canvas canvas, Point drawPosition, - MapProjectionImpl projection, byte drawZoomLevel); + void drawOverlayBitmap(Canvas canvas, Point drawPosition, + MapProjectionImpl projection, byte drawZoomLevel); - OverlayImpl getOverlayImpl(); + OverlayImpl getOverlayImpl(); } diff --git a/src/cgeo/geocaching/mapinterfaces/OverlayImpl.java b/src/cgeo/geocaching/mapinterfaces/OverlayImpl.java index ba45532..fe79c7e 100644 --- a/src/cgeo/geocaching/mapinterfaces/OverlayImpl.java +++ b/src/cgeo/geocaching/mapinterfaces/OverlayImpl.java @@ -3,18 +3,19 @@ package cgeo.geocaching.mapinterfaces; /** * Marker interface of the provider-specific * Overlay implementations + * * @author rsudev - * + * */ public interface OverlayImpl { - public enum overlayType { - PositionOverlay, - ScaleOverlay - } + public enum overlayType { + PositionOverlay, + ScaleOverlay + } - void lock(); + void lock(); + + void unlock(); - void unlock(); - } diff --git a/src/cgeo/geocaching/mapinterfaces/OverlayItemImpl.java b/src/cgeo/geocaching/mapinterfaces/OverlayItemImpl.java index 0f0297e..642cb8d 100644 --- a/src/cgeo/geocaching/mapinterfaces/OverlayItemImpl.java +++ b/src/cgeo/geocaching/mapinterfaces/OverlayItemImpl.java @@ -5,14 +5,15 @@ import android.graphics.drawable.Drawable; /** * Common functions of the provider-specific * OverlayItem implementations + * * @author rsudev - * + * */ public interface OverlayItemImpl { - public String getTitle(); - - public Drawable getMarker(int index); - - public void setMarker(Drawable markerIn); + public String getTitle(); + + public Drawable getMarker(int index); + + public void setMarker(Drawable markerIn); } diff --git a/src/cgeo/geocaching/mapinterfaces/UserOverlayItemImpl.java b/src/cgeo/geocaching/mapinterfaces/UserOverlayItemImpl.java index 6b1532d..48d6280 100644 --- a/src/cgeo/geocaching/mapinterfaces/UserOverlayItemImpl.java +++ b/src/cgeo/geocaching/mapinterfaces/UserOverlayItemImpl.java @@ -5,10 +5,11 @@ import cgeo.geocaching.cgUser; /** * Common functions of the provider-specific * UserOverlayItem implementations + * * @author rsudev - * + * */ public interface UserOverlayItemImpl extends OverlayItemImpl { - public cgUser getUser(); + public cgUser getUser(); } |
