Package org.eclnt.util.valuemgmt
Class Scale
java.lang.Object
org.eclnt.util.valuemgmt.Scale
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
-
Method Summary
Modifier and TypeMethodDescriptionstatic Font
calculateScaledFont
(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
static void
Called directly after setting the look and feel.static void
setFontFactor
(float value) static void
setSizeFactor
(float value)
-
Constructor Details
-
Scale
public Scale()
-
-
Method Details
-
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
Update font according to font factor. -
getSizeFactor
public static float getSizeFactor()
-