Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Commit

Permalink
add missing public javadoc
Browse files Browse the repository at this point in the history
  • Loading branch information
tobrun committed Jun 20, 2017
1 parent 6ee1d0e commit 1d17f5a
Show file tree
Hide file tree
Showing 11 changed files with 351 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,32 @@ public class BubbleLayout extends LinearLayout {
private float strokeWidth;
private int strokeColor;

/**
* Creates an instance of bubble layout.
*
* @param context The context used to inflate this bubble layout
*/
public BubbleLayout(Context context) {
this(context, null, 0);
}

/**
* Creates an instance of bubble layout.
*
* @param context The context used to inflate this bubble layout
* @param attrs The attribute set to initialise this bubble layout from
*/
public BubbleLayout(Context context, AttributeSet attrs) {
this(context, attrs, 0);
}

/**
* Creates an instance of bubble layout.
*
* @param context The context used to inflate this bubble layout
* @param attrs The attribute set to initialise this bubble layout from
* @param defStyleAttr The default style to apply this bubble layout with
*/
public BubbleLayout(Context context, AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);

Expand Down Expand Up @@ -78,85 +96,173 @@ static float convertDpToPixel(float dp, Context context) {
return dp * (metrics.densityDpi / DisplayMetrics.DENSITY_DEFAULT);
}

/**
* Get the arrow direction.
*
* @return the arrow direction
*/
public ArrowDirection getArrowDirection() {
return arrowDirection;
}

/**
* Set the arrow direction.
*
* @param arrowDirection The direction of the arrow
* @return this
*/
public BubbleLayout setArrowDirection(ArrowDirection arrowDirection) {
resetPadding();
this.arrowDirection = arrowDirection;
initPadding();
return this;
}

/**
* Get the arrow width.
*
* @return the width of the arrow
*/
public float getArrowWidth() {
return arrowWidth;
}

/**
* Set the arrow width.
*
* @param arrowWidth The width of the arrow
* @return this
*/
public BubbleLayout setArrowWidth(float arrowWidth) {
resetPadding();
this.arrowWidth = arrowWidth;
initPadding();
return this;
}

/**
* Get the arrow height
*
* @return the height of the arrow
*/
public float getArrowHeight() {
return arrowHeight;
}

/**
* Set the arrow height.
*
* @param arrowHeight The height of the arrow
* @return this
*/
public BubbleLayout setArrowHeight(float arrowHeight) {
resetPadding();
this.arrowHeight = arrowHeight;
initPadding();
return this;
}

/**
* Get the arrow position.
*
* @return the arrow position
*/
public float getArrowPosition() {
return arrowPosition;
}

/**
* Get the arrow position.
*
* @param arrowPosition The arrow position
* @return this
*/
public BubbleLayout setArrowPosition(float arrowPosition) {
resetPadding();
this.arrowPosition = arrowPosition;
initPadding();
return this;
}

/**
* Get the corner radius
*
* @return the corner radius
*/
public float getCornersRadius() {
return cornersRadius;
}

/**
* Set the corner radius
*
* @param cornersRadius The corner radius
* @return this
*/
public BubbleLayout setCornersRadius(float cornersRadius) {
this.cornersRadius = cornersRadius;
requestLayout();
return this;
}

/**
* Get the bubble color.
*
* @return the bubble color
*/
public int getBubbleColor() {
return bubbleColor;
}

/**
* Set the bubble color.
*
* @param bubbleColor The buble color
* @return this
*/
public BubbleLayout setBubbleColor(int bubbleColor) {
this.bubbleColor = bubbleColor;
requestLayout();
return this;
}

/**
* Get stroke width.
*
* @return the stroke width
*/
public float getStrokeWidth() {
return strokeWidth;
}

/**
* Set the stroke width.
*
* @param strokeWidth The stroke width
* @return this
*/
public BubbleLayout setStrokeWidth(float strokeWidth) {
resetPadding();
this.strokeWidth = strokeWidth;
initPadding();
return this;
}

/**
* Get the stroke color.
*
* @return the stroke color
*/
public int getStrokeColor() {
return strokeColor;
}

/**
* Set the stroke color.
*
* @param strokeColor The stroke color
* @return this
*/
public BubbleLayout setStrokeColor(int strokeColor) {
this.strokeColor = strokeColor;
requestLayout();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,12 @@ public void animateRotationBy(@NonNull MarkerView marker, float rotation) {
}
}

/**
* Set the rotation of a MarkerView to a given rotation value.
*
* @param marker The MarkerView to change its rotation value
* @param rotation The rotation value
*/
public void setRotation(@NonNull MarkerView marker, float rotation) {
View convertView = markerViewMap.get(marker);
if (convertView != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
*/
public class InvalidMarkerPositionException extends RuntimeException {

/**
* Creates a invalid marker position exception thrown when a Marker object is created with an invalid LatLng position.
*/
public InvalidMarkerPositionException() {
super("Adding an invalid Marker to a Map. "
+ "Missing the required position field. "
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,14 @@
* This occurs either when {@link com.mapbox.mapboxsdk.Mapbox} is not correctly initialised or the provided access token
* through {@link com.mapbox.mapboxsdk.Mapbox#getInstance(Context, String)} isn't valid.
* </p>
*
* @see com.mapbox.mapboxsdk.Mapbox#getInstance(Context, String)
*/
public class MapboxConfigurationException extends RuntimeException {

/**
* Creates a Mapbox configuration exception thrown by MapboxMap when the SDK hasn't been properly initialised.
*/
public MapboxConfigurationException() {
super("\nUsing MapView requires setting a valid access token. Use Mapbox.getInstance(Context context, "
+ "String accessToken) to provide one. "
Expand Down
Loading

0 comments on commit 1d17f5a

Please sign in to comment.