public enum FontWeight extends Enum<FontWeight>
列挙型定数と説明 |
---|
BLACK
フォントの太さBlack (900)を表します。
|
BOLD
フォントの太さBold (700)を表します。
|
EXTRA_BOLD
フォントの太さExtra Bold (800)を表します。
|
EXTRA_LIGHT
フォントの太さExtra Light (200)を表します。
|
LIGHT
フォントの太さLight (300)を表します。
|
MEDIUM
フォントの太さMedium (500)を表します。
|
NORMAL
フォントの太さNormal (400)を表します。
|
SEMI_BOLD
フォントの太さDemi Bold (600)を表します。
|
THIN
フォントの太さThin (100)を表します。
|
修飾子と型 | メソッドと説明 |
---|---|
static FontWeight |
findByName(String name)
FontWeight をその名前で返します。 |
static FontWeight |
findByWeight(int weight)
CSSおよびOpenType仕様で定義されている重み値に最も近い
FontWeight を返します。 |
int |
getWeight()
この
FontWeight で指定された視覚的太さ(黒さまたは太さの度合い)を返します。 |
static FontWeight |
valueOf(String name)
指定された名前を持つ、この型の列挙型定数を返します。
|
static FontWeight[] |
values()
この列挙型の定数を含む配列を、宣言されている順序で返します。
|
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(String name)
name
- 返される列挙型定数の名前。IllegalArgumentException
- 指定された名前を持つ定数をこの列挙型が持っていない場合NullPointerException
- 引数がnullの場合public int getWeight()
FontWeight
で指定された視覚的太さ(黒さまたは太さの度合い)を返します。public static FontWeight findByName(String name)
FontWeight
をその名前で返します。name
- FontWeight
の名前public static FontWeight findByWeight(int weight)
FontWeight
を返します。指定された値が2つのFontWeight
値から等距離にある場合、実装によって、いずれか一方が任意に選択されます。この検索ではフォントは参照されないため、FontWeight
インスタンスのセットに対する純粋なマッピングであり、また、該当する太さのフォントが使用可能であることを意味するものではありません。FontWeight
Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.