Package gov.nih.mipav.model.algorithms
Class ContourPlot.FontProvider
- java.lang.Object
-
- gov.nih.mipav.model.algorithms.ContourPlot.FontProvider
-
- Enclosing class:
- ContourPlot
public static final class ContourPlot.FontProvider extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description static java.awt.Font
UBUNTU_MONO_BOLD
static java.lang.String
UBUNTU_MONO_BOLD_RESOURCE
static java.awt.Font
UBUNTU_MONO_BOLDITALIC
static java.lang.String
UBUNTU_MONO_BOLDITALIC_RESOURCE
static java.awt.Font
UBUNTU_MONO_ITALIC
static java.lang.String
UBUNTU_MONO_ITALIC_RESOURCE
static java.awt.Font
UBUNTU_MONO_PLAIN
static java.lang.String
UBUNTU_MONO_PLAIN_RESOURCE
-
Constructor Summary
Constructors Constructor Description FontProvider()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.awt.Font
getUbuntuMono(float size, int style)
Returns the Ubuntu Mono font for the specified font size and stylestatic java.awt.Font
registerTrueTypeFont(java.net.URL resource)
Loads a true type font (ttf) from the specified source and registers it with the localGraphicsEnvironment
.
-
-
-
Field Detail
-
UBUNTU_MONO_PLAIN_RESOURCE
public static final java.lang.String UBUNTU_MONO_PLAIN_RESOURCE
- See Also:
- Constant Field Values
-
UBUNTU_MONO_BOLD_RESOURCE
public static final java.lang.String UBUNTU_MONO_BOLD_RESOURCE
- See Also:
- Constant Field Values
-
UBUNTU_MONO_ITALIC_RESOURCE
public static final java.lang.String UBUNTU_MONO_ITALIC_RESOURCE
- See Also:
- Constant Field Values
-
UBUNTU_MONO_BOLDITALIC_RESOURCE
public static final java.lang.String UBUNTU_MONO_BOLDITALIC_RESOURCE
- See Also:
- Constant Field Values
-
UBUNTU_MONO_PLAIN
public static final java.awt.Font UBUNTU_MONO_PLAIN
-
UBUNTU_MONO_BOLD
public static final java.awt.Font UBUNTU_MONO_BOLD
-
UBUNTU_MONO_ITALIC
public static final java.awt.Font UBUNTU_MONO_ITALIC
-
UBUNTU_MONO_BOLDITALIC
public static final java.awt.Font UBUNTU_MONO_BOLDITALIC
-
-
Method Detail
-
registerTrueTypeFont
public static java.awt.Font registerTrueTypeFont(java.net.URL resource)
Loads a true type font (ttf) from the specified source and registers it with the localGraphicsEnvironment
.- Parameters:
resource
- to load the ttf from- Returns:
- the loaded and registered font
- Throws:
java.lang.IllegalArgumentException
- when an IOException occurs or the specified resource is not in ttf format.
-
getUbuntuMono
public static java.awt.Font getUbuntuMono(float size, int style)
Returns the Ubuntu Mono font for the specified font size and style- Parameters:
size
- font sizestyle
- font style,Font.PLAIN
,Font.BOLD
,Font.ITALIC
or BOLD|ITALIC- Returns:
- font of specified size and style
-
-