diff options
author | Tobrun Van Nuland <tobrun.van.nuland@gmail.com> | 2016-05-27 08:36:41 +0200 |
---|---|---|
committer | Brad Leege <bleege@gmail.com> | 2016-05-27 10:25:55 -0500 |
commit | d5cd1e1f9de83894a0d1928cad61a5902a715abb (patch) | |
tree | 6a389425712b81b657082385ab67cf2315bf4257 /platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/annotations/BaseMarkerViewOptions.java | |
parent | f75b4f15dd33be3bcd30ec0138f06b1441469987 (diff) | |
download | qtlocation-mapboxgl-d5cd1e1f9de83894a0d1928cad61a5902a715abb.tar.gz |
[android] #5113 - added javadoc to the MarkerView API
Diffstat (limited to 'platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/annotations/BaseMarkerViewOptions.java')
-rw-r--r-- | platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/annotations/BaseMarkerViewOptions.java | 152 |
1 files changed, 149 insertions, 3 deletions
diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/annotations/BaseMarkerViewOptions.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/annotations/BaseMarkerViewOptions.java index 892eee1806..0cd54fc0f0 100644 --- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/annotations/BaseMarkerViewOptions.java +++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/annotations/BaseMarkerViewOptions.java @@ -10,9 +10,10 @@ import com.mapbox.mapboxsdk.geometry.LatLng; * Abstract builder class for composing custom MarkerView objects. * <p> * Extending this class requires implementing Parceable interface. + * </p> * * @param <U> Type of the marker view to be composed - * @param <T> Type of the builder to be used for composing a custom Marker + * @param <T> Type of the builder to be used for composing */ public abstract class BaseMarkerViewOptions<U extends MarkerView, T extends BaseMarkerViewOptions<U, T>> implements Parcelable { @@ -30,120 +31,265 @@ public abstract class BaseMarkerViewOptions<U extends MarkerView, T extends Base protected int rotation; protected boolean visible = true; + /** + * Default constructor + */ public BaseMarkerViewOptions() { } + /** + * Set the geographical location of the MarkerView. + * + * @param position the location to position the MarkerView + * @return the object for which the method was called + */ public T position(@NonNull LatLng position) { this.position = position; return getThis(); } + /** + * Set the snippet of the MarkerView. + * + * @param snippet the snippet of the MarkerView + * @return the object for which the method was called + */ public T snippet(String snippet) { this.snippet = snippet; return getThis(); } + /** + * Set the title of the MarkerView. + * + * @param title the title of the MarkerView + * @return the object for which the method was called + */ public T title(String title) { this.title = title; return getThis(); } + /** + * Set the icon of the MarkerView. + * + * @param icon the icon of the MarkerView + * @return the object for which the method was called + */ public T icon(Icon icon) { this.icon = icon; return getThis(); } + /** + * Set the flat state of the MarkerView. + * + * @param flat the flat state of the MarkerView + * @return the object for which the method was called + */ public T flat(boolean flat) { this.flat = flat; return getThis(); } + /** + * Set the anchor of the MarkerView. + * + * @param u the u-value + * @param v the v-value + * @return the object for which the method was called + */ public T anchor(float u, float v) { this.anchorU = u; this.anchorV = v; return getThis(); } + /** + * Set the InfoWindow anchor of the MarkerView. + * + * @param u the u-value + * @param v the v-values + * @return the object for which the method was called + */ public T infoWindowAnchor(float u, float v) { this.infoWindowAnchorU = u; this.infoWindowAnchorV = v; return getThis(); } + /** + * Set the animator resource to be used when an MarkerView is selected. + * + * @param selectAnimRes the used animator resource + * @return the object for which the method was called + */ public T selectAnimatorResource(@AnimatorRes int selectAnimRes) { this.selectAnimRes = selectAnimRes; return getThis(); } + /** + * Set the animator resource to be used when an MarkerView is deselected. + * + * @param deselectAnimRes the used animator resource + * @return the object for which the method was called + */ public T deselectAnimatorResource(@AnimatorRes int deselectAnimRes) { this.deselectAnimRes = deselectAnimRes; return getThis(); } + /** + * Set the rotation of the MarkerView. + * + * @param rotation the rotation value + * @return the object for which the method was called + */ public T rotation(int rotation) { this.rotation = rotation; return getThis(); } - public T visible(boolean visible){ + /** + * Set the visibility state of the MarkerView. + * + * @param visible the visible state + * @return the object for which the method was calleds + */ + public T visible(boolean visible) { this.visible = visible; return getThis(); } + /** + * Get the geographical location of the MarkerView. + * + * @return the geographical location + */ public LatLng getPosition() { return position; } + /** + * Get the snippet of the MarkerView. + * + * @return the snippet + */ public String getSnippet() { return snippet; } + /** + * Get the title of the MarkerView. + * + * @return the title + */ public String getTitle() { return title; } + /** + * Get the icon of the MarkerView. + * + * @return the icon + */ public Icon getIcon() { return icon; } + /** + * Get the flat state of the MarkerView. + * + * @return the flat state + */ public boolean isFlat() { return flat; } + /** + * Get the u-value of the MarkerView anchor. + * + * @return the u-value + */ public float getAnchorU() { return anchorU; } + /** + * Get the v-value of the MarkerView anchor. + * + * @return the v-value + */ public float getAnchorV() { return anchorV; } + /** + * Get the u-value of the MarkerView InfoWindow anchor. + * + * @return the u-value + */ public float getInfoWindowAnchorU() { return infoWindowAnchorU; } + /** + * Get the v-value of the MarkerView InfoWindow anchor. + * + * @return the v-value + */ public float getInfoWindowAnchorV() { return infoWindowAnchorV; } + /** + * Get the animator resource used for selecting the MarkerView. + * + * @return the animator resource + */ public int getSelectAnimRes() { return selectAnimRes; } + /** + * Get the animator resource used for deselecting the MarkerView. + * + * @return the animator resource + */ public int getDeselectAnimRes() { return deselectAnimRes; } + /** + * Get the rotation of the MarkerView. + * + * @return the rotation value + */ public int getRotation() { return rotation; } + /** + * Get the visibility state of the MarkerView. + * + * @return the visibility state + */ public boolean isVisible() { return visible; } + /** + * Get the instance of the object for which this method was called. + * + * @return the object for which the this method was called + */ public abstract T getThis(); + /** + * Get the MarkerView. + * + * @return the MarkerView created from this builder + */ public abstract U getMarker(); - } |