All Known Implementing Classes:
FontSizeScaler, UIScaler, UIScaler

public interface Scaler
Provides a way to scale UIs.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
     
    static final PropertyValue<Integer>
    Specifies the global UI scaling ratio.
    85 = decrease the default size by 15%
    100 = use the default size
    125 = increase the default size by 25%
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Applies the scale ratio specified by RATIO
    instance(String lookAndFeelClassName)
     
    boolean
    supports(String lookAndFeelClassName)
     
  • Field Details

    • DEFAULT_RATIO

      static final int DEFAULT_RATIO
      See Also:
    • RATIO

      static final PropertyValue<Integer> RATIO
      Specifies the global UI scaling ratio.
      85 = decrease the default size by 15%
      100 = use the default size
      125 = increase the default size by 25%

      Note that this does not support dynamic updates, application must be restarted for changes to take effect.

  • Method Details

    • apply

      void apply()
      Applies the scale ratio specified by RATIO
    • supports

      boolean supports(String lookAndFeelClassName)
      Parameters:
      lookAndFeelClassName - the look and feel classname
      Returns:
      true if this Scaler supports the given look and feel
    • instance

      static Optional<Scaler> instance(String lookAndFeelClassName)
      Parameters:
      lookAndFeelClassName - the look and feel classname
      Returns:
      the first available Scaler supporting the given look and feel