Spec-Zone .ru
спецификации, руководства, описания, API
|
public enum FontWeight extends java.lang.Enum<FontWeight>
Enum Constant and Description |
---|
BLACK
represents Black font weight (900).
|
BOLD
represents Bold font weight (700).
|
EXTRA_BOLD
represents 'Extra Bold' font weight (800).
|
EXTRA_LIGHT
represents 'Extra Light' font weight (200).
|
LIGHT
represents Light font weight (300).
|
MEDIUM
represents Medium font weight (500).
|
NORMAL
represents Normal font weight (400).
|
SEMI_BOLD
represents 'Demi Bold' font weight (600).
|
THIN
represents Thin font weight (100).
|
Modifier and Type | Method and Description |
---|---|
static FontWeight |
findByName(java.lang.String name)
Returns
FontWeight by its name. |
static FontWeight |
findByWeight(int weight)
Returns the closest @code FontWeight} for a weight
value as defined by the CSS and OpenType specifications.
|
int |
getWeight()
Return the visual weight (degree of blackness or thickness)
specified by this
FontWeight . |
static FontWeight |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static FontWeight[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final FontWeight THIN
public static final FontWeight EXTRA_LIGHT
public static final FontWeight LIGHT
public static final FontWeight NORMAL
public static final FontWeight MEDIUM
public static final FontWeight SEMI_BOLD
public static final FontWeight BOLD
public static final FontWeight EXTRA_BOLD
public static final FontWeight BLACK
public static FontWeight[] values()
for (FontWeight c : FontWeight.values()) System.out.println(c);
public static FontWeight valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant
with the specified namejava.lang.NullPointerException
- if the argument is nullpublic int getWeight()
FontWeight
.public static FontWeight findByName(java.lang.String name)
FontWeight
by its name.name
- name of the FontWeight
public static FontWeight findByWeight(int weight)
FontWeight
values, then the implementation may
select either at its discretion.
This lookup is without reference to a font, so this is
purely a mapping to the set of FontWeight
instances
and does not mean that a font of that weight will be available.FontWeight
Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved. Use is subject to