Package gov.nih.mipav.model.algorithms
Class ContourPlot.FontProvider
java.lang.Object
gov.nih.mipav.model.algorithms.ContourPlot.FontProvider
- Enclosing class:
ContourPlot
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic FontgetUbuntuMono(float size, int style) Returns the Ubuntu Mono font for the specified font size and stylestatic FontregisterTrueTypeFont(URL resource) Loads a true type font (ttf) from the specified source and registers it with the localGraphicsEnvironment.
-
Field Details
-
UBUNTU_MONO_PLAIN_RESOURCE
- See Also:
-
UBUNTU_MONO_BOLD_RESOURCE
- See Also:
-
UBUNTU_MONO_ITALIC_RESOURCE
- See Also:
-
UBUNTU_MONO_BOLDITALIC_RESOURCE
- See Also:
-
UBUNTU_MONO_PLAIN
-
UBUNTU_MONO_BOLD
-
UBUNTU_MONO_ITALIC
-
UBUNTU_MONO_BOLDITALIC
-
-
Constructor Details
-
FontProvider
public FontProvider()
-
-
Method Details
-
registerTrueTypeFont
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:
IllegalArgumentException- when an IOException occurs or the specified resource is not in ttf format.
-
getUbuntuMono
Returns the Ubuntu Mono font for the specified font size and style- Parameters:
size- font sizestyle- font style,Font.PLAIN,Font.BOLD,Font.ITALICor BOLD|ITALIC- Returns:
- font of specified size and style
-