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 PropertyValue<Integer>
    Specifies the global UI scaling ratio in percentages, with 100 meaning no scaling.
    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 SCALING
    instance(String lookAndFeelClassName)
     
    static int
    scale(int size)
     
    boolean
    supports(String lookAndFeelClassName)
     
  • Field Details

    • SCALING

      static final PropertyValue<Integer> SCALING
      Specifies the global UI scaling ratio in percentages, with 100 meaning no scaling.
      85 = decrease the default size by 15%
      100 = use the default size
      125 = increase the default size by 25%
  • Method Details

    • apply

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

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

      static int scale(int size)
      Parameters:
      size - the size to scale
      Returns:
      the size scaled according to SCALING
    • 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