Package com.oorian.css
Enum Class FontFamily
- All Implemented Interfaces:
Serializable,Comparable<FontFamily>,Constable
CSS font-family property values for common web-safe fonts.
The FontFamily enum provides pre-defined values for commonly used web-safe fonts and generic font families. These fonts are widely available across operating systems and browsers.
Font Categories:
- Sans-serif: ARIAL, HELVETICA, VERDANA, TAHOMA
- Serif: TIMES_NEW_ROMAN, GEORGIA, PALATINO
- Monospace: COURIER_NEW, LUCIDA_CONSOLE, MONACO
- Generic: SERIF, SANS_SERIF, MONOSPACE, CURSIVE, FANTASY
Usage:
element.setFontFamily(FontFamily.ARIAL);
element.setFontFamily(FontFamily.SANS_SERIF);
- Since:
- 2012
- Version:
- 1.0
- Author:
- Marvin P. Warble Jr.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionArial - widely available sans-serif font.Arial Black - bold display sans-serif font.Book Antiqua - classic oldstyle serif font.Charcoal - Mac system sans-serif font.Comic Sans MS - casual handwriting-style font.Courier - classic monospace typewriter font.Courier New - refined monospace font.Generic cursive/script font family.Generic decorative/fantasy font family.Geneva - Mac sans-serif font.Georgia - elegant serif font designed for screens.Helvetica - popular sans-serif font.Impact - bold condensed display font.Inherits from parent element.Sets to default value.Lucida Console - monospace font for code.Lucida Grande - Mac system font.Lucida Sans Unicode - humanist sans-serif font.Monaco - Mac monospace font.Generic monospace font family.MS Sans Serif - Windows system sans-serif font.MS Serif - Windows system serif font.New York - Mac serif font.No font family specified.Palatino - elegant oldstyle serif font.Generic sans-serif font family.Generic serif font family.Symbol - special characters and symbols font.Tahoma - compact sans-serif font.Times New Roman - classic serif font for body text.Trebuchet MS - humanist sans-serif web font.Verdana - highly readable sans-serif screen font. -
Method Summary
Modifier and TypeMethodDescriptiongetValue()Returns the CSS value string.toString()Returns the CSS value string.static FontFamilyReturns the enum constant of this class with the specified name.static FontFamily[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
INHERIT
Inherits from parent element. -
INITIAL
Sets to default value. -
NONE
No font family specified. -
ARIAL
Arial - widely available sans-serif font. -
ARIAL_BLACK
Arial Black - bold display sans-serif font. -
CHARCOAL
Charcoal - Mac system sans-serif font. -
COMIC_SANS_MS
Comic Sans MS - casual handwriting-style font. -
COURIER
Courier - classic monospace typewriter font. -
COURIER_NEW
Courier New - refined monospace font. -
GEORGIA
Georgia - elegant serif font designed for screens. -
IMPACT
Impact - bold condensed display font. -
LUCIDA_CONSOLE
Lucida Console - monospace font for code. -
LUCIDA_GRANDE
Lucida Grande - Mac system font. -
LUCIDA_SANS_UNICODE
Lucida Sans Unicode - humanist sans-serif font. -
MONACO
Monaco - Mac monospace font. -
BOOK_ANTIQUA
Book Antiqua - classic oldstyle serif font. -
PALATINO
Palatino - elegant oldstyle serif font. -
TAHOMA
Tahoma - compact sans-serif font. -
GENEVA
Geneva - Mac sans-serif font. -
TIMES_NEW_ROMAN
Times New Roman - classic serif font for body text. -
TREBUCHET_MS
Trebuchet MS - humanist sans-serif web font. -
HELVETICA
Helvetica - popular sans-serif font. -
VERDANA
Verdana - highly readable sans-serif screen font. -
SYMBOL
Symbol - special characters and symbols font. -
MS_SANS_SERIF
MS Sans Serif - Windows system sans-serif font. -
MS_SERIF
MS Serif - Windows system serif font. -
NEW_YORK
New York - Mac serif font. -
CURSIVE
Generic cursive/script font family. -
FANTASY
Generic decorative/fantasy font family. -
MONOSPACE
Generic monospace font family. -
SANS_SERIF
Generic sans-serif font family. -
SERIF
Generic serif font family.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
getValue
Returns the CSS value string.- Returns:
- the CSS value
-
toString
Returns the CSS value string.- Overrides:
toStringin classEnum<FontFamily>- Returns:
- the CSS value
-