[android] renamed format expression options, added format expression example

This commit is contained in:
Łukasz Paczos
2018-10-23 19:37:32 +02:00
committed by Łukasz Paczos
parent 3d67c7813b
commit d5b66e56e9
6 changed files with 63 additions and 34 deletions

View File

@@ -3246,10 +3246,13 @@ public class Expression {
* format(
* formatEntry(
* get("header_property"),
* fontScale(2.0),
* textFont(new String[] {"DIN Offc Pro Regular", "Arial Unicode MS Regular"})
* formatFontScale(2.0),
* formatTextFont(new String[] {"DIN Offc Pro Regular", "Arial Unicode MS Regular"})
* ),
* formatEntry(concat(literal("\n"), get("description_property")), fontScale(1.5)),
* formatEntry(concat(literal("\n"), get("description_property")), formatFontScale(1.5))
* )
* )
* );
* }
* </pre>
*
@@ -4375,7 +4378,7 @@ public class Expression {
* @return format option
*/
@NonNull
public static FormatOption fontScale(@NonNull Expression expression) {
public static FormatOption formatFontScale(@NonNull Expression expression) {
return new FormatOption("font-scale", expression);
}
@@ -4389,7 +4392,7 @@ public class Expression {
* @return format option
*/
@NonNull
public static FormatOption fontScale(double scale) {
public static FormatOption formatFontScale(double scale) {
return new FormatOption("font-scale", literal(scale));
}
@@ -4405,7 +4408,7 @@ public class Expression {
* @return format option
*/
@NonNull
public static FormatOption textFont(@NonNull Expression expression) {
public static FormatOption formatTextFont(@NonNull Expression expression) {
return new FormatOption("text-font", expression);
}
@@ -4421,7 +4424,7 @@ public class Expression {
* @return format option
*/
@NonNull
public static FormatOption textFont(@NonNull String[] fontStack) {
public static FormatOption formatTextFont(@NonNull String[] fontStack) {
return new FormatOption("text-font", literal(fontStack));
}
}

View File

@@ -386,7 +386,7 @@ public class SymbolLayer extends Layer {
* Get the TextField property as {@link Formatted} object
*
* @return property wrapper value around String
* @see Expression#format(Expression...)
* @see Expression#format(Expression.FormatEntry...)
*/
@SuppressWarnings("unchecked")
public PropertyValue<Formatted> getFormattedTextField() {

View File

@@ -199,7 +199,7 @@ public class <%- camelize(type) %>Layer extends Layer {
* Get the <%- camelize(property.name) %> property as {@link Formatted} object
*
* @return property wrapper value around <%- propertyType(property) %>
* @see Expression#format(Expression...)
* @see Expression#format(Expression.FormatEntry...)
*/
@SuppressWarnings("unchecked")
public PropertyValue<Formatted> getFormatted<%- camelize(property.name) %>() {