public class GenericFontIcon extends Object implements FontIcon
FontIcon interface.| Constructor and Description |
|---|
GenericFontIcon(String fontFamily,
int codepoint)
Creates a new instance of GenericFontIcon with given font family and
codepoint.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
int |
getCodepoint()
Returns the unicode codepoint (character location) for this icon within
the font given in
FontIcon.getFontFamily(). |
String |
getFontFamily()
Returns the name (font family) of the font from which this icon comes.
|
String |
getHtml()
Returns HTML that can be used to display the icon in places where HTML
can be used, such as a
Label with ContentMode.HTML. |
static String |
getHtml(String fontFamily,
int codePoint)
Utility method for generating HTML that displays an icon from specific
fontFamiliy with a given codePoint in the font.
|
String |
getMIMEType()
Gets the MIME type of the resource.
|
int |
hashCode() |
public GenericFontIcon(String fontFamily, int codepoint)
fontFamily - Name of the type face that is used to display iconscodepoint - Numerical code point in the fontpublic String getFontFamily()
FontIcongetFontFamily in interface FontIconpublic String getMIMEType()
ResourcegetMIMEType in interface Resourcepublic int getCodepoint()
FontIconFontIcon.getFontFamily().
For example, 0x0021 would in a regular font be the codepoint for the
exclamation-point character.
When constructing icon fonts, it might be a good idea to use the
codepoints in the "Private use area", from 0xE000 0xF8FF.
getCodepoint in interface FontIconpublic String getHtml()
FontIconLabel with ContentMode.HTML.public static String getHtml(String fontFamily, int codePoint)
fontFamily - Name of the font familycodePoint - Icon's character code point in the fontCopyright © 2021 Vaadin Ltd. All rights reserved.