public class DefaultValues
extends java.lang.Object
限定符和类型 | 方法和说明 |
---|---|
static int |
getDefaultComponentHeight()
获取控件默认高度
|
static java.awt.Dimension |
getLabelDefaultSize()
获取label默认大小
|
static java.awt.Dimension |
getZoomDimension(java.awt.Dimension dimension)
将尺寸按照系统大小缩放
|
static java.awt.Dimension |
getZoomDimension(int width, int height)
将宽高按照系统比例缩放
|
static void |
reload()
切换显示比例后需要重新计算控件高度
|
public static void reload()
public static java.awt.Dimension getZoomDimension(java.awt.Dimension dimension)
dimension
- 需要放大之前的尺寸public static java.awt.Dimension getZoomDimension(int width, int height)
width
- 需要缩放的宽度height
- 需要缩放的高度public static int getDefaultComponentHeight()
public static java.awt.Dimension getLabelDefaultSize()