Class TadukooLabel.TadukooLabelBuilder

java.lang.Object
com.github.tadukoo.view.components.TadukooLabel.TadukooLabelBuilder
Enclosing class:
TadukooLabel

public static class TadukooLabel.TadukooLabelBuilder extends Object
Builder to be used to create a TadukooLabel. It has the following parameters:
TadukooLabel Parameters
Name Description Default or Required
text The text to use on the Label Defaults to null
icon The icon to use on the Label Defaults to null
foregroundPaint The SizablePaint to use for the foreground of the Label Defaults to null (to use the Look & Feel's default Label foreground paint)
backgroundPaint The SizablePaint to use for the background of the Label Defaults to null (to use the Look & Feel's default Label background paint)
disabledForegroundPaint The SizablePaint to use for the disabled foreground of the Label Defaults to null (to use the Look & Feel's default Label disabledForeground paint)
font The Font to use on the Label (specified via FontFamily, font style, and font size Defaults to null (to use the Look & Feel's default Label font)
shapeInfo The ShapeInfo to use on the Label Defaults to null (to use the Look & Feel's default Label shapeInfo)
border The Border to use on the Label Defaults to null (to use the Look & Feel's default Label border)
There are also parameters for loading the font using a FontResourceLoader, which can be ignored if you don't specify a Font for this label:
Font Resource Loader Parameters
Field Description Default Value
logFontResourceLoaderWarnings Whether to log warnings generated by the FontResourceLoader - can be ignored if you specify your own FontResourceLoader false
logger An EasyLogger that will be sent to the FontResourceLoader by default - can be ignored if you specify your own FontResourceLoader null (since logging warnings is set to false by default)
graphEnv The GraphicsEnvironment to load a font to in the FontResourceLoader - can be ignored if you specify your own FontResourceLoader GraphicsEnvironment.getLocalGraphicsEnvironment()
fontFolder The path to the fonts folder to find font files in if needed in the FontResourceLoader - can be ignored if you specify your own FontResourceLoader "fonts/"
fontResourceLoader The FontResourceLoader to use in loading a font and/or ensuring they're in the system a new FontResourceLoader with the specified values for logFontResourceLoaderWarnings, logger, graphEnv, and fontFolder
Version:
Alpha v.0.3
Author:
Logan Ferree (Tadukoo)
  • Field Details

    • text

      private String text
      The text to use on the Label
    • icon

      private Icon icon
      The icon to use on the Label
    • foregroundPaint

      private SizablePaint foregroundPaint
      The SizablePaint to use for the foreground of the Label
    • backgroundPaint

      private SizablePaint backgroundPaint
      The SizablePaint to use for the background of the Label
    • disabledForegroundPaint

      private SizablePaint disabledForegroundPaint
      The SizablePaint to use for the disabled foreground of the Label
    • fontFamily

      private FontFamily fontFamily
      The FontFamily to use on the font of the Label
    • fontStyle

      private int fontStyle
      The font style to use on the font of the Label
    • fontSize

      private int fontSize
      The font size to use on the font of the Label
    • shapeInfo

      private ShapeInfo shapeInfo
      The ShapeInfo to use on the Label
    • border

      private Border border
      The Border to use on the Label
    • logFontResourceLoaderWarnings

      private boolean logFontResourceLoaderWarnings
      Whether to log warnings generated by the FontResourceLoader - can be ignored if you specify your own FontResourceLoader
    • logger

      private com.github.tadukoo.util.logger.EasyLogger logger
      An EasyLogger that will be sent to the FontResourceLoader by default - can be ignored if you specify your own FontResourceLoader
    • graphEnv

      private GraphicsEnvironment graphEnv
      The GraphicsEnvironment to load a font to in the FontResourceLoader - can be ignored if you specify your own FontResourceLoader
    • fontFolder

      private String fontFolder
      The path to the fonts folder to find font files in if needed in the FontResourceLoader - can be ignored if you specify your own FontResourceLoader
    • fontResourceLoader

      private FontResourceLoader fontResourceLoader
      The FontResourceLoader to use in loading a font and/or ensuring they're in the system
  • Constructor Details

    • TadukooLabelBuilder

      private TadukooLabelBuilder()
      Can't create Tadukoo Label Builder outside of Tadukoo Label
  • Method Details