formatting

This commit is contained in:
Hannes Janetzek
2013-02-04 20:14:58 +01:00
parent 303e0cb4ce
commit f2b7a9fdf8
72 changed files with 403 additions and 240 deletions

View File

@@ -33,6 +33,7 @@ public class DefaultResourceProxyImpl implements ResourceProxy, MapViewConstants
/**
* Constructor.
*
* @param pContext
* Used to get the display metrics that are used for scaling the
* bitmaps returned by {@@link getBitmap}. Can be null,

View File

@@ -188,6 +188,7 @@ public class ItemizedIconOverlay<Item extends OverlayItem> extends ItemizedOverl
* When a content sensitive action is performed the content item needs to be
* identified. This method does that and then performs the assigned task on
* that item.
*
* @param event
* ...
* @param mapView
@@ -256,6 +257,7 @@ public class ItemizedIconOverlay<Item extends OverlayItem> extends ItemizedOverl
* When the item is touched one of these methods may be invoked depending on
* the type of touch. Each of them returns true if the event was completely
* handled.
*
* @param <T>
* ....
*/

View File

@@ -39,6 +39,7 @@ import android.opengl.Matrix;
* lowest index is drawn as last and therefore the 'topmost' marker. It also
* gets checked for onTap first. This class is generic, because you then you get
* your custom item-class passed back in onTap().
*
* @param <Item>
* ...
*/
@@ -220,6 +221,7 @@ public abstract class ItemizedOverlay<Item extends OverlayItem> extends Overlay
/**
* Method by which subclasses create the actual Items. This will only be
* called from populate() we'll cache them for later use.
*
* @param i
* ...
* @return ...
@@ -228,6 +230,7 @@ public abstract class ItemizedOverlay<Item extends OverlayItem> extends Overlay
/**
* The number of items in this overlay.
*
* @return ...
*/
public abstract int size();
@@ -265,7 +268,7 @@ public abstract class ItemizedOverlay<Item extends OverlayItem> extends Overlay
InternalItem pool = mItems;
mItems = null;
// flip order to draw in backward cycle, so the items
// flip order to draw in backward cycle, so the items
// with the least index are on the front.
for (int a = 0; a < size; a++) {
InternalItem it;
@@ -293,6 +296,7 @@ public abstract class ItemizedOverlay<Item extends OverlayItem> extends Overlay
/**
* Returns the Item at the given index.
*
* @param position
* the position of the item to return
* @return the Item of the given index.
@@ -321,6 +325,7 @@ public abstract class ItemizedOverlay<Item extends OverlayItem> extends Overlay
* Override to modify the way an item is hit tested. The hit point is
* relative to the marker's bounds. The default implementation just checks
* to see if the hit point is within the touchable bounds of the marker.
*
* @param item
* the item to hit test
* @param marker
@@ -340,6 +345,7 @@ public abstract class ItemizedOverlay<Item extends OverlayItem> extends Overlay
/**
* Set whether or not to draw the focused item. The default is to draw it,
* but some clients may prefer to draw the focused item themselves.
*
* @param drawFocusedItem
* ...
*/
@@ -354,6 +360,7 @@ public abstract class ItemizedOverlay<Item extends OverlayItem> extends Overlay
* move the map, so if the Item isn't already centered, the user may get
* confused. If the Item is not found, this is a no-op. You can also pass
* null to remove focus.
*
* @param item
* ...
*/
@@ -373,6 +380,7 @@ public abstract class ItemizedOverlay<Item extends OverlayItem> extends Overlay
* Adjusts a drawable's bounds so that (0,0) is a pixel in the location
* described by the hotspot parameter. Useful for "pin"-like graphics. For
* convenience, returns the same drawable that was passed in.
*
* @param marker
* the drawable to adjust
* @param hotspot
@@ -441,7 +449,7 @@ public abstract class ItemizedOverlay<Item extends OverlayItem> extends Overlay
// * <br/>
// * The focused item is always drawn last, which puts it visually on top of
// * the other items.<br/>
// *
// *
// * @param canvas
// * the Canvas upon which to draw. Note that this may already have
// * a transformation applied, so be sure to leave it the way you
@@ -478,7 +486,7 @@ public abstract class ItemizedOverlay<Item extends OverlayItem> extends Overlay
// /**
// * Draws an item located at the provided screen coordinates to the canvas.
// *
// *
// * @param canvas
// * what the item is drawn upon
// * @param item

View File

@@ -19,6 +19,7 @@ package org.oscim.overlay;
/**
* This class contains constants used by the map view.
*
* @author Nicolas Gramlich
*/
public interface MapViewConstants {

View File

@@ -36,6 +36,7 @@ import android.view.MotionEvent;
* {@link android.view.GestureDetector.SimpleOnGestureListener} and
* GestureDetector.OnGestureListener. The difference is there is an additional
* argument for the item.
*
* @author Nicolas Gramlich
*/
public abstract class Overlay implements OverlayConstants {
@@ -94,6 +95,7 @@ public abstract class Overlay implements OverlayConstants {
/**
* Sets whether the Overlay is marked to be enabled. This setting does
* nothing by default, but should be checked before calling draw().
*
* @param pEnabled
* ...
*/
@@ -104,6 +106,7 @@ public abstract class Overlay implements OverlayConstants {
/**
* Specifies if the Overlay is marked to be enabled. This should be checked
* before calling draw().
*
* @return true if the Overlay is marked enabled, false otherwise
*/
public boolean isEnabled() {
@@ -115,6 +118,7 @@ public abstract class Overlay implements OverlayConstants {
* IDs cannot be fixed at compile time. Overlays should use this method to
* obtain and store a menu id for each menu item at construction time. This
* will ensure that two overlays don't use the same id.
*
* @return an integer suitable to be used as a menu identifier
*/
protected final static int getSafeMenuId() {
@@ -125,6 +129,7 @@ public abstract class Overlay implements OverlayConstants {
* Similar to <see cref="getSafeMenuId" />, except this reserves a sequence
* of IDs of length <param name="count" />. The returned number is the
* starting index of that sequential list.
*
* @param count
* ....
* @return an integer suitable to be used as a menu identifier
@@ -142,7 +147,7 @@ public abstract class Overlay implements OverlayConstants {
// * with shadow=true, to lay down the shadow layer, and then again on all
// * overlays with shadow=false. Callers should check isEnabled() before
// * calling draw(). By default, draws nothing.
// *
// *
// * @param c
// * ...
// * @param osmv
@@ -159,6 +164,7 @@ public abstract class Overlay implements OverlayConstants {
/**
* Override to perform clean up of resources before shutdown. By default
* does nothing.
*
* @param mapView
* ...
*/
@@ -170,6 +176,7 @@ public abstract class Overlay implements OverlayConstants {
* Event, return <code>true</code>, otherwise return <code>false</code>. If
* you returned <code>true</code> none of the following Overlays or the
* underlying {@link MapView} has the chance to handle this event.
*
* @param keyCode
* ...
* @param event
@@ -187,6 +194,7 @@ public abstract class Overlay implements OverlayConstants {
* Event, return <code>true</code>, otherwise return <code>false</code>. If
* you returned <code>true</code> none of the following Overlays or the
* underlying {@link MapView} has the chance to handle this event.
*
* @param keyCode
* ...
* @param event
@@ -205,6 +213,7 @@ public abstract class Overlay implements OverlayConstants {
* Event, return <code>true</code>, otherwise return <code>false</code>. If
* you returned <code>true</code> none of the following Overlays or the
* underlying {@link MapView} has the chance to handle this event.
*
* @param e
* ...
* @param mapView
@@ -220,6 +229,7 @@ public abstract class Overlay implements OverlayConstants {
* Event, return <code>true</code>, otherwise return <code>false</code>. If
* you returned <code>true</code> none of the following Overlays or the
* underlying {@link MapView} has the chance to handle this event.
*
* @param e
* ...
* @param mapView
@@ -237,6 +247,7 @@ public abstract class Overlay implements OverlayConstants {
* Event, return <code>true</code>, otherwise return <code>false</code>. If
* you returned <code>true</code> none of the following Overlays or the
* underlying {@link MapView} has the chance to handle this event.
*
* @param e
* ...
* @param mapView
@@ -252,6 +263,7 @@ public abstract class Overlay implements OverlayConstants {
* Event, return <code>true</code>, otherwise return <code>false</code>. If
* you returned <code>true</code> none of the following Overlays or the
* underlying {@link MapView} has the chance to handle this event.
*
* @param e
* ...
* @param mapView
@@ -267,6 +279,7 @@ public abstract class Overlay implements OverlayConstants {
* Event, return <code>true</code>, otherwise return <code>false</code>. If
* you returned <code>true</code> none of the following Overlays or the
* underlying {@link MapView} has the chance to handle this event.
*
* @param e
* ...
* @param mapView
@@ -284,6 +297,7 @@ public abstract class Overlay implements OverlayConstants {
* Event, return <code>true</code>, otherwise return <code>false</code>. If
* you returned <code>true</code> none of the following Overlays or the
* underlying {@link MapView} has the chance to handle this event.
*
* @param e
* ...
* @param mapView
@@ -299,6 +313,7 @@ public abstract class Overlay implements OverlayConstants {
* Event, return <code>true</code>, otherwise return <code>false</code>. If
* you returned <code>true</code> none of the following Overlays or the
* underlying {@link MapView} has the chance to handle this event.
*
* @param pEvent1
* ...
* @param pEvent2
@@ -321,6 +336,7 @@ public abstract class Overlay implements OverlayConstants {
* Event, return <code>true</code>, otherwise return <code>false</code>. If
* you returned <code>true</code> none of the following Overlays or the
* underlying {@link MapView} has the chance to handle this event.
*
* @param e
* ...
* @param mapView
@@ -336,6 +352,7 @@ public abstract class Overlay implements OverlayConstants {
* Event, return <code>true</code>, otherwise return <code>false</code>. If
* you returned <code>true</code> none of the following Overlays or the
* underlying {@link MapView} has the chance to handle this event.
*
* @param pEvent1
* ...
* @param pEvent2
@@ -368,6 +385,7 @@ public abstract class Overlay implements OverlayConstants {
* Event, return <code>true</code>, otherwise return <code>false</code>. If
* you returned <code>true</code> none of the following Overlays or the
* underlying {@link MapView} has the chance to handle this event.
*
* @param e
* ...
* @param mapView
@@ -392,7 +410,7 @@ public abstract class Overlay implements OverlayConstants {
// * coordinates. You can find appropriate coordinates from latitude/longitude
// * using the MapView.getProjection() method on the MapView passed to you in
// * draw(Canvas, MapView, boolean).
// *
// *
// * @param canvas
// * ...
// * @param drawable
@@ -428,6 +446,7 @@ public abstract class Overlay implements OverlayConstants {
/**
* Checks to see if the given x and y are close enough to an item
* resulting in snapping the current action (e.g. zoom) to the item.
*
* @param x
* The x in screen coordinates.
* @param y

View File

@@ -24,6 +24,7 @@ import android.graphics.drawable.Drawable;
/**
* Immutable class describing a GeoPoint with a Title and a Description.
*
* @author Nicolas Gramlich
* @author Theodore Hong
* @author Fred Eisele
@@ -102,7 +103,8 @@ public class OverlayItem {
return mGeoPoint;
}
/* (copied from Google API docs) Returns the marker that should be used when
/*
* (copied from Google API docs) Returns the marker that should be used when
* drawing this item on the map. A null value means that the default marker
* should be drawn. Different markers can be returned for different states.
* The different markers can have different bounds. The default behavior is
@@ -110,7 +112,8 @@ public class OverlayItem {
* overlay item's marker, if it exists, and then return it.
* @param stateBitset The current state.
* @return The marker for the current state, or null if the default marker
* for the overlay should be used. */
* for the overlay should be used.
*/
public Drawable getMarker(final int stateBitset) {
// marker not specified
if (mMarker == null) {
@@ -141,12 +144,14 @@ public class OverlayItem {
// ===========================================================
// Methods
// ===========================================================
/* (copied from the Google API docs) Sets the state of a drawable to match a
/*
* (copied from the Google API docs) Sets the state of a drawable to match a
* given state bitset. This is done by converting the state bitset bits
* into
* a state set of R.attr.state_pressed, R.attr.state_selected and
* R.attr.state_focused attributes, and then calling {@link
* Drawable.setState(int[])}. */
* Drawable.setState(int[])}.
*/
public static void setState(final Drawable drawable, final int stateBitset) {
final int[] states = new int[3];
int index = 0;

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012, osmdroid: Viesturs Zarins, Martin Pearman
* Copyright 2012, osmdroid: Viesturs Zarins, Martin Pearman
* Copyright 2012, Hannes Janetzek
*
* This program is free software: you can redistribute it and/or modify it under the
@@ -192,6 +192,7 @@ public class PathOverlay extends Overlay {
/**
* Draw a great circle. Calculate a point for every 100km along the path.
*
* @param startPoint
* start point of the great circle
* @param endPoint
@@ -212,6 +213,7 @@ public class PathOverlay extends Overlay {
/**
* Draw a great circle.
*
* @param startPoint
* start point of the great circle
* @param endPoint

View File

@@ -53,6 +53,7 @@ public interface ResourceProxy {
/**
* Use a string resource as a format definition, and format using the
* supplied format arguments.
*
* @param pResId
* ...
* @param formatArgs
@@ -65,6 +66,7 @@ public interface ResourceProxy {
/**
* Get a bitmap as a {@link Drawable}
*
* @param pResId
* ...
* @return ...
@@ -73,6 +75,7 @@ public interface ResourceProxy {
/**
* Gets the density from the current screen's DisplayMetrics
*
* @return the screen's density
*/
float getDisplayMetricsDensity();