Package io.deephaven.plot
Class Font
java.lang.Object
io.deephaven.plot.Font
- All Implemented Interfaces:
Serializable
A font used to represent text.
- See Also:
-
Nested Class Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
static Font
font
(String family, Font.FontStyle style, int size) Returns a font.static Font
Returns a font.static String[]
Returns the names of available Font families.static Font.FontStyle
Returns a font style.static String[]
Returns the names of available font styles.int
hashCode()
javaFont()
Returns the Java object representative of this Font.Returns an instance of this Font with the family changed to the specifiedfamily
resize
(int size) Returns an instance of this Font with the size changed to the specifiedsize
restyle
(Font.FontStyle style) Gets an instance of this Font with the style changed to the specifiedstyle
Returns an instance of this Font with the style changed to the specifiedstyle
toString()
-
Constructor Details
-
Font
Creates a new instance of the Font with the specifiedfamily
,style
, andsize
.- Parameters:
family
- font family; if null, set to Arialstyle
- font style; if null, set toFont.FontStyle
PLAINsize
- the point size of the Font
-
Font
Creates a new instance of the Font with the specifiedfamily
,style
, andsize
.- Parameters:
family
- font family; if null, set to Arialstyle
- font style; if null, set toFont.FontStyle
PLAINsize
- the point size of the Font
-
-
Method Details
-
fontStyle
Returns a font style.- Parameters:
style
- case insensitive font style descriptor- Returns:
- FontStyle corresponding to
style
- Throws:
IllegalArgumentException
-style
must not be null
-
fontStyleNames
Returns the names of available font styles.- Returns:
- array of available FontStyle names
-
toString
-
font
Returns a font.- Parameters:
family
- font family; if null, set to Arialstyle
- font style; if null, set toFont.FontStyle
PLAINsize
- the point size of the Font- Returns:
- font with the specified family, style and size
-
font
Returns a font.- Parameters:
family
- font family; if null, set to Arialstyle
- font style; if null, set toFont.FontStyle
PLAINsize
- the point size of the Font- Returns:
- font with the specified family, style and size
-
fontFamilyNames
Returns the names of available Font families.- Returns:
- array of available Font family names
-
refamily
Returns an instance of this Font with the family changed to the specifiedfamily
- Parameters:
family
- font family; if null, set to Arial- Returns:
- Font with
family
and this Font's style and size
-
restyle
Gets an instance of this Font with the style changed to the specifiedstyle
- Parameters:
style
- font style; if null, set toFont.FontStyle
PLAIN- Returns:
- Font with
style
and this Font's family and size
-
restyle
Returns an instance of this Font with the style changed to the specifiedstyle
- Parameters:
style
- font style; if null, set toFont.FontStyle
PLAIN- Returns:
- Font with
style
and this Font's family and size
-
resize
Returns an instance of this Font with the size changed to the specifiedsize
- Parameters:
size
- point size of the font- Returns:
- Font with
size
and this Font's family and style
-
javaFont
Returns the Java object representative of this Font.- Returns:
- Java object representative of this Font
-
equals
-
hashCode
public int hashCode()
-