public enum ScaleType extends java.lang.Enum<ScaleType>
USR_SCALE
).
2) JRE-managed HiDPI mode.
In this mode the JRE scales graphics prior to drawing it on the device. So, there're two coordinate
spaces: the user space and the device space. The system scale factor (SYS_SCALE
) defines the
transform b/w the spaces. The UI size metrics (windows, controls, fonts height) are in the user
coordinate space. Though, the raster images should be aware of the device scale in order to meet
HiDPI. (For instance, JRE on a Mac Retina monitor device works in the JRE-managed HiDPI mode,
transforming graphics to the double-scaled device coordinate space)
The IDE operates the scale factors of the following types:
JreHiDpiUtil.isJreHiDPIEnabled()
,
UIUtil.isJreHiDPI()
,
JreHiDpiUtil.isJreHiDPI(GraphicsConfiguration)
,
JreHiDpiUtil.isJreHiDPI(Graphics2D)
,
JBUIScale.isUsrHiDPI()
,
UIUtil.drawImage(Graphics, Image, Rectangle, Rectangle, ImageObserver)
,
ImageUtil.createImage(GraphicsConfiguration, int, int, int)
,
ImageUtil.createImage(int, int, int)
,
ScaleContext
Enum Constant and Description |
---|
OBJ_SCALE
An extra scale factor of a particular UI object, which doesn't affect any other UI object, as opposed
to the user scale and the system scale factors.
|
SYS_SCALE
The system scale factor is defined by the device DPI and/or the system settings.
|
USR_SCALE
The user scale factor is set and managed by the IDE.
|
Modifier and Type | Method and Description |
---|---|
Scale |
of(double value) |
static ScaleType |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static ScaleType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ScaleType USR_SCALE
public static final ScaleType SYS_SCALE
public static final ScaleType OBJ_SCALE
public static ScaleType[] values()
for (ScaleType c : ScaleType.values()) System.out.println(c);
public static ScaleType valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic Scale of(double value)