public final class GuiSizesHelper extends java.lang.Object
gui.util
package), 10358Modifier and Type | Field and Description |
---|---|
private static float |
screenDPI
cache value for screen resolution
|
Modifier | Constructor and Description |
---|---|
private |
GuiSizesHelper() |
Modifier and Type | Method and Description |
---|---|
static java.awt.Dimension |
getDimensionDpiAdjusted(java.awt.Dimension dim)
Returns a resolution adapted Dimension
|
static float |
getPixelDensity()
Returns coefficient of monitor pixel density.
|
private static float |
getScreenDPI()
Request the screen resolution (cached)
|
static double |
getSizeDpiAdjusted(double size)
Returns a resolution adapted size
|
static float |
getSizeDpiAdjusted(float size)
Returns a resolution adapted size
|
static int |
getSizeDpiAdjusted(int size)
Returns a resolution adapted size
|
static boolean |
isHiDPI()
Check if a high DPI resolution is used
|
private static float screenDPI
private GuiSizesHelper()
private static float getScreenDPI()
public static float getPixelDensity()
public static boolean isHiDPI()
true
for HIDPI screenspublic static int getSizeDpiAdjusted(int size)
size
- Size value to adapt (base size is a low DPI screen)public static float getSizeDpiAdjusted(float size)
size
- Size value to adapt (base size is a low DPI screen)public static double getSizeDpiAdjusted(double size)
size
- Size value to adapt (base size is a low DPI screen)public static java.awt.Dimension getDimensionDpiAdjusted(java.awt.Dimension dim)
dim
- Dimension value to adapt (base size is a low DPI screen)