public class FontStyle
extends java.lang.Object
implements java.io.Serializable
The font label style. Customize text font.
Copyright (c) 2017 Nexusgeographics All rights reserved.
LabelStyle
,
Serialized FormModifier and Type | Class and Description |
---|---|
static class |
FontStyle.Stroke
The Stroke.
|
static class |
FontStyle.Style
The enum Style.
|
static class |
FontStyle.Transform
The enum Transform.
|
static class |
FontStyle.Weight
The enum Weight.
|
Constructor and Description |
---|
FontStyle() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getFamily()
Gets family.
|
java.lang.String |
getFill()
Gets fill color.
|
java.lang.String |
getSize()
Gets size in pixels string.
|
FontStyle.Stroke |
getStroke()
Gets stroke.
|
FontStyle.Style |
getStyle()
Gets style.
|
FontStyle.Transform |
getTransform()
Gets transform.
|
FontStyle.Weight |
getWeight()
Gets weight.
|
FontStyle |
setFamily(java.lang.String family)
Sets family.
|
FontStyle |
setFill(java.lang.String color)
Sets fill color.
|
FontStyle |
setSize(java.lang.String size)
Sets size in pixels string.
|
FontStyle |
setStroke(FontStyle.Stroke stroke)
Sets stroke.
|
FontStyle |
setStyle(FontStyle.Style style)
Sets style.
|
FontStyle |
setTransform(FontStyle.Transform transform)
Sets transform.
|
FontStyle |
setWeight(FontStyle.Weight weight)
Sets weight.
|
@Nullable public java.lang.String getFamily()
public FontStyle setFamily(@Nullable java.lang.String family)
family
- the family@Nullable public java.lang.String getSize()
public FontStyle setSize(@Nullable java.lang.String size)
Example:
FontStyle.setSize("16px")
size
- the size@Nullable public FontStyle.Style getStyle()
public FontStyle setStyle(@Nullable FontStyle.Style style)
style
- the style@Nullable public FontStyle.Weight getWeight()
public FontStyle setWeight(@Nullable FontStyle.Weight weight)
weight
- the weight@Nullable public java.lang.String getFill()
public FontStyle setFill(@Nullable java.lang.String color)
Example:
FontStyle.setFill("#ff0000")
Color format: Named colors: red, blue, salmon, rebeccapurple Hex colors: "#fff", "#000", "#9CE6E5" RGB colors: "rgb(255, 190, 0)" RGBA colors**: "rgb(255, 190, 0, .5)" HSL colors: "hsl(180, 100%, 100%)" HSL colors**: "hsla(180, 100%, 100%, 50%)"
**Currently, alpha values are ignored in the add and multiply blend modes, and respected in the inlay and overlay modes. For more on this, see the blend entry.
color
- the fill color@Nullable public FontStyle.Stroke getStroke()
public FontStyle setStroke(@Nullable FontStyle.Stroke stroke)
stroke
- the stroke@Nullable public FontStyle.Transform getTransform()
public FontStyle setTransform(@Nullable FontStyle.Transform transform)
transform
- the transform