summaryrefslogtreecommitdiff
path: root/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/layers/FillLayer.java
diff options
context:
space:
mode:
authorCameron Mace <cameron@mapbox.com>2016-12-16 16:19:15 -0500
committerGitHub <noreply@github.com>2016-12-16 16:19:15 -0500
commit20b958301eb208fe9ed0ae8edfb14b6f3741d8f2 (patch)
tree94ae0ce250cda159be13f9a21cc70c92d4908974 /platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/layers/FillLayer.java
parentf95b4838ea816b9da0c151a953a1f98f97c79a39 (diff)
downloadqtlocation-mapboxgl-20b958301eb208fe9ed0ae8edfb14b6f3741d8f2.tar.gz
Adds checkstyle to CI (#7442)
* adds checkstyle to CI * fixed gradlew path * resolved testapp checkstyle violations * added back mapboxMap variable for test * checkstyle annotations * checkstyle SDK round 1 * maps package checkstyle * rest of SDK checkstyle * checkstyle gesture library * checkstyle test * finished rest of test checkstyle * resolved all checkstyle errors * fixed class name * removed old test file * fixed camera postion test * fixed native crash
Diffstat (limited to 'platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/layers/FillLayer.java')
-rw-r--r--platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/layers/FillLayer.java437
1 files changed, 220 insertions, 217 deletions
diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/layers/FillLayer.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/layers/FillLayer.java
index b49b23e732..3f79c9306a 100644
--- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/layers/FillLayer.java
+++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/layers/FillLayer.java
@@ -1,12 +1,11 @@
-// This file is generated. Edit android/platform/scripts/generate-style-code.js, then run `make android-style-code`.
package com.mapbox.mapboxsdk.style.layers;
-
-import android.support.annotation.UiThread;
+// This file is generated. Edit android/platform/scripts/generate-style-code.js, then run `make android-style-code`.
import android.support.annotation.ColorInt;
import android.support.annotation.NonNull;
+import android.support.annotation.UiThread;
-import static com.mapbox.mapboxsdk.utils.ColorUtils.*;
+import static com.mapbox.mapboxsdk.utils.ColorUtils.rgbaToColor;
/**
* A filled polygon with an optional stroked border.
@@ -16,218 +15,222 @@ import static com.mapbox.mapboxsdk.utils.ColorUtils.*;
@UiThread
public class FillLayer extends Layer {
- /**
- * Creates a FillLayer.
- *
- * @param nativePtr pointer used by core
- */
- public FillLayer(long nativePtr) {
- super(nativePtr);
- }
-
- /**
- * Creates a FillLayer.
- *
- * @param layerId the id of the layer
- * @param sourceId the id of the source
- */
- public FillLayer(String layerId, String sourceId) {
- initialize(layerId, sourceId);
- }
-
- protected native void initialize(String layerId, String sourceId);
-
- /**
- * Set the source layer.
- *
- * @param sourceLayer the source layer to set
- */
- public void setSourceLayer(String sourceLayer) {
- nativeSetSourceLayer(sourceLayer);
- }
-
- /**
- * Set the source Layer.
- *
- * @param sourceLayer the source layer to set
- * @return This
- */
- public FillLayer withSourceLayer(String sourceLayer) {
- setSourceLayer(sourceLayer);
- return this;
- }
- /**
- * Set a single filter.
- *
- * @param filter the filter to set
- */
- public void setFilter(Filter.Statement filter) {
- this.setFilter(filter.toArray());
- }
-
- /**
- * Set an array of filters.
- *
- * @param filter the filter array to set
- */
- public void setFilter(Object[] filter) {
- nativeSetFilter(filter);
- }
-
- /**
- * Set an array of filters.
- *
- * @param filter tthe filter array to set
- * @return This
- */
- public FillLayer withFilter(Object[] filter) {
- setFilter(filter);
- return this;
- }
-
- /**
- * Set a single filter.
- *
- * @param filter the filter to set
- * @return This
- */
- public FillLayer withFilter(Filter.Statement filter) {
- setFilter(filter);
- return this;
- }
-
-
- /**
- * Set a property or properties.
- *
- * @param properties the var-args properties
- * @return This
- */
- public FillLayer withProperties(@NonNull Property<?>... properties) {
- setProperties(properties);
- return this;
- }
-
- // Property getters
-
- /**
- * Get the FillAntialias property
- *
- * @return property wrapper value around Boolean
- */
- @SuppressWarnings("unchecked")
- public PropertyValue<Boolean> getFillAntialias() {
- return (PropertyValue<Boolean>) new PropertyValue(nativeGetFillAntialias());
- }
-
- /**
- * Get the FillOpacity property
- *
- * @return property wrapper value around Float
- */
- @SuppressWarnings("unchecked")
- public PropertyValue<Float> getFillOpacity() {
- return (PropertyValue<Float>) new PropertyValue(nativeGetFillOpacity());
- }
-
- /**
- * Get the FillColor property
- *
- * @return property wrapper value around String
- */
- @SuppressWarnings("unchecked")
- public PropertyValue<String> getFillColor() {
- return (PropertyValue<String>) new PropertyValue(nativeGetFillColor());
- }
- /**
- * The color of the filled part of this layer. This color can be specified as `rgba` with an alpha component and the color's opacity will not affect the opacity of the 1px stroke, if it is used.
- *
- * @return int representation of a rgba string color
- * @throws RuntimeException thrown if property isn't a value
- */
- @ColorInt
- public int getFillColorAsInt() {
- PropertyValue<String> value = getFillColor();
- if (value.isValue()) {
- return rgbaToColor(value.getValue());
- } else {
- throw new RuntimeException("fill-color was set as a Function");
- }
- }
-
-
- /**
- * Get the FillOutlineColor property
- *
- * @return property wrapper value around String
- */
- @SuppressWarnings("unchecked")
- public PropertyValue<String> getFillOutlineColor() {
- return (PropertyValue<String>) new PropertyValue(nativeGetFillOutlineColor());
- }
- /**
- * The outline color of the fill. Matches the value of `fill-color` if unspecified.
- *
- * @return int representation of a rgba string color
- * @throws RuntimeException thrown if property isn't a value
- */
- @ColorInt
- public int getFillOutlineColorAsInt() {
- PropertyValue<String> value = getFillOutlineColor();
- if (value.isValue()) {
- return rgbaToColor(value.getValue());
- } else {
- throw new RuntimeException("fill-outline-color was set as a Function");
- }
- }
-
-
- /**
- * Get the FillTranslate property
- *
- * @return property wrapper value around Float[]
- */
- @SuppressWarnings("unchecked")
- public PropertyValue<Float[]> getFillTranslate() {
- return (PropertyValue<Float[]>) new PropertyValue(nativeGetFillTranslate());
- }
-
- /**
- * Get the FillTranslateAnchor property
- *
- * @return property wrapper value around String
- */
- @SuppressWarnings("unchecked")
- public PropertyValue<String> getFillTranslateAnchor() {
- return (PropertyValue<String>) new PropertyValue(nativeGetFillTranslateAnchor());
- }
-
- /**
- * Get the FillPattern property
- *
- * @return property wrapper value around String
- */
- @SuppressWarnings("unchecked")
- public PropertyValue<String> getFillPattern() {
- return (PropertyValue<String>) new PropertyValue(nativeGetFillPattern());
- }
-
- private native Object nativeGetFillAntialias();
-
- private native Object nativeGetFillOpacity();
-
- private native Object nativeGetFillColor();
-
- private native Object nativeGetFillOutlineColor();
-
- private native Object nativeGetFillTranslate();
-
- private native Object nativeGetFillTranslateAnchor();
-
- private native Object nativeGetFillPattern();
-
-
- @Override
- protected native void finalize() throws Throwable;
+ /**
+ * Creates a FillLayer.
+ *
+ * @param nativePtr pointer used by core
+ */
+ public FillLayer(long nativePtr) {
+ super(nativePtr);
+ }
+
+ /**
+ * Creates a FillLayer.
+ *
+ * @param layerId the id of the layer
+ * @param sourceId the id of the source
+ */
+ public FillLayer(String layerId, String sourceId) {
+ initialize(layerId, sourceId);
+ }
+
+ protected native void initialize(String layerId, String sourceId);
+
+ /**
+ * Set the source layer.
+ *
+ * @param sourceLayer the source layer to set
+ */
+ public void setSourceLayer(String sourceLayer) {
+ nativeSetSourceLayer(sourceLayer);
+ }
+
+ /**
+ * Set the source Layer.
+ *
+ * @param sourceLayer the source layer to set
+ * @return This
+ */
+ public FillLayer withSourceLayer(String sourceLayer) {
+ setSourceLayer(sourceLayer);
+ return this;
+ }
+
+ /**
+ * Set a single filter.
+ *
+ * @param filter the filter to set
+ */
+ public void setFilter(Filter.Statement filter) {
+ this.setFilter(filter.toArray());
+ }
+
+ /**
+ * Set an array of filters.
+ *
+ * @param filter the filter array to set
+ */
+ public void setFilter(Object[] filter) {
+ nativeSetFilter(filter);
+ }
+
+ /**
+ * Set an array of filters.
+ *
+ * @param filter tthe filter array to set
+ * @return This
+ */
+ public FillLayer withFilter(Object[] filter) {
+ setFilter(filter);
+ return this;
+ }
+
+ /**
+ * Set a single filter.
+ *
+ * @param filter the filter to set
+ * @return This
+ */
+ public FillLayer withFilter(Filter.Statement filter) {
+ setFilter(filter);
+ return this;
+ }
+
+
+ /**
+ * Set a property or properties.
+ *
+ * @param properties the var-args properties
+ * @return This
+ */
+ public FillLayer withProperties(@NonNull Property<?>... properties) {
+ setProperties(properties);
+ return this;
+ }
+
+ // Property getters
+
+ /**
+ * Get the FillAntialias property
+ *
+ * @return property wrapper value around Boolean
+ */
+ @SuppressWarnings("unchecked")
+ public PropertyValue<Boolean> getFillAntialias() {
+ return (PropertyValue<Boolean>) new PropertyValue(nativeGetFillAntialias());
+ }
+
+ /**
+ * Get the FillOpacity property
+ *
+ * @return property wrapper value around Float
+ */
+ @SuppressWarnings("unchecked")
+ public PropertyValue<Float> getFillOpacity() {
+ return (PropertyValue<Float>) new PropertyValue(nativeGetFillOpacity());
+ }
+
+ /**
+ * Get the FillColor property
+ *
+ * @return property wrapper value around String
+ */
+ @SuppressWarnings("unchecked")
+ public PropertyValue<String> getFillColor() {
+ return (PropertyValue<String>) new PropertyValue(nativeGetFillColor());
+ }
+
+ /**
+ * The color of the filled part of this layer. This color can be specified as `rgba` with an alpha component and the
+ * color's opacity will not affect the opacity of the 1px stroke, if it is used.
+ *
+ * @return int representation of a rgba string color
+ * @throws RuntimeException thrown if property isn't a value
+ */
+ @ColorInt
+ public int getFillColorAsInt() {
+ PropertyValue<String> value = getFillColor();
+ if (value.isValue()) {
+ return rgbaToColor(value.getValue());
+ } else {
+ throw new RuntimeException("fill-color was set as a Function");
+ }
+ }
+
+
+ /**
+ * Get the FillOutlineColor property
+ *
+ * @return property wrapper value around String
+ */
+ @SuppressWarnings("unchecked")
+ public PropertyValue<String> getFillOutlineColor() {
+ return (PropertyValue<String>) new PropertyValue(nativeGetFillOutlineColor());
+ }
+
+ /**
+ * The outline color of the fill. Matches the value of `fill-color` if unspecified.
+ *
+ * @return int representation of a rgba string color
+ * @throws RuntimeException thrown if property isn't a value
+ */
+ @ColorInt
+ public int getFillOutlineColorAsInt() {
+ PropertyValue<String> value = getFillOutlineColor();
+ if (value.isValue()) {
+ return rgbaToColor(value.getValue());
+ } else {
+ throw new RuntimeException("fill-outline-color was set as a Function");
+ }
+ }
+
+
+ /**
+ * Get the FillTranslate property
+ *
+ * @return property wrapper value around Float[]
+ */
+ @SuppressWarnings("unchecked")
+ public PropertyValue<Float[]> getFillTranslate() {
+ return (PropertyValue<Float[]>) new PropertyValue(nativeGetFillTranslate());
+ }
+
+ /**
+ * Get the FillTranslateAnchor property
+ *
+ * @return property wrapper value around String
+ */
+ @SuppressWarnings("unchecked")
+ public PropertyValue<String> getFillTranslateAnchor() {
+ return (PropertyValue<String>) new PropertyValue(nativeGetFillTranslateAnchor());
+ }
+
+ /**
+ * Get the FillPattern property
+ *
+ * @return property wrapper value around String
+ */
+ @SuppressWarnings("unchecked")
+ public PropertyValue<String> getFillPattern() {
+ return (PropertyValue<String>) new PropertyValue(nativeGetFillPattern());
+ }
+
+ private native Object nativeGetFillAntialias();
+
+ private native Object nativeGetFillOpacity();
+
+ private native Object nativeGetFillColor();
+
+ private native Object nativeGetFillOutlineColor();
+
+ private native Object nativeGetFillTranslate();
+
+ private native Object nativeGetFillTranslateAnchor();
+
+ private native Object nativeGetFillPattern();
+
+
+ @Override
+ protected native void finalize() throws Throwable;
}