|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.vaadin.server.GenericFontIcon
public class GenericFontIcon
A generic implementation of FontIcon
interface
Constructor Summary | |
---|---|
GenericFontIcon(java.lang.String fontFamily,
int codepoint)
Creates a new instance of GenericFontIcon with given font family and codepoint |
Method Summary | |
---|---|
boolean |
equals(java.lang.Object obj)
|
int |
getCodepoint()
Returns the unicode codepoint (character location) for this icon within the font given in FontIcon.getFontFamily() . |
java.lang.String |
getFontFamily()
Returns the name (font family) of the font from which this icon comes. |
java.lang.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 java.lang.String |
getHtml(java.lang.String fontFamily,
int codePoint)
Utility method for generating HTML that displays an icon from specific fontFamiliy with a given codePoint in the font |
java.lang.String |
getMIMEType()
Gets the MIME type of the resource. |
int |
hashCode()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public GenericFontIcon(java.lang.String fontFamily, int codepoint)
fontFamily
- Name of the type face that is used to display iconscodepoint
- Numerical code point in the fontMethod Detail |
---|
public java.lang.String getFontFamily()
FontIcon
getFontFamily
in interface FontIcon
public java.lang.String getMIMEType()
Resource
getMIMEType
in interface Resource
public int getCodepoint()
FontIcon
FontIcon.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 FontIcon
public java.lang.String getHtml()
FontIcon
Label
with ContentMode.HTML
.
getHtml
in interface FontIcon
public static java.lang.String getHtml(java.lang.String fontFamily, int codePoint)
fontFamily
- Name of the font familycodePoint
- Icon's character code point in the font
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |