Class ContourPlot.FontProvider

java.lang.Object
gov.nih.mipav.model.algorithms.ContourPlot.FontProvider
Enclosing class:
ContourPlot

public static final class ContourPlot.FontProvider extends Object
  • Field Details

    • UBUNTU_MONO_PLAIN_RESOURCE

      public static final String UBUNTU_MONO_PLAIN_RESOURCE
      See Also:
    • UBUNTU_MONO_BOLD_RESOURCE

      public static final String UBUNTU_MONO_BOLD_RESOURCE
      See Also:
    • UBUNTU_MONO_ITALIC_RESOURCE

      public static final String UBUNTU_MONO_ITALIC_RESOURCE
      See Also:
    • UBUNTU_MONO_BOLDITALIC_RESOURCE

      public static final String UBUNTU_MONO_BOLDITALIC_RESOURCE
      See Also:
    • UBUNTU_MONO_PLAIN

      public static final Font UBUNTU_MONO_PLAIN
    • UBUNTU_MONO_BOLD

      public static final Font UBUNTU_MONO_BOLD
    • UBUNTU_MONO_ITALIC

      public static final Font UBUNTU_MONO_ITALIC
    • UBUNTU_MONO_BOLDITALIC

      public static final Font UBUNTU_MONO_BOLDITALIC
  • Constructor Details

    • FontProvider

      public FontProvider()
  • Method Details

    • registerTrueTypeFont

      public static Font registerTrueTypeFont(URL resource)
      Loads a true type font (ttf) from the specified source and registers it with the local GraphicsEnvironment.
      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

      public static Font getUbuntuMono(float size, int style)
      Returns the Ubuntu Mono font for the specified font size and style
      Parameters:
      size - font size
      style - font style, Font.PLAIN, Font.BOLD, Font.ITALIC or BOLD|ITALIC
      Returns:
      font of specified size and style