org.eclnt.util.valuemgmt

## Class Scale

- java.lang.Object
- - org.eclnt.util.valuemgmt.Scale

-     public class Scale
      extends java.lang.Object

  Scale management. All interpretation of values which are relevant for sizing are done by the class ValueManager. Inside ValueManager the Scale class is used for translating sizes according to a scale definition.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `Scale()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static java.awt.Font` | `calculateScaledFont(java.awt.Font font)` Update font according to font factor.
    `static int` | `calculateScaledSize(int size)` Calculate size, multiplication with size factor if not defined as percentage size.
    `static int` | `calculateSize(int pixelSize)` Does the back-scaling: the input is a pixel size, the result is the scaled pixel value.
    `static float` | `getSizeFactor()`
    `static void` | `initializeLoolAndFeel()` Called directly after setting the look and feel.
    `static void` | `setFontFactor(float value)`
    `static void` | `setSizeFactor(float value)`

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

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

- - ### Constructor Detail

    - #### Scale

          public Scale()

  - ### Method Detail

    - #### setSizeFactor

          public static void setSizeFactor(float value)

    - #### setFontFactor

          public static void setFontFactor(float value)

    - #### initializeLoolAndFeel

          public static void initializeLoolAndFeel()

      Called directly after setting the look and feel. Updates all look and feel fonts to be updated according to font calculation factor.
      This function assumes that hte UIManager.getDefaults() are on 100% level.

    - #### calculateScaledSize

          public static int calculateScaledSize(int size)

      Calculate size, multiplication with size factor if not defined as percentage size.

    - #### calculateSize

          public static int calculateSize(int pixelSize)

      Does the back-scaling: the input is a pixel size, the result is the scaled pixel value.

    - #### calculateScaledFont

          public static java.awt.Font calculateScaledFont(java.awt.Font font)

      Update font according to font factor.

    - #### getSizeFactor

          public static float getSizeFactor()

Copyright © CaptainCasa Gmbh. All Rights Reserved.