Class TadukooTheme.TadukooThemeBuilder

java.lang.Object
com.github.tadukoo.view.lookandfeel.TadukooTheme.TadukooThemeBuilder
Enclosing class:
TadukooTheme

public static class TadukooTheme.TadukooThemeBuilder extends Object
Builder for TadukooTheme. There are no required fields - all of them will be defaulted based on the default Tadukoo Theme. The following fields may be specified:

Component UI Classes
Field Description Default Value
buttonUI The ButtonUI class to use TadukooButtonUI.class
labelUI The LabelUI class to use TadukooLabelUI.class

Paint Parameters
Field Description Default Value
defaultForegroundPaint The PaintUIResource to use for all unspecified foreground paints new ColorPaintUIResource(Color.BLACK)
buttonForegroundPaint The PaintUIResource to use for the foreground on Buttons null (defaults to the defaultForegroundPaint value)
labelForegroundPaint The PaintUIResource to use for the foreground on Labels null (defaults to the defaultForegroundPaint value)
defaultBackgroundPaint The PaintUIResource to use for all unspecified background paints new ColorPaintUIResource(Color.WHITE)
buttonBackgroundPaint The PaintUIResource to use for the background on Buttons null (defaults to the defaultBackgroundPaint value)
labelBackgroundPaint The PaintUIResource to use for the background on Labels new NoPaintUIResource (can set to null to use the defaultBackgroundPaint value if you want to)
defaultFocusPaint The PaintUIResource to use for all unspecified focus paints new ColorPaintUIResource(Color.YELLOW)
buttonFocusPaint The PaintUIResource to use for focus on Buttons null (defaults to the defaultFocusPaint value)
defaultSelectPaint The PaintUIResource to use for all unspecified select paints new ColorPaintUIResource(Color.RED)
buttonSelectPaint The PaintUIResource to use for select on Buttons null (defaults to the defaultSelectPaint value)
defaultDisabledTextPaint The PaintUIResource to use for all unspecified disabled text paints new ColorPaintUIResource(Color.GRAY)
buttonDisabledTextPaint The PaintUIResource to use for disabled text on Buttons null (defaults to the defaultDisabledTextPaint value)
defaultDisabledForegroundPaint The PaintUIResource to use for all unspecified disabled foreground paints new ColorPaintUIResource(Color.GRAY)
labelDisabledForegroundPaint The PaintUIResource to use for disabled foreground on Labels null (defaults to the defaultDisabledForegroundPaint value)

Font Parameters
Specified as a FontFamily, font style, and font size
Field Description Default Value
defaultFont The font to use for unspecified font FontFamilies.CALIBRI, style Font.PLAIN, and size 12
buttonFont The font to use for Buttons null (defaults to the defaultFont value)
labelFont The font to use for Labels null (defaults to the defaultFont value)

Font Resource Loading 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 fonts 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 fonts and/or ensuring they're in the system a new FontResourceLoader with the specified values for logFontResourceLoaderWarnings, logger, graphEnv, and fontFolder

Shape Parameters
Field Description Default Value
defaultShapeInfo The ShapeInfoUIResource to use for all unspecified shapes Shapes.RECTANGLE_WITH_CUT_CORNERS_TR_BL
buttonShapeInfo The ShapeInfoUIResource to use for Buttons null (defaults to the defaultShapeInfo value)
labelShapeInfo The ShapeInfoUIResource to use for Labels null (defaults to the defaultShapeInfo value)

Border Parameters
Field Description Default Value
defaultBorder The BorderUIResource to use for all unspecified borders new TadukooBorder()
buttonBorder The BorderUIResource to use on Buttons null (defaults to the defaultBorder value)
labelBorder The BorderUIResource to use on Labels new NoBorderUIResource() (can be changed to null to use the defaultBorder value)

Titled Border Parameters
Field Description Default Value
titledBorderBorder The default border to use in Titled Borders null (defaults to the defaultBorder value)
titledBorderFont The default font to use in Titled Borders null (defaults to the defaultFont value)
titledBorderColor The default color to use in Titled Borders Color.BLACK
titledBorderPosition The default position for the title in Titled Borders TitlePosition.TOP

Other Customizations
Field Description Default Value
classDefaults Class defaults beyond those specified in the "Component UI Classes" section Empty list
systemColorDefaults System Color defaults Empty list
componentDefaults Component defaults beyond those specified in the above sections Empty list
Since:
Alpha v.0.2
Version:
Alpha v.0.3
Author:
Logan Ferree (Tadukoo)
  • Field Details

    • buttonUI

      private Class<? extends ButtonUI> buttonUI
      The ButtonUI class to use
    • labelUI

      private Class<? extends LabelUI> labelUI
      The LabelUI class to use
    • defaultForegroundPaint

      private PaintUIResource defaultForegroundPaint
      The PaintUIResource to use for all unspecified foreground paints
    • buttonForegroundPaint

      private PaintUIResource buttonForegroundPaint
      The PaintUIResource to use for the foreground on Buttons
    • labelForegroundPaint

      private PaintUIResource labelForegroundPaint
      The PaintUIResource to use for the foreground on Labels
    • defaultBackgroundPaint

      private PaintUIResource defaultBackgroundPaint
      The PaintUIResource to use for all unspecified background paints
    • buttonBackgroundPaint

      private PaintUIResource buttonBackgroundPaint
      The PaintUIResource to use for the background on Buttons
    • labelBackgroundPaint

      private PaintUIResource labelBackgroundPaint
      The PaintUIResource to use for the background on Labels
    • defaultFocusPaint

      private PaintUIResource defaultFocusPaint
      The PaintUIResource to use for all unspecified focus paints
    • buttonFocusPaint

      private PaintUIResource buttonFocusPaint
      The PaintUIResource to use for focus on Buttons
    • defaultSelectPaint

      private PaintUIResource defaultSelectPaint
      The PaintUIResource to use for all unspecified select paints
    • buttonSelectPaint

      private PaintUIResource buttonSelectPaint
      The PaintUIResource to use for select on Buttons
    • defaultDisabledTextPaint

      private PaintUIResource defaultDisabledTextPaint
      The PaintUIResource to use for all unspecified disabled text paints
    • buttonDisabledTextPaint

      private PaintUIResource buttonDisabledTextPaint
      The PaintUIResource to use for disabled text on Buttons
    • defaultDisabledForegroundPaint

      private PaintUIResource defaultDisabledForegroundPaint
      The PaintUIResource to use for all unspecified disabled foreground paints
    • labelDisabledForegroundPaint

      private PaintUIResource labelDisabledForegroundPaint
      The PaintUIResource to use for disabled foreground on Labels
    • defaultFontFamily

      private FontFamily defaultFontFamily
      The FontFamily to use for unspecified fonts
    • defaultFontStyle

      private int defaultFontStyle
      The font style to use for unspecified fonts
    • defaultFontSize

      private int defaultFontSize
      The font size to use for unspecified fonts
    • buttonFontFamily

      private FontFamily buttonFontFamily
      The FontFamily to use for Buttons
    • buttonFontStyle

      private int buttonFontStyle
      The Font style to use for Buttons
    • buttonFontSize

      private int buttonFontSize
      The font size to use for Buttons
    • labelFontFamily

      private FontFamily labelFontFamily
      The FontFamily to use for Labels
    • labelFontStyle

      private int labelFontStyle
      The Font style to use for Labels
    • labelFontSize

      private int labelFontSize
      The font size to use for Labels
    • 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 fonts 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 fonts and/or ensuring they're in the system
    • defaultShapeInfo

      private ShapeInfoUIResource defaultShapeInfo
      The ShapeInfoUIResource to use for unspecified shapes
    • buttonShapeInfo

      private ShapeInfoUIResource buttonShapeInfo
      The ShapeInfoUIResource to use for Buttons
    • labelShapeInfo

      private ShapeInfoUIResource labelShapeInfo
      The ShapeInfoUIResource to use for Labels
    • defaultBorder

      private BorderUIResource defaultBorder
      The BorderUIResource to use for all unspecified borders
    • buttonBorder

      private BorderUIResource buttonBorder
      The BorderUIResource to use on Buttons
    • labelBorder

      private BorderUIResource labelBorder
      The BorderUIResource to use on Labels
    • titledBorderBorder

      private BorderUIResource titledBorderBorder
      The default BorderUIResource to use in Titled Borders
    • titledBorderFontFamily

      private FontFamily titledBorderFontFamily
      The default FontFamily to use in Titled Borders
    • titledBorderFontStyle

      private int titledBorderFontStyle
      The default font style to use in Titled Borders
    • titledBorderFontSize

      private int titledBorderFontSize
      The default font size to use in Titled Borders
    • titledBorderColor

      private ColorUIResource titledBorderColor
      The default color to use in Titled Borders
    • titledBorderPosition

      private TitlePosition titledBorderPosition
      The default position for the title in Titled Borders
    • classDefaults

      private Map<String,Class<?>> classDefaults
      Class defaults beyond those specified in the "Component UI Classes" section
    • systemColorDefaults

      private Map<String,ColorUIResource> systemColorDefaults
      System Color defaults
    • componentDefaults

      private Map<String,Object> componentDefaults
      Component defaults beyond those specified in the above sections
  • Constructor Details

    • TadukooThemeBuilder

      private TadukooThemeBuilder()
      Cannot create TadukooThemeBuilder outside of TadukooTheme
  • Method Details