public final class GlyphFontRegistry extends Object
ServiceLoader facility, however it is also possible to register
glyph fonts manually using the provided
register(GlyphFont) method.
Once registered, fonts and their glyphs can be requested by name using the
glyph(String) and
glyph(String, String) methods. For example:
import static org.controlsfx.glyphfont.GlyphFontRegistry.glyph;
new Button("", glyph("FontAwesome|TRASH"))
An ability to retrieve glyph node by combination of font name and glyph name
extends to the ActionProxy graphic attribute, where the "font>"
prefix should be used. For more information see ActionProxy.
| Modifier and Type | Method and Description |
|---|---|
static GlyphFont |
font(String fontName)
Retrieve font by font
|
static Node |
glyph(String fontAndGlyph)
Retrieve glyph by font name and glyph name using one string where font name an glyph name are separated by pipe
|
static Node |
glyph(String fontName,
String glyphName)
Retrieve one glyph by font name and glyph name
|
static void |
register(GlyphFont font)
Registers specified font
|
public static void register(GlyphFont font)
font - public static GlyphFont font(String fontName)
fontName - font namepublic static Node glyph(String fontName, String glyphName)
fontName - font nameglyphName - glyph name