org.apache.jorphan.gui

## Class JMeterUIDefaults

- java.lang.Object
- - org.apache.jorphan.gui.JMeterUIDefaults

-     public class JMeterUIDefaults
      extends Object

  Configures JMeter-specific properties as `UIDefaults` properties for on-the-fly LaF updates.

  The workflow is as follows:

  - LaF is initialized, and it initializes its defaults (e.g. colors, keymaps, styles)
  - UIManager fires lookAndFeel property change event
  - JMeterUIDefaults handles the even and augments the properties (e.g. scales fonts, adds JMeter-specific colors)

  The sequence enables the components to use extra properties for styling the components

  For instance, `label.setForeground(Color.black)` should not be used for styling the components as the black colour might be hard to read in certain themes. That is why the styles should be named (e.g. `LABEL_ERROR_FOREGROUND`), so the actual value could be adapted to a given theme without making changes to the component code

  See Also:
    `JFactory`

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `BUTTON_ERROR_FOREGROUND`
    `static String` | `BUTTON_SMALL_FONT`
    `static String` | `CHECKBOX_SMALL_FONT`
    `static JMeterUIDefaults` | `INSTANCE`
    `static String` | `LABEL_BIG_FONT`
    `static String` | `LABEL_ERROR_FONT`
    `static String` | `LABEL_ERROR_FOREGROUND`
    `static String` | `LABEL_SMALL_FONT`
    `static String` | `LABEL_WARNING_FONT`
    `static String` | `LABEL_WARNING_FOREGROUND`
    `static String` | `TABLE_ROW_HEIGHT`
    `static String` | `TEXTAREA_BORDER`
    `static String` | `TEXTFIELD_SMALL_FONT`
    `static String` | `TOOLBAR_SMALL_FONT`
    `static String` | `TREE_ROW_HEIGHT`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static Font` | `createFont(String family, int style, int size)`
    `float` | `getScale()`
    `void` | `install()`
    `void` | `setScale(float scale)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### BUTTON_SMALL_FONT

          public static final String BUTTON_SMALL_FONT

      See Also:
        Constant Field Values

    - #### CHECKBOX_SMALL_FONT

          public static final String CHECKBOX_SMALL_FONT

      See Also:
        Constant Field Values

    - #### LABEL_SMALL_FONT

          public static final String LABEL_SMALL_FONT

      See Also:
        Constant Field Values

    - #### TEXTFIELD_SMALL_FONT

          public static final String TEXTFIELD_SMALL_FONT

      See Also:
        Constant Field Values

    - #### TOOLBAR_SMALL_FONT

          public static final String TOOLBAR_SMALL_FONT

      See Also:
        Constant Field Values

    - #### LABEL_BIG_FONT

          public static final String LABEL_BIG_FONT

      See Also:
        Constant Field Values

    - #### TEXTAREA_BORDER

          public static final String TEXTAREA_BORDER

      See Also:
        Constant Field Values

    - #### LABEL_WARNING_FONT

          public static final String LABEL_WARNING_FONT

      See Also:
        Constant Field Values

    - #### LABEL_WARNING_FOREGROUND

          public static final String LABEL_WARNING_FOREGROUND

      See Also:
        Constant Field Values

    - #### LABEL_ERROR_FONT

          public static final String LABEL_ERROR_FONT

      See Also:
        Constant Field Values

    - #### LABEL_ERROR_FOREGROUND

          public static final String LABEL_ERROR_FOREGROUND

      See Also:
        Constant Field Values

    - #### BUTTON_ERROR_FOREGROUND

          public static final String BUTTON_ERROR_FOREGROUND

      See Also:
        Constant Field Values

    - #### TABLE_ROW_HEIGHT

          public static final String TABLE_ROW_HEIGHT

      See Also:
        Constant Field Values

    - #### TREE_ROW_HEIGHT

          public static final String TREE_ROW_HEIGHT

      See Also:
        Constant Field Values

    - #### INSTANCE

          @API(since="5.3",
               status=INTERNAL)
          public static final JMeterUIDefaults INSTANCE

  - ### Method Detail

    - #### getScale

          @API(since="5.3",
               status=EXPERIMENTAL)
          public float getScale()

    - #### setScale

          @API(since="5.3",
               status=EXPERIMENTAL)
          public void setScale(float scale)

    - #### install

          @API(since="5.3",
               status=INTERNAL)
          public void install()

    - #### createFont

          public static Font createFont(String family,
                                        int style,
                                        int size)

Copyright © 1998-2021 Apache Software Foundation. All Rights Reserved.