public class Font extends Symbol
Modifier and Type | Class and Description |
---|---|
static class |
Font.StyleType |
static class |
Font.VariantType |
static class |
Font.WeightType |
Modifier and Type | Method and Description |
---|---|
static Font |
create()
Creates a new Font object.
|
static Font |
create(int size,
Font.StyleType style,
Font.VariantType variant,
Font.WeightType weight,
java.lang.String family)
Creates a new Font object.
|
static Font |
create(com.google.gwt.core.client.JavaScriptObject json)
Creates a new Font object using a JSON object.
|
java.lang.String |
getFamily()
Font family.
|
java.lang.String |
getSize()
Font size.
|
Font.StyleType |
getStyle()
Text style.
|
Font.VariantType |
getVariant()
Text variant.
|
Font.WeightType |
getWeights()
Text weight.
|
java.lang.String |
setFamily(java.lang.String family)
Sets the font family.The font family property does not work in Internet Explorer 7; Arial is always used.
|
java.lang.String |
setSize(java.lang.String size)
Sets the font size.
|
Font |
setStyle(Font.StyleType style)
Sets the font style.
|
Font |
setVariant(Font.VariantType variant)
Sets the font variant.
|
Font |
setWeight(Font.WeightType weight)
Sets the font weight.
|
fromJson, getColor, getType, setColor, toJson
public static Font create()
public static Font create(int size, Font.StyleType style, Font.VariantType variant, Font.WeightType weight, java.lang.String family)
size
- - Font size.style
- - Font Style.variant
- - Font variant.weight
- - Font weight.family
- - Font family.public static Font create(com.google.gwt.core.client.JavaScriptObject json)
json
- - JSON object representing the font.public final java.lang.String getFamily()
public final java.lang.String getSize()
public final Font.StyleType getStyle()
public final Font.VariantType getVariant()
public final Font.WeightType getWeights()
public final java.lang.String setFamily(java.lang.String family)
family
- - Font family.public final java.lang.String setSize(java.lang.String size)
size
- - Font size in points.public final Font setStyle(Font.StyleType style)
style
- - Font Stylepublic final Font setVariant(Font.VariantType variant)
variant
- - Font variant.public final Font setWeight(Font.WeightType weight)
weight
- - Font weight.